Skip to main content

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.

CoinGecko API offers three ways to access crypto market data, each designed for different use cases. Pick the one that fits how your application consumes data — or combine them for maximum flexibility.
Diagram showing three data delivery methods: REST API uses HTTP request-response, WebSocket maintains a persistent connection, and Webhook sends event-driven HTTP callbacks

REST API — You ask, we answer

The classic request-response model. Your application sends an HTTP request, and the API returns the data you need. How it works: Send a GET request to an endpoint → receive a JSON response.
curl -X GET "https://pro-api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"

Best for

  • Fetching data on demand (prices, coin info, historical data)
  • Periodic polling on a schedule (e.g. every 60 seconds)
  • Backfilling or one-time data pulls
  • Prototyping and quick integrations

Available endpoints

  • 50+ endpoints on Demo & Basic plans
  • 80+ endpoints on Analyst plan & above
  • Covers prices, market data, exchanges, NFTs, onchain DEX data, and more
REST API is available on all plans, including the free Demo plan. View endpoints →

WebSocket — Stay connected, stream live

A persistent, two-way connection that pushes data to your application in real time. No repeated requests needed — once you subscribe, updates flow to you automatically. How it works: Open a WebSocket connection → subscribe to channels → receive continuous updates.

Best for

  • Live price tickers and trading dashboards
  • Real-time trade monitoring
  • Streaming OHLCV chart data
  • Any app where milliseconds matter

Available channels

  • C1 — CoinGecko price updates
  • G1 — Onchain token price updates
  • G2 — Onchain trade updates
  • G3 — Onchain OHLCV data
WebSocket is available on Analyst plan & above. View WebSocket docs →

Webhooks — We notify you when things change

Event-driven HTTP callbacks that push notifications to your server whenever specific data changes occur on CoinGecko — no polling required. How it works: Register a webhook URL → CoinGecko sends a POST request to your server when an event fires.

Best for

  • Keeping your database in sync with CoinGecko
  • Reacting to coin metadata changes (rebrands, new chains, alerts)
  • Compliance and risk monitoring
  • Replacing cron jobs with event-driven updates

Supported events

  • cg.coin.info.updated — triggers when coin info changes across all active coins
  • More event types coming soon
Webhooks are available on Analyst plan & above. View Webhook docs →

Quick comparison

REST APIWebSocketWebhook
CommunicationRequest → ResponsePersistent connectionEvent-driven callback
Data flowYou pull dataData pushed to youData pushed to you
LatencyPer-requestUltra-low (real-time)Near real-time
Use caseOn-demand queries, periodic pollingLive streaming, tradingReacting to data changes
Credit charge1 credit per call0.1 credit per response10 credits per notification

Plan access and pricing

REST APIWebSocket BETAWebhook NEW
Free Demo✅ (50+ endpoints)
Basic✅ (50+ endpoints)
Analyst & above✅ (80+ endpoints)
Enterprise✅ (80+ endpoints)
Credit charge1 credit per call0.1 credit per response10 credits per notification
Not sure which plan to choose? Check out the pricing page for a full breakdown.

Which method should you use?

Use REST API to fetch current prices and historical data on a schedule. If you need live price updates on a dashboard, add WebSocket for real-time streaming.
Use WebSocket for real-time price feeds and trade data. Supplement with REST API for reference data like coin metadata, market cap rankings, or historical OHLC.
Use Webhooks to receive push notifications when coin data changes, so you don’t need to poll the API constantly. Use REST API to backfill or fetch full records on demand.
Start with REST API — it’s available on all plans (including the free Demo plan) and covers the widest range of data. You can add WebSocket or Webhooks later as your needs grow.