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.market | string | Market name |
order.margin_market | string | Margin market name, null for non-margin markets |
order.type | string | Order type, limit, market, maker_only, IOC or FOK |
order.side | string | Order side, buy or sell |
order.amount | string | Order amount |
order.price | string | Price |
order.unfilled_amount | string | The remaining unfilled amount |
order.filled_value | string | Filled value |
order.taker_fee_rate | string | Taker rate |
order.maker_fee_rate | string | Maker rate |
order.base_ccy_fee | string | Trading fee paid in base currency |
order.quote_ccy_fee | string | Trading fee paid in quote currency |
order.discount_ccy_fee | string | Trading fee paid mainly in CET |
order.last_filled_amount | string | Filled amount of the last transaction |
order.last_filled_price | string | Filled price of the last transaction |
order.client_id | string | User-defined id |
order.created_at | int | Order timestamp, unit: millisecond |
order.updated_at | int | Latest update timestamp, unit: millisecond |
- Example:
{
"method": "order.update",
"data": {
"event": "put",
"order": {
"order_id": 12750,
"market": "BTCUSDT",
"margin_market": "BTCUSDT",
"type": "limit",
"side": "buy",
"price": "5999.00",
"amount": "1.50000000",
"unfill_amount": "1.50000000",
"fill_value": "1.50000000",
"taker_fee_rate": "0.0001",
"maker_fee_rate": "0.0001",
"base_ccy_fee": "0.0001",
"quote_ccy_fee": "0.0001",
"discount_ccy_fee": "0.0001",
"last_fill_amount": "0",
"last_fill_price": "0",
"client_id": "buy1_1234",
"created_at": 1689152421692,
"updated_at": 1689152421692,
}
},
"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
}