GDAX, the professional digital asset trading platform from San Francisco-headquartered Coinbase has announced the launch of its new WebSocket Streaming API, an easy way to monitor real-time market data from GDAX.
Previously, GDAX only provided a full data feed, which required high bandwidth and prevented users from monitoring select market data.
With the new Streaming API, users can now: subscribe to a ticker channel to receive real-time pricing data, connect to a level 2 channel to maintain a copy of the order book, and join the user channel to listen to messages related to individual accounts.
Real-time market data updates provide the fastest insight into order flow and trades. This, however, means that users are responsible for reading the message stream and using the message relevant to wanted needs which can include building real-time order books or tracking real-time trades.
The WebSocket feed is publicly available, but connections to it are rate-limited to 1 per 4 seconds per IP.
- The WebSocket feed uses a bidirectional protocol, which encodes all messages as JSON objects. All messages have a type attribute that can be used to handle the message appropriately.
- New message types can be added at any point in time. Clients are expected to ignore messages they do not support.
- Error messages: Most failure cases will cause an error message (a message with the type “error”) to be emitted. This can be helpful for implementing a client or debugging issues.
Doing more to assist users, last week GDAX introduced an open source trading toolkit, to build automated trading and other crypto trading based applications.