Subscription parameters
Format
{topic}@{listenKey},...
topic
examples:order
,trade
,balance
,position
,notify
listenKey
is obtained via/v1/user/listen-key
- Multiple subscriptions can be added in one request, separated by commas
Examples
Subscribe (multiple topics)
Subscribe
{
"method": "SUBSCRIBE",
"params": ["order@{listenKey}", "trade@{listenKey}", "balance@{listenKey}"],
"id": "sub-1"
}
Unsubscribe (single topic)
Unsubscribe
{
"method": "UNSUBSCRIBE",
"params": ["position@{listenKey}"],
"id": "unsub-1"
}
Note: Replace
{listenKey}
with the actual value. If you receiveinvalid_listen_key
, please request a new listenKey.