LogoLogo
  • Introduction
  • Get started
  • Trading Account
  • Signing
  • REST API
    • Account
      • Get Account Info
      • Get Positions
      • Get ABR payments
    • Market
      • Get Markets
      • Get Assets
      • Get Orderbook
    • Trade
      • Create Order
      • Cancel Order
      • Query order
      • List historical orders
      • List active orders
      • Trade list
    • Time
  • Web Sockets
    • Authentication
    • Connectivity check
    • Subscription
    • Public topics
      • trade
      • marketInfo
      • orderBook
      • accountCreated
      • kline
    • Private topics
      • conditionalOrder
      • balance
      • order
      • fill
  • Glossary
Powered by GitBook
On this page
  1. Web Sockets

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"]
}
PreviousConnectivity checkNextPublic topics

Last updated 1 year ago