API reference
Create order
Creates a swap order and returns the address and amount the user needs to pay.
POST
/api/open/v1/ordersParameters
JSON body:
| Parameter | Type | Required | Description |
|---|---|---|---|
fromCurrency | string | Yes | Currency to pay, up to 16 characters |
fromNetwork | string | Yes | Network to pay on, up to 32 characters |
toCurrency | string | Yes | Currency to receive |
toNetwork | string | Yes | Network to receive on |
amount | string | Yes | Amount to pay, within limits |
recipientAddress | string | Yes | User's receiving address; must match the receiving network, up to 128 characters |
recipientMemo | string | Depends | Receiving memo / tag, when the receiving network has needMemo set |
refundAddress | string | Depends | Refund address (on the paying network). Required for fixed-rate orders |
refundMemo | string | No | Refund memo / tag |
rateType | string | No | FLOAT (default) or FIXED |
clientOrderId | string | No (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
sendAmountand networkfromNetwork, 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 onexpireAt. - Unpaid orders become
EXPIREDand a status event is sent. - Payments that arrive within 2 hours after expiry are still detected and processed.
Possible errors
| code | Description |
|---|---|
40000 | Missing or malformed parameter; message names the field |
42001 – 42013 | Currency, limit and rate errors — see Quote |
42005 | Receiving or refund address doesn't match the network |
42006 | Fixed-rate order without a refund address |
42020 | Under maintenance, new orders paused |
42021 | The network is under maintenance |
42900 | Too many orders created |
Need help with your integration? Contact support: [email protected]