Our WebSocket API provides real-time candlestick data, enabling you to track market trends with high granularity. To receive updates for candlestick data, you will need to subscribe to a specific interval and pair. Here's how you can manage your candlestick data subscriptions:
Subscribing to Candlestick Updates
To receive real-time candlestick data, send a subscription request over your WebSocket connection. Your message should specify the desire to subscribe ("action": "subscribe"), indicate the type of subscription ("subscription_type": "Candles"), and provide the necessary details like the interval, pair_id, and asset_id.
If you wish to stop receiving candlestick data, you can unsubscribe by sending a message similar to the subscription request but with the action set to "unsubscribe":
Replace the placeholders with the same details you used to subscribe.
Receiving Candlestick Data
Once subscribed, you will receive the most recent candlestick data in real time. The messages follow this format: