> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coingecko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WebSocket

> Stream real-time crypto data with CoinGecko WebSockets

## Stream Real-Time Crypto Data with CoinGecko WebSockets

CoinGecko WebSocket API provides a persistent connection for real-time data streaming — receive market updates the moment they happen, without polling.

<Tip>
  CoinGecko WebSocket (Beta) is available for [paid plan](https://www.coingecko.com/en/api/pricing) customers (Analyst plan & above).

  * Analyst, Lite, Pro, and Pro+ self-serve plans include:
    * Max connections: 10 concurrent socket connections
    * Max subscriptions: 100 token or pool data subscriptions per channel, per socket
    * Channel access: all 4 channels
    * Credit charge: 0.1 credit per response returned, deducting from monthly API plan credits

  * **Enterprise plan** clients who want higher limits (max connections, max subscriptions, lower credit charge) — contact your Customer Success Manager.
</Tip>

<Note>
  CoinGecko WebSocket is a supplementary delivery mechanism for live data streaming. Currently in beta — excluded from the SLA applicable to the CoinGecko API Platform.
</Note>

<Card title="Share Feedback" icon="comment" href="https://forms.gle/gNE1Txc9FCV55s7ZA">
  Help us improve WebSocket — share your suggestions and feedback.
</Card>

### Channel & Data Support

| WebSocket Channel                                             | Channel Code | Details                                                      |
| ------------------------------------------------------------- | ------------ | ------------------------------------------------------------ |
| [CGSimplePrice](/websocket/cgsimpleprice)                     | C1           | Real-time coin prices, as seen on CoinGecko.com              |
| [OnchainSimpleTokenPrice](/websocket/onchainsimpletokenprice) | G1           | Real-time token prices, as seen on GeckoTerminal.com         |
| [OnchainTrade](/websocket/onchaintrade)                       | G2           | Real-time pool transactions, as seen on GeckoTerminal.com    |
| [OnchainOHLCV](/websocket/onchainohlcv)                       | G3           | Real-time OHLCV data for pools, as seen on GeckoTerminal.com |
| (More coming soon!)                                           |              |                                                              |

### Connection Handling

1. **Ping/Pong Mechanism:**
   * Server sends a ping every 10 seconds.
   * If no pong is received within 20 seconds, the connection is automatically closed.
   * Ensure your WebSocket client responds to pings with pongs — most libraries handle this automatically, but verify your implementation.

2. **Planned Disconnections (Deployments & Reboots):**
   * System reboots or deployments may temporarily disconnect active connections.
   * Your application should automatically reconnect on disconnection. Use exponential backoff to avoid overwhelming the server during widespread disconnections.

<Card title="Access WebSocket" icon="rocket" href="https://www.coingecko.com/en/api/pricing">
  Subscribe to an Analyst plan or above to start streaming real-time data.
</Card>
