Our WebSocket API provides real-time price data, allowing you to subscribe and receive price updates for one or many assets. To manage your subscriptions, you'll need to send structured messages over your established WebSocket connection. Below are the details on subscribing to and unsubscribing from price updates on specified asset_ids.
Subscribing to Price Updates
To start receiving real-time updates for a token, you need to send a subscription message over your WebSocket connection. The message should specify that you wish to subscribe ("action": "subscribe") to prices ("subscription_type": "Prades") for an array of asset IDs.
Here's the structure of the subscription message you should send:
Replace YourAssetID with the identifiers of the assets you are interested in. For example, if you want to subscribe to two tokens on BSC, your message might look like this: