Skip to main content

Orders

Order object

FieldMeaning
idOrder id assigned by the exchange.
clientOrderIdThe id you supplied when placing the order; absent if you supplied none.
statusSee Order status.
initialAmountThe amount the order was placed with, in base currency. Never changes.
amountExecutedAmount filled by trades so far, in base currency.
remainingAmountAmount still open. 0 for a filled order and for a cancelled one.
amountDeprecated, ambiguous. It carries the filled amount while the order is open and the unfilled remainder once it is cancelled. Use amountExecuted and remainingAmount.
priceLimit price.
quoteAmountinitialAmount * price, in quote currency.
isBidtrue for a buy order.
isCanceledWhether the order was cancelled.
currencyPairCodee.g. BTC_USDT.
datePlacement time, UTC.

Order status

StatusTerminalMeaning
CreatednoResting in the book, nothing filled.
PartiallyCompletednoResting, partially filled.
CompletedyesFully filled.
CanceledyesCancelled with nothing filled.
PartiallyExecutedAndCanceledyesCancelled after a partial fill.
DefaultNever 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

FieldDefaultMeaning
postOnlyfalseMaker-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.
selfTradePrevention0What 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
NameLocated inDescriptionRequiredSchema
currencyPairCodequerycurrency pair codeNostring
Responses

Json example:

[
{
"isBid": true,
"price": 0,
"amount": 0,
"quoteAmount": 0
}
]
CodeDescription
200Success

/api/orders/{orderId}/deals

GET

Summary:

Get user order info with deals

Parameters
NameLocated inDescriptionRequiredSchema
orderIdpathorder GUIDYesstring (uuid)
API-PublicKeyheaderNo
API-SignatureheaderNo
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"
}
CodeDescription
200Success

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. Holds amountExecuted for active orders and the unfilled remainder for canceled orders. Prefer amountExecuted and initialAmount - amountExecuted for the unfilled remainder.

/api/user/orders

GET

Summary:

Get orders of user

Parameters
NameLocated inDescriptionRequiredSchema
currencyPairCodequerycurrency pair codeNostring
statusquery"all" / "active" / "canceled"Nostring
clientOrderIdqueryreturn only the order carrying this client order idNostring
API-PublicKeyheaderNo
API-SignatureheaderNo
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"
}
]
CodeDescription
200Success

/api/orders

POST

Summary:

Create Buy or Sell limit order

Parameters
NameLocated inDescriptionRequiredSchema
API-PublicKeyheaderNo
API-SignatureheaderNo
Body
{
"side": "buy",
"currencyPairCode": "BTC_USDT",
"amount": 0.001,
"price": 45000
}
Responses

Response example:

 "e2cd407c-28c8-4768-bd73-cd7357fbccde"
CodeDescription
200Success

DELETE

Summary:

Cancel all user orders.

Parameters
NameLocated inDescriptionRequiredSchema
currencyPairCodequerycurrency pair codeNostring
API-PublicKeyheaderNo
API-SignatureheaderNo
Responses
CodeDescription
200Success

/api/orders/{orderId}

DELETE

Summary:

Delete selected order

Parameters
NameLocated inDescriptionRequiredSchema
orderIdpathorder idYesstring (uuid)
API-PublicKeyheaderNo
API-SignatureheaderNo
Responses
CodeDescription
200Success