code402 / tools / calculate-fx-savings
$0.000999 per call · 20 free calls/day · no signup · pay with card credits or a signed USDC voucher (x402)
Compute retained margin and compare Code402 floating fees vs traditional SWIFT wires (3.5%) and Deel (2.0%) across 14 global fiat currencies.
curl -X POST https://code402.dev/v1/tools/calculate-fx-savings/call \
-H "content-type: application/json" \
-d '{"amount_usdc":50000,"currency":"BRL"}'
No key needed for the free tier. When the free quota is used up, the API replies HTTP 402 with the exact price — agents sign the x402 voucher and retry; humans buy card credits. Every paid response carries a signed receipt you can verify offline.
| Field | Type | Meaning |
|---|---|---|
amount_usdc (required) | number | Gross invoice settlement volume in USD/USDC. |
currency | string | Target currency for local comparison (e.g. EUR, GBP, BRL, INR, ARS, PHP, NGN, SGD). |
Top-level fields: tool, amount_usdc, currency, legacy_swift_fee_usd, deel_fee_usd, code402_protocol_fee_usd, retained_savings_usd, pct_retained, local_currency, scope. Paid responses also carry a signed XDR-1 receipt.
Machine-readable catalog: llms-full.txt · MCP manifest · OpenAPI. Operated by JUANA LIMITED (UK Co. No. 14043409). Non-custodial: USDC settles payer→seller directly on Base.