Skip to main content

Converting Currencies

How to get a quote and execute a currency exchange using the Anton merchant portal or API.

Written by Ryan O
Updated today

Overview

Anton allows you to convert funds between currencies directly within your account. Whether you need to pre-convert funds before sending payouts or manage multi-currency balances, the conversion process is straightforward through both the merchant portal and the API.

Converting via the Merchant Portal

  1. Log in to the merchant portal and navigate to Balances

  2. Click Convert next to the source currency

  3. Select the destination currency and enter the amount you want to convert

  4. Review the indicative rate displayed -- this shows the approximate amount you will receive

  5. Click Get Quote to lock in a rate. The locked quote is valid for a limited time (shown on screen)

  6. Review the locked rate, fees, and final amount

  7. Click Confirm to execute the conversion before the quote expires

The converted funds appear in your destination currency balance immediately after confirmation.

Converting via the API

The API conversion flow has two steps: get a quote, then execute it.

Step 1: Request a quote

curl https://api.antonpayments.dev/v1/fx/quotes \
  -X POST \
  -H "Authorization: Bearer ak_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "sell_currency": "USD",
    "buy_currency": "EUR",
    "sell_amount": "10000.00"
  }'

The response includes the locked rate, the amount you will receive, the quote ID, and the expiration time.

Step 2: Execute the quote

curl https://api.antonpayments.dev/v1/fx/quotes/fxq_abc123/execute \
  -X POST \
  -H "Authorization: Bearer ak_test_..." \
  -H "Idempotency-Key: fx-convert-20260214-001"

Always include an Idempotency-Key header when executing quotes to prevent duplicate conversions if a request is retried.

Important Considerations

  • Quote expiration -- Locked quotes are valid for a limited time (typically 30 seconds to a few minutes). If the quote expires before execution, request a new one.

  • Sufficient balance -- You must have enough funds in the source currency to cover the conversion amount. The API returns an error if your balance is insufficient.

  • Amounts are strings -- Always send amounts as strings (e.g., "10000.00"), never as floating-point numbers, to avoid rounding errors.

  • Conversion vs payout FX -- You can convert currencies proactively to manage balances, or let Anton handle FX automatically during cross-currency payouts. See the Cross-Currency Payouts article for details on automatic conversion.

Viewing Conversion History

All completed conversions are visible in the merchant portal under Transactions > FX Conversions. Via the API, you can list conversions using the FX endpoints. Each conversion record includes the rate applied, amounts, currencies, and timestamp.

Did this answer your question?