Skip to main content
POST
/
exchange
/
swap
Make a swap
curl --request POST \
  --url https://api.example.com/exchange/swap \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 1000,
  "quote_id": "570745f5-1252-417f-badf-8b6f19d2319e",
  "reference": "6b35c97f-99e3-4310-af92-2bb0404cfa5a",
  "source_currency": "USD",
  "target_currency": "NGN"
}
'
{
  "data": {
    "correlation_id": "7da742ea-a1bc-11ee-b907-560f156a658b",
    "created_at": "2021-01-01T00:00:00Z",
    "customer": {
      "email": "[email protected]",
      "id": "1",
      "name": "User 1",
      "type": "user"
    },
    "id": "7da8e726-a1bc-11ee-80cf-560f156a658b",
    "provider": {
      "email": "[email protected]",
      "id": "1",
      "name": "Provider 1",
      "type": "provider"
    },
    "source_amount": {
      "amount": 1,
      "currency": "USD"
    },
    "status": "success",
    "symbol": "USD-NGN",
    "target_amount": {
      "amount": 1000,
      "currency": "NGN"
    },
    "updated_at": "2021-01-01T00:00:00Z"
  }
}

Body

application/json

Swap params

Swap params

amount
integer
required

Amount, in minor units

source_currency
string
required

Source currency

target_currency
string
required

Target currency

quote_id
string

Quote ID

reference
string

Reference

Response

Swap Details

Response schema for swap

data
SwapDetails · object

Swap details

Example:
{
"correlation_id": "7da742ea-a1bc-11ee-b907-560f156a658b",
"created_at": "2021-01-01T00:00:00Z",
"customer": {
"email": "[email protected]",
"id": "1",
"name": "User 1",
"type": "user"
},
"id": "7da8e726-a1bc-11ee-80cf-560f156a658b",
"provider": {
"email": "[email protected]",
"id": "1",
"name": "Provider 1",
"type": "provider"
},
"source_amount": { "amount": 1, "currency": "USD" },
"status": "success",
"symbol": "USD-NGN",
"target_amount": { "amount": 1000, "currency": "NGN" },
"updated_at": "2021-01-01T00:00:00Z"
}