WebSocket API
WebSocket API Real-time Data Subscription Service
This document describes the WebSocket subscription methods provided by the ChainStream DEX JavaScript SDK. Each method is a wrapper for the corresponding WebSocket API. For detailed parameter descriptions and return value structures, please click the corresponding API link.
Candles Data Subscription
Subscribe to Candles Data
Subscribe to token price candles data.
WebSocket API: Candles Data
Token Data Subscription
Subscribe to Token Stats
Subscribe to token market statistics.
WebSocket API: Token Stats
Subscribe to Token Trades
Subscribe to token trading events.
WebSocket API: Trade Events
Subscribe to Wallet Trade
Subscribe to wallet trading event.
WebSocket API: Wallet Trade Event
Subscribe to Token Holders
Subscribe to token holder statistics.
WebSocket API: Token Holders Statistics
Wallet Data Subscription
Subscribe to Wallet Balance
Subscribe to wallet balance information.
WebSocket API: Wallet Balance
Connection Management
Establish Connection
All subscription methods return an Unsubscribe
object that can be used to cancel the subscription:
For detailed parameter descriptions, data formats, and error handling, please refer to the WebSocket API Documentation.
Was this page helpful?