Skip to main content
WSS

Notes

  • Streams real-time prices for one or more coins by their unique Coin API IDs.
  • Specify preferred quote currencies via vs_currencies in the subscription data. See Supported Currencies for valid values. Defaults to USD.
  • Find a coin’s API ID on its CoinGecko page, via Coins List, or this Google Sheet.
  • Fields may return null when data is unavailable. Ensure your application handles null values.
Update Frequency:
As fast as ~10 seconds for large-cap and actively traded coins.

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 CGSimplePrice

Input:
Output:

3. Stream 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 CGSimplePrice
type:object

Subscribe to the CGSimplePrice channel

Stream CGSimplePrice Data
type:object

Set coins to receive price updates for

CGSimplePrice Update
type:object

Real-time coin price update from server