Orders
The Orders endpoints allow you to create and manage cryptocurrency exchange orders. This is where the actual trading takes place after you've obtained rates and selected trading pairs.
Get Orders
Retrieve a paginated list of orders with optional filtering.
Request
GET /orders/
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1) |
page_size | integer | No | Number of orders per page (default: 20) |
pair | string | No | Filter by pair name (e.g., "BTCETH") |
status | integer | No | Filter by order status (e.g., 11) |
Response
Returns a paginated list of orders.
Response Fields:
| Field | Type | Description |
|---|---|---|
count | integer | Total number of orders |
next | string/null | URL for next page |
previous | string/null | URL for previous page |
results | array | Array of order objects |
Example Response:
{
"count": 21,
"next": "http://localhost:8000/en/api/v1/orders/?page=2&page_size=3",
"previous": null,
"results": [
{
"amount_base": "0.50000000",
"is_default_rule": false,
"unique_reference": "LOUA3",
"amount_quote": "7.17000000",
"pair": 2,
"withdraw_address": {
"type": "W",
"name": "",
"address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
"currency_code": "BTC"
},
"created_on": "2017-08-16T07:27:04.964665Z",
"from_default_rule": false,
"order_type": 1,
"deposit_address": {
"type": "D",
"name": "",
"address": "0xF00667496B353d77492e0f7167843d5d5802030b",
"currency_code": "ETH"
},
"pair_name": "BTCETH",
"withdrawal_fee": "0.0025",
"withdrawal_fee_quote": "0.03585",
"user_provided_amount": "0"
}
]
}
Create a New Order
Create a new cryptocurrency exchange order.
Request
POST /orders/
Headers:
| Header | Required | Description |
|---|---|---|
x-referral-token | No | Referral token for identification |
Authorization | No | Bearer token for additional authorization |
Request Body Fields:
| Field | Type | Required | Description |
|---|---|---|---|
order_type | integer | No | Order type (1 for buy, 0 for sell). Default: 1 |
amount_quote | string | Yes* | Quote amount for the order |
amount_base | string | Yes* | Base amount for the order |
pair | object | Yes | Pair object with name property |
pair.name | string | Yes | Trading pair name (e.g., "BTCEUR") |
withdraw_address | object | No | Withdrawal address object |
withdraw_address.address | string | Yes** | Withdrawal address string |
refund_address | object | No | Refund address object |
refund_address.address | string | Yes** | Refund address string |
payment_method | string | No | Payment method for FIAT orders |
rate_id | string | No | Rate ID from GET /info/bulk/ (same pair row). DeFi: optional; omit = no quote lock-in; if sent, must be valid or request fails validation. |
is_default_rule | boolean | No | Auto-convert incoming funds |
is_defi | boolean | No | Set to true to create a non-custodial DeFi order |
is_fixed_rate | boolean | No | Fixed-rate (RFQ) mode. Default: false (floating rate). Only applies to DeFi orders |
*Only one of amount_quote or amount_base should be provided.
**Required if parent object is provided.
Response
Returns the created order with full details.
Order Response Fields:
| Field | Type | Description |
|---|---|---|
order_type | integer | Order type (1 for buy, 0 for sell) |
amount_base | string | Base amount for the order |
is_default_rule | boolean | Whether order uses default rule |
unique_reference | string | Unique order identifier |
amount_quote | string | Quote amount for the order |
pair | object | Complete pair object with currencies |
deposit_address | object | Address object for deposits |
withdraw_address | object | Address object for withdrawals |
refund_address | object | Address object for refunds |
user_marked_as_paid | boolean | User payment confirmation status |
created_on | string | Order creation timestamp |
from_default_rule | boolean | Created from default rule |
payment_window | integer | Payment window in minutes |
payment_deadline | string | Payment deadline timestamp |
kyc_deadline | string/null | KYC deadline if applicable |
status_name | array | Status tuple [code, name] |
transactions | array | Array of transaction objects |
referral_code | array | Referral code information |
withdrawal_fee | string | Withdrawal fee amount |
withdrawal_fee_quote | string | Withdrawal fee in quote currency |
user_provided_amount | string | User-provided amount |
Example Response:
{
"amount_base": "3.00000000",
"is_default_rule": false,
"unique_reference": "OTVVXE",
"amount_quote": "251.89000000",
"pair": {
"name": "BTCLTC",
"base": {
"code": "BTC",
"name": "bitcoin",
"min_confirmations": 2,
"is_crypto": true,
"minimal_amount": "0.00200000"
},
"quote": {
"code": "LTC",
"name": "litecoin",
"min_confirmations": 6,
"is_crypto": true,
"minimal_amount": "0.25000000"
},
"fee_ask": 0.001,
"fee_bid": 0.001
},
"withdraw_address": {
"type": "W",
"name": "",
"address": "17dBqMpMr6r8ju7BoBdeZiSD3cjVZG62yJ",
"currency_code": "BTC"
},
"deposit_address": {
"type": "D",
"name": "",
"address": "addr_addr_id_5005841120",
"currency_code": "LTC"
},
"created_on": "2017-09-19T09:20:11.491815Z",
"payment_window": 15,
"payment_deadline": "2017-09-19T09:35:11.491815Z",
"status_name": [
[11, "INITIAL"]
],
"transactions": []
}
DeFi Orders
DeFi orders use the same POST /orders/ endpoint with is_defi: true. The deposit address is a proxy address — users send funds there and receive the output token on the destination chain.
DeFi-specific request example:
{
"pair": { "name": "BTCSOL" },
"withdraw_address": { "address": "bc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" },
"refund_address": { "address": "So1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" },
"is_defi": true,
"is_fixed_rate": false
}
A refund_address is required when the destination chain is Solana, Tron, or Bitcoin. It must be a valid address for the deposit (quote) currency.
DeFi orders interact with a permissionless protocol path, so protocol-level KYC is not enforced by default. Integrators remain responsible for jurisdictional and AML/KYT obligations.
At the platform layer, pre-screening can be enabled for stricter controls. Baseline controls include static bad-actor/blocklist checks and sanctions screening (including OFAC SDN checks).
Additional response fields for DeFi orders:
| Field | Type | Description |
|---|---|---|
nc_bridge_id | string | DeFi transaction identifier |
nc_bridge_proxy_address | string | Proxy address for the DeFi deposit |
nc_bridge_message | string | Human-readable DeFi instruction (e.g. minimum deposit info) |
DeFi-specific response example:
{
"unique_reference": "AB12CD",
"order_type": 1,
"status": 11,
"status_display": "INITIAL",
"pair": {
"name": "BTCSOL",
"base": { "code": "BTC", "name": "bitcoin" },
"quote": { "code": "SOL", "name": "Solana" }
},
"deposit_address": {
"type": "D",
"address": "0xProxyAddressFromDeFi",
"currency_code": "SOL"
},
"nc_bridge_id": "defi-id-123",
"nc_bridge_proxy_address": "0xProxyAddressFromDeFi",
"nc_bridge_message": "Send at least $20 worth of SOL to swap to BTC",
"payment_deadline": "2026-02-20T10:15:00Z",
"transactions": []
}
DeFi orders enforce a minimum of $20 USD equivalent per order. Always respect the pair-specific min_deposit_amount from info/bulk?is_defi=true.
DeFi order status flow is simplified compared to standard orders:
INITIAL (11) → PRE-RELEASE (14) → RELEASED (15) → COMPLETED (16)
or
INITIAL (11) → RELEASED (15) → COMPLETED (16)
Failed or expired orders follow the refund path:
INITIAL/PRE-RELEASE/CANCELED → INITIATED REFUND (6) → REFUNDED (8)
RELEASED indicates the withdrawal transaction has been broadcast. COMPLETED is set after on-chain confirmation checks reach the configured minimum confirmations for that currency (commonly 10), or via legacy bridge callbacks that still send COMPLETED directly.
Get Order Details by Unique Reference
Retrieve detailed information about a specific order.
Request
GET /orders/{unique_reference}/
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
unique_reference | string | Yes | Unique reference for the order |
Response
Returns complete order information including transaction details.
Example Response:
{
"amount_base": "0.50000000",
"is_default_rule": false,
"unique_reference": "1CPL5",
"amount_quote": "48.00000000",
"pair": 1,
"withdrawal_fee": "0.0025",
"withdrawal_fee_quote": "0.03585",
"user_provided_amount": "0",
"withdraw_address": null,
"created_on": "2017-08-16T10:36:02.248639Z",
"from_default_rule": false,
"order_type": 1,
"deposit_address": {
"type": "D",
"name": "",
"address": "LewxThDasEA2JTDVDdGMot92kG6XYNFNQN",
"currency_code": "LTC"
},
"status": 1,
"payment_window": 60,
"payment_deadline": "2017-08-16T11:36:02.248639Z",
"status_name": [
[1, "INITIAL"]
],
"transactions": [
{
"created_on": "2017-08-16T22:14:46.680082Z",
"modified_on": "2017-08-16T22:14:46.680105Z",
"type": "W",
"address_to": 1,
"tx_id": "asdfsadfsadf",
"confirmations": 0,
"amount": "0.01000000",
"is_verified": false,
"is_completed": false,
"time": null,
"currency": null
}
]
}
Update an Order
Update specific fields of an order such as addresses, transaction ID, or payment status.
Request
PATCH /orders/{unique_reference}/
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
unique_reference | string | Yes | Unique reference for the order |
Headers:
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token from order creation |
Request Body Fields:
| Field | Type | Description |
|---|---|---|
refund_address | object | Refund address object |
refund_address.address | string | New refund address |
refund_address.extra_id | string | Extra identifier if required |
withdraw_address | object | Withdrawal address object |
withdraw_address.address | string | New withdraw address |
withdraw_address.extra_id | string | Extra identifier if required |
tx_id | string/null | Transaction ID for deposit notifications |
flagged | boolean | Flag order for manual review |
user_marked_as_paid | boolean | Mark order as paid (true) or cancel (false) |
Response
Returns the updated order fields.
Example Response:
{
"refund_address": {
"type": "W",
"name": "",
"address": "LUZ7mJZ8PheQVLcKF5GhitGuzZcgPWDPA4",
"currency_code": "LTC"
},
"withdraw_address": null,
"flagged": false
}
Order Status Lifecycle
Orders progress through several states during processing:
Status Values
| Status Code | Status Name | Description |
|---|---|---|
| 0 | CANCELED | Deposit not received and order expired |
| 11 | INITIAL | Order created, awaiting deposit |
| 12 | UNCONFIRMED PAYMENT | Deposit detected but not confirmed |
| 13 | PAID | Deposit confirmed |
| 14 | PRE-RELEASE | Withdrawal transaction being created |
| 15 | RELEASED | Withdrawal transaction broadcasted |
| 16 | COMPLETED | Withdrawal transaction confirmed |
| 6 | INITIATED REFUND | Order refund process initiated |
| 8 | REFUNDED | Order refunded successfully |
| 7 | REFUND FAILED | Order refund failed |
| 9 | PENDING KYC | Waiting for additional due diligence |
Typical order flow
✅ Success Flow:
INITIAL → UNCONFIRMED PAYMENT → PAID → PRE-RELEASE → RELEASED → COMPLETED
❌ Unpaid Flow:
INITIAL → CANCELED
🔍 KYC Success Flow:
INITIAL → UNCONFIRMED PAYMENT → PENDING KYC → PAID → PRE-RELEASE → RELEASED → COMPLETED
🔍 KYC Failure Flow:
INITIAL → UNCONFIRMED PAYMENT → PENDING KYC → INITIATED REFUND → REFUNDED
🔄 Refund Retry Flow:
INITIATED REFUND → REFUND FAILED → INITIATED REFUND → REFUNDED
Transaction statuses
Transaction objects are nested in order responses with their own state machine:
| Status Code | Status Name | Description |
|---|---|---|
| -10 | FAILED | Transaction failed |
| -5 | DROPPED | Transaction dropped |
| -1 | AUDIT_FAILED | Failed audit (withdrawal only) |
| 0 | CANCELED | Transaction canceled (withdrawal only) |
| 1 | INITIAL | Initial state (withdrawal only) |
| 4 | STAGED | Transaction staged (withdrawal only) |
| 7 | AUDITED | Transaction audited (withdrawal only) |
| 10 | UNCONFIRMED | Transaction broadcasted but unconfirmed |
| 13 | CONFIRMED | Transaction confirmed |
Normal Withdrawal Flow:
INITIAL → STAGED → AUDITED → UNCONFIRMED → CONFIRMED
Deposit Transactions start at UNCONFIRMED status.
Error Responses
400 Bad Request
Example:
{
"detail": "Bad request"
}
401 Unauthorized
Example:
{
"detail": "Authentication credentials were not provided"
}
404 Not Found
Example:
{
"detail": "Not found"
}
405 Method Not Allowed
Example:
{
"detail": "Method \"PATCH\" not allowed."
}
Next Steps
- Pre-screening - Compliance and validation checks
- Pricing & Rates - Get current exchange rates
- Users & Authentication - User management for FIAT orders