API reference

Create order

Creates a swap order and returns the address and amount the user needs to pay.

POST/api/open/v1/orders

Parameters

JSON body:

ParameterTypeRequiredDescription
fromCurrencystringYesCurrency to pay, up to 16 characters
fromNetworkstringYesNetwork to pay on, up to 32 characters
toCurrencystringYesCurrency to receive
toNetworkstringYesNetwork to receive on
amountstringYesAmount to pay, within limits
recipientAddressstringYesUser's receiving address; must match the receiving network, up to 128 characters
recipientMemostringDependsReceiving memo / tag, when the receiving network has needMemo set
refundAddressstringDependsRefund address (on the paying network). Required for fixed-rate orders
refundMemostringNoRefund memo / tag
rateTypestringNoFLOAT (default) or FIXED
clientOrderIdstringNo (strongly recommended)Your order ID, 1–64 characters: letters, digits and _ . : -
JSON
{
  "fromCurrency": "USDT",
  "fromNetwork": "TRC20",
  "toCurrency": "BTC",
  "toNetwork": "Bitcoin",
  "amount": "1000",
  "recipientAddress": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  "refundAddress": "TQrZ8tKfjEfHKAAT6vWZ7Bt7m9hEFLgGF1",
  "rateType": "FLOAT",
  "clientOrderId": "shop-1001"
}

Response

Returns an Order object. New orders have status WAITING_PAYMENT.

JSON
{
  "code": 0,
  "message": "ok",
  "data": {
    "orderNo": "PX261115F9QFHKEU",
    "clientOrderId": "shop-1001",
    "status": "WAITING_PAYMENT",
    "rateType": "FLOAT",
    "fromCurrency": "USDT",
    "fromNetwork": "TRC20",
    "toCurrency": "BTC",
    "toNetwork": "Bitcoin",
    "sendAmount": "1000",
    "depositAddress": "TXnW3bq6sV1m8yKk2Lr9c3dF5gH7jP4qRt",
    "depositMemo": null,
    "receiveAmount": "0.01512518",
    "receiveFinal": false,
    "recipientAddress": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
    "expireAt": "2026-11-15T17:31:24",
    "createdAt": "2026-11-15T15:31:24"
  }
}

What to show the user

Once you have the order, show the user:

  • The payment address depositAddress (a QR code is recommended too).
  • The amount sendAmount and network fromNetwork, with a reminder to send on that network only.
  • depositMemo, if present, with a prominent note that it is required for the payment to be matched automatically.
  • The payment deadline expireAt.

Idempotency

Within one account, requests with the same clientOrderId create only one order; repeats return that order. If a request times out and you're unsure whether it succeeded, retry with the same clientOrderId. See Rate limits & idempotency.

Order validity

  • The user must pay before expireAt. The window is currently 120 minutes after creation — always rely on expireAt.
  • Unpaid orders become EXPIRED and a status event is sent.
  • Payments that arrive within 2 hours after expiry are still detected and processed.

Possible errors

codeDescription
40000Missing or malformed parameter; message names the field
42001 – 42013Currency, limit and rate errors — see Quote
42005Receiving or refund address doesn't match the network
42006Fixed-rate order without a refund address
42020Under maintenance, new orders paused
42021The network is under maintenance
42900Too many orders created

Need help with your integration? Contact support: [email protected]