User Order Subscription
Reminder
- Before using this endpoint, please call the "server.sign" method for signature authorization.
- The push delay of this method is: real-time
User Order Subscription
- Method:
order.subscribe
- Parameters:
Parameter Name | Required | Type | Notes |
---|---|---|---|
market_list | true | []string | Market list. Empty list to subscribe to all markets. |
- Example:
// Subscribe to a singular market
{
"method": "order.subscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}
// Subscribe to multiple markets
{
"method": "order.subscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT"]},
"id": 1
}
// Subscribe to all markets
{
"method": "order.subscribe",
"params": {"market_list": []},
"id": 1
}
User Order Update Push
- Method:
order.update
- Parameters:
Parameter Name | Type | Notes |
---|---|---|
event | string | Order update event type |
order | object | Order data |
order.order_id | int | Order id |
order.stop_id | int | Related stop order id |
order.market | string | Market name |
order.side | string | Order side, buy or sell |
order.type | string | Order type, limit, market, GTC, IOC or FOK |
order.amount | string | Order amount |
order.price | string | Price |
order.unfilled_amount | string | The remaining unfilled amount |
order.filled_amount | string | Filled volume |
order.filled_value | string | Filled value |
order.client_id | string | User-defined id |
order.fee | string | Trading fee charged |
order.fee_ccy | string | Trading fee currency |
order.taker_fee_rate | string | Taker rate |
order.maker_fee_rate | string | Maker rate |
order.last_filled_amount | string | Filled amount of the last transaction |
order.last_filled_price | string | Filled price of the last transaction |
order.created_at | int | Order timestamp (millisecond) |
order.updated_at | int | Latest update timestamp (milliseconds) |
- Example:
{
"method": "order.update",
"data": {
"event": "put",
"order": {
"order_id": 98388656341,
"stop_id": 0,
"market": "BTCUSDT",
"side": "buy",
"type": "limit",
"amount": "0.0010",
"price": "50000.00",
"unfilled_amount": "0.0010",
"filled_amount": "0",
"filled_value": "0",
"fee": "0",
"fee_ccy": "USDT",
"taker_fee_rate": "0.00046",
"maker_fee_rate": "0.00000000000000000000",
"client_id": "",
"last_filled_amount": "0.0010",
"last_filled_price": "30721.35",
"created_at": 1689145715129,
"updated_at": 1689145715129
}
},
"id": null
}
Cancel Order Subscription
- Method:
order.unsubscribe
- Parameters:
Parameter Name | Required | Type | Notes |
---|---|---|---|
market_list | true | []string | Market list. Empty list to unsubscribe to all markets. |
- Example:
// Unsubscribe to a singular market
{
"method": "order.unsubscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}
// Unsubscribe to multiple markets
{
"method": "order.unsubscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT"]},
"id": 1
}
// Unsubscribe to all markets
{
"method": "order.unsubscribe",
"params": {"market_list": []},
"id": 1
}