Orders
Order object
| Field | Meaning |
|---|---|
id | Order id assigned by the exchange. |
clientOrderId | The id you supplied when placing the order; absent if you supplied none. |
status | See Order status. |
initialAmount | The amount the order was placed with, in base currency. Never changes. |
amountExecuted | Amount filled by trades so far, in base currency. |
remainingAmount | Amount still open. 0 for a filled order and for a cancelled one. |
amount | Deprecated, ambiguous. It carries the filled amount while the order is open and the unfilled remainder once it is cancelled. Use amountExecuted and remainingAmount. |
price | Limit price. |
quoteAmount | initialAmount * price, in quote currency. |
isBid | true for a buy order. |
isCanceled | Whether the order was cancelled. |
currencyPairCode | e.g. BTC_USDT. |
date | Placement time, UTC. |
Order status
| Status | Terminal | Meaning |
|---|---|---|
Created | no | Resting in the book, nothing filled. |
PartiallyCompleted | no | Resting, partially filled. |
Completed | yes | Fully filled. |
Canceled | yes | Cancelled with nothing filled. |
PartiallyExecutedAndCanceled | yes | Cancelled after a partial fill. |
Default | — | Never expected; report it if you see it. |
An order in a terminal status is out of the book and will not change again.
Client order ids
POST /api/orders accepts an optional clientOrderId: up to 36 characters of A-Z a-z 0-9 . _ -.
It solves two problems.
A lost response cannot cost you a duplicate order. If a placement times out or fails mid-flight,
you do not know whether the order exists. Just repeat the request with the same clientOrderId: the
exchange reserves that id for the account for 48 hours, so the retry either places the order (if
the first attempt never landed) or answers with the order you already have — same response shape,
same order id, no error. A retry is indistinguishable from a first attempt, which is the point.
{ "id": "e2cd407c-28c8-4768-bd73-cd7357fbccde", "clientOrderId": "mm1-BTC_USDT-0001", "effectiveFeeMode": 1 }
Note that a repeat does not amend anything: the price and amount you send are ignored, and the
original order comes back untouched — including its fills. Use a fresh clientOrderId for a new
order, and cancel-then-place to change one.
Your own orders are recognisable. clientOrderId comes back on the order in /api/user/orders,
/api/orders/{orderId}/deals and /api/user/deals, and /api/user/orders?clientOrderId=... filters
by it — so a bot can cancel only what it placed, and leave orders entered by hand alone.
An id that breaks the character or length rule is rejected with InvalidClientOrderId.
Execution options
| Field | Default | Meaning |
|---|---|---|
postOnly | false | Maker-only. An order that would take liquidity on arrival is cancelled instead of executed, so a quote can never cross the book. Ignored for market orders. |
selfTradePrevention | 0 | What happens when the order would trade against another order of the same account. 0 — they match, as before. 1 — cancel the incoming order. 2 — cancel the resting order. 3 — cancel both. |
Self-trade prevention is read from both orders and the stricter intent wins, so a resting order that asked for protection keeps it against an incoming order that did not.
Version: v1
/api/orderbook
GET
Summary:
Get orderbook (40 bids + 40 asks)
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| currencyPairCode | query | currency pair code | No | string |
Responses
Json example:
[
{
"isBid": true,
"price": 0,
"amount": 0,
"quoteAmount": 0
}
]
| Code | Description |
|---|---|
| 200 | Success |
/api/orders/{orderId}/deals
GET
Summary:
Get user order info with deals
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| orderId | path | order GUID | Yes | string (uuid) |
| API-PublicKey | header | No | ||
| API-Signature | header | No |
Responses
Json example:
{
"deals": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"dealDateUtc": "2024-08-14T08:04:24.005Z",
"currencyPairCode": "string",
"volume": 0,
"price": 0,
"isBuy": true,
"isUserBuyer": true,
"orderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"id": "string",
"isBid": true,
"price": 0,
"clientOrderId": "mm1-BTC_USDT-0001",
"initialAmount": 0,
"amount": 0,
"amountExecuted": 0,
"remainingAmount": 0,
"quoteAmount": 0,
"date": "2024-08-14T08:04:24.005Z",
"userId": "string",
"isCanceled": true,
"status": "string",
"currencyPairCode": "string"
}
| Code | Description |
|---|---|
| 200 | Success |
Order amount fields
initialAmount— original order amount at creation time. Never changes.amountExecuted— amount that has been filled by matching deals.amount— legacy field kept for backwards compatibility. HoldsamountExecutedfor active orders and the unfilled remainder for canceled orders. PreferamountExecutedandinitialAmount - amountExecutedfor the unfilled remainder.
/api/user/orders
GET
Summary:
Get orders of user
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| currencyPairCode | query | currency pair code | No | string |
| status | query | "all" / "active" / "canceled" | No | string |
| clientOrderId | query | return only the order carrying this client order id | No | string |
| API-PublicKey | header | No | ||
| API-Signature | header | No |
Responses
Json example:
[
{
"id": "string",
"isBid": true,
"price": 0,
"clientOrderId": "mm1-BTC_USDT-0001",
"initialAmount": 0,
"amount": 0,
"amountExecuted": 0,
"remainingAmount": 0,
"quoteAmount": 0,
"date": "2024-08-14T08:20:24.024Z",
"userId": "string",
"isCanceled": true,
"status": "string",
"currencyPairCode": "string"
}
]
| Code | Description |
|---|---|
| 200 | Success |
/api/orders
POST
Summary:
Create Buy or Sell limit order
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| API-PublicKey | header | No | ||
| API-Signature | header | No |
Body
{
"side": "buy",
"currencyPairCode": "BTC_USDT",
"amount": 0.001,
"price": 45000
}
Responses
Response example:
"e2cd407c-28c8-4768-bd73-cd7357fbccde"
| Code | Description |
|---|---|
| 200 | Success |
DELETE
Summary:
Cancel all user orders.
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| currencyPairCode | query | currency pair code | No | string |
| API-PublicKey | header | No | ||
| API-Signature | header | No |
Responses
| Code | Description |
|---|---|
| 200 | Success |
/api/orders/{orderId}
DELETE
Summary:
Delete selected order
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| orderId | path | order id | Yes | string (uuid) |
| API-PublicKey | header | No | ||
| API-Signature | header | No |
Responses
| Code | Description |
|---|---|
| 200 | Success |