Skip to main content
POST
/
v1
/
fx
/
exchange
Execute a currency exchange
curl --request POST \
  --url https://api.antonpayments.com/v1/fx/exchange \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "quote_id": "<string>",
  "sell_currency": "<string>",
  "buy_currency": "<string>",
  "buy_amount": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "quote_id": "<string>",
    "sell_currency": "<string>",
    "buy_currency": "<string>",
    "sell_amount": "<string>",
    "buy_amount": "<string>",
    "mid_market_rate": "<string>",
    "customer_rate": "<string>",
    "provider": "<string>",
    "status": "completed",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Merchant API key: ak_live_* (production) or ak_test_* (sandbox).

Headers

Idempotency-Key
string
required

Unique key to ensure idempotent request processing.

Body

application/json
quote_id
string

ID of a locked quote. Omit for one-shot mode.

sell_currency
string
buy_currency
string
buy_amount
string

Response

Exchange executed.

data
object
required