CoinGecko OHLCV API

Open, High, Low, Close, Volume candlestick chart data for liquidity pools.

Operations 1

GET /onchain/networks/{network}/pools/{pool_address}/ohlcv/{timeframe} Get pool OHLCV chart data #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/coingecko-ohlcv-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

coingecko-ohlcv-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CoinGecko Onchain DEX OHLCV API
  description: The CoinGecko Onchain DEX API, powered by GeckoTerminal, provides access to real-time decentralized exchange data across over 250 blockchain networks, 1,800 DEXes, and 30 million tokens.
  version: 3.0.1
  contact:
    name: CoinGecko Support
    url: https://support.coingecko.com
  termsOfService: https://www.coingecko.com/en/terms
servers:
- url: https://pro-api.coingecko.com/api/v3
  description: CoinGecko Pro API Server (paid plans)
- url: https://api.coingecko.com/api/v3
  description: CoinGecko Demo API Server (free tier, limited endpoints)
security:
- proApiKeyHeader: []
- proApiKeyQuery: []
- demoApiKeyHeader: []
- demoApiKeyQuery: []
tags:
- name: OHLCV
  description: Open, High, Low, Close, Volume candlestick chart data for liquidity pools.
paths:
  /onchain/networks/{network}/pools/{pool_address}/ohlcv/{timeframe}:
    get:
      operationId: getOnchainPoolOHLCV
      summary: Get pool OHLCV chart data
      description: Get OHLCV (Open, High, Low, Close, Volume) candlestick chart data for a specific liquidity pool. Supports daily, hourly, and minutely timeframes with various aggregation periods.
      tags:
      - OHLCV
      parameters:
      - $ref: '#/components/parameters/networkId'
      - name: pool_address
        in: path
        required: true
        description: The pool contract address
        schema:
          type: string
      - name: timeframe
        in: path
        required: true
        description: OHLCV timeframe granularity
        schema:
          type: string
          enum:
          - day
          - hour
          - minute
      - name: aggregate
        in: query
        description: Aggregation period. For day timeframe (1). For hour timeframe (1, 4, 12). For minute timeframe (1, 5, 15).
        schema:
          type: integer
      - name: before_timestamp
        in: query
        description: Return data before this UNIX timestamp
        schema:
          type: integer
      - name: limit
        in: query
        description: Number of OHLCV data points to return (max 1000)
        schema:
          type: integer
          maximum: 1000
          default: 100
      - name: currency
        in: query
        description: Price currency (usd or token)
        schema:
          type: string
          enum:
          - usd
          - token
          default: usd
      - name: token
        in: query
        description: Which token to use for price (base or quote). Only applicable when currency is token.
        schema:
          type: string
          enum:
          - base
          - quote
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          ohlcv_list:
                            type: array
                            description: OHLCV data as arrays of [timestamp, open, high, low, close, volume]
                            items:
                              type: array
                              items:
                                type: number
                              minItems: 6
                              maxItems: 6
                  meta:
                    type: object
                    properties:
                      base:
                        type: object
                        properties:
                          address:
                            type: string
                          coingecko_coin_id:
                            type: string
                      quote:
                        type: object
                        properties:
                          address:
                            type: string
                          coingecko_coin_id:
                            type: string
        '404':
          description: Pool not found
components:
  parameters:
    networkId:
      name: network
      in: path
      required: true
      description: The blockchain network identifier (e.g., eth, bsc, polygon_pos, solana, arbitrum, avalanche, base)
      schema:
        type: string
  securitySchemes:
    proApiKeyHeader:
      type: apiKey
      in: header
      name: x-cg-pro-api-key
      description: CoinGecko Pro API key passed via request header.
    proApiKeyQuery:
      type: apiKey
      in: query
      name: x_cg_pro_api_key
      description: CoinGecko Pro API key passed via query string parameter.
    demoApiKeyHeader:
      type: apiKey
      in: header
      name: x-cg-demo-api-key
      description: CoinGecko Demo API key for free tier access to limited onchain endpoints.
    demoApiKeyQuery:
      type: apiKey
      in: query
      name: x_cg_demo_api_key
      description: CoinGecko Demo API key passed via query string parameter.
externalDocs:
  description: CoinGecko Onchain DEX API Documentation
  url: https://docs.coingecko.com/reference/endpoint-overview