Skip to main content
Version: v1

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:

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
page_sizeintegerNoNumber of orders per page (default: 20)
pairstringNoFilter by pair name (e.g., "BTCETH")
statusintegerNoFilter by order status (e.g., 11)

Response

Returns a paginated list of orders.

Response Fields:

FieldTypeDescription
countintegerTotal number of orders
nextstring/nullURL for next page
previousstring/nullURL for previous page
resultsarrayArray 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:

HeaderRequiredDescription
x-referral-tokenNoReferral token for identification
AuthorizationNoBearer token for additional authorization

Request Body Fields:

FieldTypeRequiredDescription
order_typeintegerNoOrder type (1 for buy, 0 for sell). Default: 1
amount_quotestringYes*Quote amount for the order
amount_basestringYes*Base amount for the order
pairobjectYesPair object with name property
pair.namestringYesTrading pair name (e.g., "BTCEUR")
withdraw_addressobjectNoWithdrawal address object
withdraw_address.addressstringYes**Withdrawal address string
refund_addressobjectNoRefund address object
refund_address.addressstringYes**Refund address string
payment_methodstringNoPayment method for FIAT orders
rate_idstringNoRate ID from bulk rates endpoint
is_default_rulebooleanNoAuto-convert incoming funds

*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:

FieldTypeDescription
order_typeintegerOrder type (1 for buy, 0 for sell)
amount_basestringBase amount for the order
is_default_rulebooleanWhether order uses default rule
unique_referencestringUnique order identifier
amount_quotestringQuote amount for the order
pairobjectComplete pair object with currencies
deposit_addressobjectAddress object for deposits
withdraw_addressobjectAddress object for withdrawals
refund_addressobjectAddress object for refunds
user_marked_as_paidbooleanUser payment confirmation status
created_onstringOrder creation timestamp
from_default_rulebooleanCreated from default rule
payment_windowintegerPayment window in minutes
payment_deadlinestringPayment deadline timestamp
kyc_deadlinestring/nullKYC deadline if applicable
status_namearrayStatus tuple [code, name]
transactionsarrayArray of transaction objects
referral_codearrayReferral code information
withdrawal_feestringWithdrawal fee amount
withdrawal_fee_quotestringWithdrawal fee in quote currency
user_provided_amountstringUser-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": []
}

Get Order Details by Unique Reference

Retrieve detailed information about a specific order.

Request

GET /orders/{unique_reference}/

Path Parameters:

ParameterTypeRequiredDescription
unique_referencestringYesUnique 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:

ParameterTypeRequiredDescription
unique_referencestringYesUnique reference for the order

Headers:

HeaderRequiredDescription
AuthorizationYesBearer token from order creation

Request Body Fields:

FieldTypeDescription
refund_addressobjectRefund address object
refund_address.addressstringNew refund address
refund_address.extra_idstringExtra identifier if required
withdraw_addressobjectWithdrawal address object
withdraw_address.addressstringNew withdraw address
withdraw_address.extra_idstringExtra identifier if required
tx_idstring/nullTransaction ID for deposit notifications
flaggedbooleanFlag order for manual review
user_marked_as_paidbooleanMark 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 CodeStatus NameDescription
0CANCELEDDeposit not received and order expired
11INITIALOrder created, awaiting deposit
12UNCONFIRMED PAYMENTDeposit detected but not confirmed
13PAIDDeposit confirmed
14PRE-RELEASEWithdrawal transaction being created
15RELEASEDWithdrawal transaction broadcasted
16COMPLETEDWithdrawal transaction confirmed
6INITIATED REFUNDOrder refund process initiated
8REFUNDEDOrder refunded successfully
7REFUND FAILEDOrder refund failed
9PENDING KYCWaiting 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 CodeStatus NameDescription
-10FAILEDTransaction failed
-5DROPPEDTransaction dropped
-1AUDIT_FAILEDFailed audit (withdrawal only)
0CANCELEDTransaction canceled (withdrawal only)
1INITIALInitial state (withdrawal only)
4STAGEDTransaction staged (withdrawal only)
7AUDITEDTransaction audited (withdrawal only)
10UNCONFIRMEDTransaction broadcasted but unconfirmed
13CONFIRMEDTransaction 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