跳到主要内容

Orders

Real time information about client’s orders. There are three types of events: "place", "trade", and "canceled".

Stream Response FieldData TypeDescription
symbolStringsymbol name
typeStringMARKET, LIMIT, LIMIT_MAKER
quantityStringnumber of base units for this order
orderIdStringorder id
tradeFeeStringfee amount for the trade
clientOrderIdStringuser specified id
accountTypeStringSPOT
feeCurrencyStringfee currency name
eventTypeStringplace, trade, canceled
sourceStringWEB, APP, API
sideStringBUY, SELL
filledQuantityStringbase units filled in this order
filledAmountStringquote units filled in this order
matchRoleStringMAKER, TAKER
stateStringNEW, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, PARTIALLY_CANCELED, CANCELED, FAILED
tradeTimeLongtime the trade was executed
tradeAmountStringnumber of quote units for a trade
orderAmountStringnumber of quote units for this order
createTimeLongtime the record was created
priceStringset price of the order
tradeQtyStringnumber of base units for a trade
tradePriceStringprice of the trade
tradeIdStringid of the trade
tsLongtime the record was pushed
Example:
# --> Request
{
"event": "subscribe",
"channel": ["orders"],
"symbols": ["all"]
}

# <-- Receipt Confirmation
{
"channel": "orders",
"event": "subscribe"
}

# <-- Stream
{
"channel": "orders",
"data": [
{
"symbol": "BTC_USDT",
"type": "LIMIT",
"quantity": "1",
"orderId": "32471407854219264",
"tradeFee": "0",
"clientOrderId": "",
"accountType": "SPOT",
"feeCurrency": "",
"eventType": "place",
"source": "API",
"side": "BUY",
"filledQuantity": "0",
"filledAmount": "0",
"matchRole": "MAKER",
"state": "NEW",
"tradeTime": 0,
"tradeAmount": "0",
"orderAmount": "0",
"createTime": 1648708186922,
"price": "47112.1",
"tradeQty": "0",
"tradePrice": "0",
"tradeId": "0",
"ts": 1648708187469
}
]
}

# Unsubscribe from specific symbols

# --> Request
{
"event": "unsubscribe",
"channel": ["orders"],
"symbols": [
"btc_usdt",
"eth_usdt"
]
}

# <-- Receipt Confirmation
{
"event": "unsubscribe"
"channel": "orders",
"symbols": [
"btc_usdt",
"eth_usdt"
]
}