Endpoints
- WebSocket (WSS):
wss://lively-dust-7404.lively-fog-f2d9.workers.dev/coingecko - HTTP (Validation):
https://lively-dust-7404.lively-fog-f2d9.workers.dev/coingecko/validate
Authentication
- Include the
X-API-KEYheader in both validation and connection requests.
Workflow
- Validate the request with the HTTP endpoint.
- Connect to the WSS endpoint.
- Send your CoinGecko message payload after the connection is established.
Connection heartbeat
CoinGecko requires a heartbeat to keep the stream open and detect idle connections:- Server ping: CoinGecko sends a ping frame every 10 seconds.
- Client pong: Your client must respond with a pong frame within 20 seconds.
- Termination: If no pong is received within that 20-second window, the connection is closed automatically.
- Library behavior: Most WebSocket libraries handle ping/pong control frames automatically, but you should verify your client is not blocking or suppressing them.
CoinGecko uses different message types than standard JSON-RPC-style WebSocket
flows. Refer to the official
CoinGecko WebSocket documentation for the
expected message formats.
Example validation request
Pricing
Responses are billed using the shared WebSocket pricing formula:0.1 CU * 3181.819per response returned