Skip to main content
POST
/
trades
/
swap
curl --request POST \
  --url https://api.obiex.finance/v1/trades/swap \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "sourceId": "USDT",
  "targetId": "NGNX",
  "amount": 10,
  "side": "SELL"
}
'
{
  "message": "Ok",
  "data": {
    "id": "024a29e9-ab89-46c5-bac1-64ba292946da",
    "createdAt": "2026-03-27T10:25:59.722Z",
    "updatedAt": "2026-03-27T10:25:59.722Z",
    "active": true,
    "reference": "c1774607154115",
    "rate": 1426,
    "side": "SELL",
    "amount": 10,
    "amountReceived": 14260,
    "sourceDollarRate": 0.99,
    "targetDollarRate": 0.0007,
    "userId": "51xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "pairId": "3bd8ace6-dc63-49a8-b91a-46131dfdf0f2",
    "dollarValue": 9.9,
    "pair": {
      "id": "3bd8ace6-dc63-49a8-b91a-46131dfdf0f2",
      "sourceId": "55456608-8c9f-499d-99b4-15ceafef3212",
      "targetId": "de3423cb-e81c-464f-8bb4-d9da15a37e8b",
      "source": {
        "id": "55456608-8c9f-499d-99b4-15ceafef3212",
        "name": "Tether",
        "code": "USDT"
      },
      "target": {
        "id": "de3423cb-e81c-464f-8bb4-d9da15a37e8b",
        "name": "Naira",
        "code": "NGNX"
      }
    }
  }
}
{
"message": "Insufficient balance"
}

Authorizations

x-api-key
string
header
required

Headers

Body

application/json
sourceId
string
required

Currency code (e.g. USDT) or UUID of the currency you are selling

targetId
string
required

Currency code (e.g. NGNX) or UUID of the currency you want to receive

amount
number

Amount of sourceId currency to sell. Mutually exclusive with amountToReceive.

amountToReceive
number

Exact amount of targetId currency you want to receive. Mutually exclusive with amount.

side
enum<string>
default:SELL

Order side. Defaults to SELL.

Available options:
SELL,
BUY

Response

Trade executed successfully

The response is of type object.