Skip to main content

Getting started

The WebSocket API provides real-time updates on market data. As a bidirectional protocol, WebSocket delivers the fastest access to real-time data, enabling the development of responsive real-time applications.

General Considerations

  • To establish a connection with the TradeWatch WebSocket API, TLS with Server Name Indication (SNI) is required.

  • Messages exchanged through WebSocket are encoded in JSON format. To maintain accuracy, all decimal fields, including timestamps, are presented in quotes.

  • It's important to note that timestamps are not unique and should not be used as substitutes for IDs.

  • To ensure the client connection remains open, at least one item must be subscribed to.

  • For retrieving the list of pairs available for subscription via the WebSocket API, please refer to the REST API Available symbols methods.

  • The recommended reconnection behavior is to immediately attempt reconnection a few times if the WebSocket connection drops unexpectedly.