Skip to main content

User Transaction Subscription

Reminder

Before using this endpoint, please call the "server.sign" method for signature authorization.

Info
  • The push delay of this method is: real-time

User Transaction Subscription

  • Method: user_deals.subscribe
  • Parameters:
Parameter NameRequiredTypeNotes
market_listtrue[]stringMarket 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 NameTypeNotes
deal_idintTxid
created_atintTransaction timestamp, millisecond
marketstringMarket name
sidestringBuy or sell
order_idintOrder id
client_idstringClient ID
margin_marketstringMargin market, null for non-margin markets
pricestringFilled price
amountstringFilled volume
rolestringTaker or maker
feestringTrading fee charged
fee_ccystringTrading fee currency
  • Example:
{
"method": "user_deals.update",
"data": {
"deal_id": 3514376759,
"created_at": 1689152421692,
"market": "BTCUSDT",
"side": "buy",
"order_id": 8678890,
"client_id": "client_id_1",
"margin_market": "BTCUSDT",
"price": "30718.42",
"amount": "0.00000325",
"role": "taker",
"fee": "0.0299",
"fee_ccy": "USDT"
},
"id": null
}

Cancel User Transaction Subscription

  • Method: user_deals.unsubscribe
  • Parameters:
Parameter NameRequiredTypeNotes
market_listtrue[]stringMarket 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
}