> ## 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.

# Pool OHLCV chart by Pool Address

> This endpoint allows you to **get the OHLCV chart (Open, High, Low, Close, Volume) of a pool based on the provided pool address on a network**

<Tip>
  ### Tips

  * You may use this endpoint to query the historical price and volume of a token.
  * You may select the timeframe with its respective aggregate to get the intended OHLCV data (e.g. `minute?aggregate=15` for 15 minutes OHLCV).
</Tip>

<Note>
  ### Note

  * This endpoint uses epoch/unix format for its timestamp. Example: `1708850449`.
  * [Paid plan](https://www.coingecko.com/en/api/pricing) subscribers (Analyst plan & above) can access data from **September 2021 to the present**, depending on when the pool started tracking on GeckoTerminal.
    * If no earlier data is available, an empty response will be returned.
    * Each API call can only retrieve data for a **maximum range of 6 months**. To fetch older data, use the `before_timestamp` parameter to query in multiple requests.
  * Each OHLCV array (under "ohlcv\_list") consists of 6 elements in the following order:
    * Timestamp: The epoch/unix timestamp representing the start of the time interval.
    * Open: The opening price of the asset at the beginning of the interval.
    * High: The highest price reached during the interval.
    * Low: The lowest price reached during the interval.
    * Close: The price of the asset at the end of the interval.
    * Volume: The total trading volume of the asset during the interval.
  * **Skipped Intervals**: To ensure concise and relevant data, specific timeframe intervals (e.g. minutely) with no recorded swaps are **excluded** from the response.
    * Higher granularity timeframes (e.g. 1 minute) are more likely to skip intervals due to periods of inactivity, while lower granularity timeframes (e.g. daily) are less affected.
  * For `include_empty_intervals` param:
    * When `false` (default): Only intervals with trade data are returned.
    * When `true`: All requested intervals are returned, those with no trade data are populated as follows:
      * OHLC (Open, High, Low, Close) are all set to the Close price of the previous interval.
        * *O = H = L = C = previous Close*
      * Volume (V) is set to 0, reflecting no trade activity.
  * Cache / Update Frequency: every 10 seconds for Pro API (Basic, Analyst, Lite, Pro, Enterprise).
</Note>


## OpenAPI

````yaml api-reference/onchain-pro.json get /networks/{network}/pools/{pool_address}/ohlcv/{timeframe}
openapi: 3.0.0
info:
  title: Onchain DEX API (Pro)
  version: 3.0.0
servers:
  - url: https://pro-api.coingecko.com/api/v3/onchain
security:
  - apiKeyAuth: []
  - apiKeyQueryParam: []
paths:
  /networks/{network}/pools/{pool_address}/ohlcv/{timeframe}:
    get:
      tags:
        - OHLCV
      summary: Pool OHLCV chart by Pool Address
      description: >-
        This endpoint allows you to **get the OHLCV chart (Open, High, Low,
        Close, Volume) of a pool based on the provided pool address on a
        network**
      operationId: pool-ohlcv-contract-address
      parameters:
        - name: network
          in: path
          description: |-
            network ID 
             *refers to [/networks](/reference/networks-list)
          required: true
          schema:
            type: string
            example: eth
            default: eth
        - name: pool_address
          in: path
          description: pool contract address
          required: true
          schema:
            type: string
            example: '0x06da0fd433c1a5d7a4faa01111c044910a184553'
            default: '0x06da0fd433c1a5d7a4faa01111c044910a184553'
        - name: timeframe
          in: path
          description: timeframe of the OHLCV chart
          required: true
          schema:
            type: string
            enum:
              - day
              - hour
              - minute
              - second
        - name: aggregate
          in: query
          required: false
          description: |-
            time period to aggregate each OHLCV 
             Available values (day): `1` 
             Available values (hour): `1` , `4` , `12` 
             Available values (minute): `1` , `5` , `15` 
             Available values (second): `1`, `15`, `30` 
             Default value: 1
          schema:
            type: string
        - name: before_timestamp
          in: query
          required: false
          description: >-
            return OHLCV data before this timestamp (integer seconds since
            epoch)
          schema:
            type: integer
        - name: limit
          in: query
          required: false
          description: |-
            number of OHLCV results to return, maximum 1000 
             Default value: 100
          schema:
            type: integer
        - name: currency
          in: query
          required: false
          description: |-
            return OHLCV in USD or quote token 
             Default value: usd
          schema:
            type: string
            enum:
              - usd
              - token
        - name: token
          in: query
          required: false
          description: |-
            return OHLCV for token 
             use this to invert the chart 
             Available values: 'base', 'quote' or token address 
             Default value: 'base'
          schema:
            type: string
            default: base
          examples:
            base:
              value: base
            quote:
              value: quote
            base_token_address:
              value: '0xdac17f958d2ee523a2206206994597c13d831ec7'
            quote_token_address:
              value: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
        - name: include_empty_intervals
          in: query
          required: false
          description: 'include empty intervals with no trade data, default: false'
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Get OHLCV data of a pool
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OHLCV'
components:
  schemas:
    OHLCV:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            type:
              type: string
            attributes:
              type: object
              properties:
                ohlcv_list:
                  type: array
                  items:
                    type: array
                    items:
                      type: number
        meta:
          type: object
          properties:
            base:
              type: object
              properties:
                name:
                  type: string
                symbol:
                  type: string
                coingecko_coin_id:
                  type: string
                address:
                  type: string
            quote:
              type: object
              properties:
                name:
                  type: string
                symbol:
                  type: string
                coingecko_coin_id:
                  type: string
                address:
                  type: string
      example:
        data:
          id: bc786a99-7205-4c80-aaa1-b9634d97c926
          type: ohlcv_request_response
          attributes:
            ohlcv_list:
              - - 1712534400
                - 3454.61590249189
                - 3660.85954963415
                - 3417.91885296256
                - 3660.85954963415
                - 306823.277031161
              - - 1712448000
                - 3362.60273217873
                - 3455.28884490954
                - 3352.95305060685
                - 3454.61590249189
                - 242144.864784184
              - - 1712361600
                - 3323.05578706056
                - 3391.19811016133
                - 3317.73497182435
                - 3362.60273217873
                - 273323.661682931
        meta:
          base:
            address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
            name: Wrapped Ether
            symbol: WETH
            coingecko_coin_id: weth
          quote:
            address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
            name: Tether USD
            symbol: USDT
            coingecko_coin_id: tether
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-cg-pro-api-key
    apiKeyQueryParam:
      type: apiKey
      in: query
      name: x_cg_pro_api_key

````