User Transaction 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 Transaction Subscription
- Method:
user_deals.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": "user_deals.subscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}
// Subscribe to multiple markets
{
"method": "user_deals.subscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT"]},
"id": 1
}
// Subscribe to all markets
{
"method": "user_deals.subscribe",
"params": {"market_list": []},
"id": 1
}
User Transaction Push
- Method:
user_deals.update
- Parameters:
Parameter Name | Type | Notes |
---|---|---|
deal_id | int | Txid |
created_at | int | Transaction timestamp (millisecond) |
order_id | int | Related order id |
client_id | string | Client ID |
position_id | int | Position ID |
market | string | Market name |
side | string | Buy or sell |
price | string | Filled price |
amount | string | Filled volume |
role | string | Taker or maker |
fee | string | Trading fee charged |
fee_ccy | string | Trading fee currency |
- Example:
{
"method": "user_deals.update",
"data": {
"deal_id": 123456789,
"created_at": 1689152421692,
"order_id": 12345678,
"client_id": "client_id_1",
"position_id": 927266133,
"market": "BTCUSDT",
"side": "buy",
"price": "30718.42",
"amount": "0.123",
"role": "taker",
"fee": "0.0299",
"fee_ccy": "USDT",
},
"id": null
}
Cancel User Transaction Subscription
- Method:
user_deals.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": "user_deals.unsubscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}
// Unsubscribe to multiple markets
{
"method": "user_deals.unsubscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT"]},
"id": 1
}
// Unsubscribe to all markets
{
"method": "user_deals.unsubscribe",
"params": {"market_list": []},
"id": 1
}