Subscription

To get a data from the web socket, you need to subscribe to one or more topics.

To subscribe, you need to send a message of the following structure:

{
 "op":"subscribe",
 "args":["orderBook.ETHUSDC.1.50","trades.ETHUSDC"]
}

If a subscription is succeeded, you will get back:

{
"op":"subscribe",
"connectionId":"a1c7ca4f-cc11-4daf-b16b-596f3a630419",
"topics":[
    {"name":"orderBook.ETHUSDC.1.50","success":true},
    {"name":"trades.ETHUSDC","success":true}
]
}

To unsubscribe, use the following message structure.

{
 "op":"unsubscribe",
 "args":["orderBook.ETHUSDC.1.50","trades.ETHUSDC"]
}

Last updated