Skip to main content
WSS

Notes

  • Streams real-time price and market data for tokens by network and token address.
  • Returns data from the top pool of the specified token.
  • Lookup format: network_id:token_address (e.g. bsc:0x55d398326f99059ff775485246999027b3197955).
  • Find supported network IDs via Networks List.
  • Fields may return null when data is unavailable. Ensure your application handles null values.
Update Frequency:
As fast as ~1 second for actively traded tokens.

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 OnchainSimpleTokenPrice

Input:
Output:

3. Stream Token Price Data

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

4. Unsubscribe

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

x_cg_pro_api_key
type:httpApiKey

CoinGecko API key

Subscribe to OnchainSimpleTokenPrice
type:object

Subscribe to the OnchainSimpleTokenPrice channel

Stream OnchainSimpleTokenPrice Data
type:object

Set tokens to receive price updates for

OnchainSimpleTokenPrice Update
type:object

Real-time onchain token price update from server