Orders
Real time information about client’s orders. There are three types of events: "place"
, "trade"
, and "canceled"
.
Stream Response Field | Data Type | Description |
---|---|---|
symbol | String | symbol name |
type | String | MARKET, LIMIT, LIMIT_MAKER |
quantity | String | number of base units for this order |
orderId | String | order id |
tradeFee | String | fee amount for the trade |
clientOrderId | String | user specified id |
accountType | String | SPOT |
feeCurrency | String | fee currency name |
eventType | String | place, trade, canceled |
source | String | WEB, APP, API |
side | String | BUY, SELL |
filledQuantity | String | base units filled in this order |
filledAmount | String | quote units filled in this order |
matchRole | String | MAKER, TAKER |
state | String | NEW, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, PARTIALLY_CANCELED, CANCELED, FAILED |
tradeTime | Long | time the trade was executed |
tradeAmount | String | number of quote units for a trade |
orderAmount | String | number of quote units for this order |
createTime | Long | time the record was created |
price | String | set price of the order |
tradeQty | String | number of base units for a trade |
tradePrice | String | price of the trade |
tradeId | String | id of the trade |
ts | Long | time 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"
]
}