Skip to main content
WSS

Notes

  • Streams real-time OHLCV (Open, High, Low, Close, Volume) candlestick data by network and pool address.
  • Lookup format: network_id:pool_address (e.g. bsc:0x172fcd41e0913e95784454622d1c3724f546f849).
  • Interval options: 1s / 1m / 5m / 15m / 1h / 2h / 4h / 8h / 12h / 1d.
  • Stream based on base or quote token of a pool.
  • Find supported network IDs via Networks List.
  • Use Top Pools by Token Address to find the most liquid pool address.
  • Fields may return null when data is unavailable. Ensure your application handles null values.
Each unique combination of interval and token for a given pool counts as a distinct subscription towards your max subscription limit.
Update Frequency:
As fast as ~1 second for actively traded pools.

Data Payload


1. Establish Connection

You can also pass the key as a header: x-cg-pro-api-key: YOUR_KEY
Output:

2. Subscribe to OnchainOHLCV

Input:
Output:

3. Stream OHLCV Data

Input:
Output:
Streaming output:
Output keys may appear in any order.

4. Unsubscribe

Unsubscribe from a specific pool:
Unsubscribe from the channel entirely:

x_cg_pro_api_key
type:httpApiKey

CoinGecko API key

Subscribe to OnchainOHLCV
type:object

Subscribe to the OnchainOHLCV channel

Stream OnchainOHLCV Data
type:object

Set pools to receive OHLCV updates for

OnchainOHLCV Update
type:object

Real-time OHLCV candlestick update from server