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

# Historical

> Retrieves the historical (time series) open-high-low-close for the specified pair. Includes data for  exchanges depending on where the pair is traded.
Base & Quote information is using the first and second asset in a pool/pair, which is the represented price.



## OpenAPI

````yaml get /ohlcv/{pool}/historical/
openapi: 3.1.0
info:
  title: Defi Market API
  version: '2'
servers:
  - url: https://api.amberdata.com/market/defi
security:
  - sec0: []
paths:
  /ohlcv/{pool}/historical/:
    get:
      summary: Historical
      description: >-
        Retrieves the historical (time series) open-high-low-close for the
        specified pair. Includes data for  exchanges depending on where the pair
        is traded.

        Base & Quote information is using the first and second asset in a
        pool/pair, which is the represented price.
      operationId: defi-ohlcv-historical
      parameters:
        - name: pool
          in: path
          description: >-
            The pool to retrieve the most current data. Can be the pool/pair
            symbols or address.
          schema:
            type: string
            default: DAI_WETH
          required: true
        - name: exchange
          in: query
          description: >-
            The exchange(s) for which to retrieve OHLCV. Example:
            exchange=uniswapv2, uniswapv3
          schema:
            type: string
        - name: startDate
          in: query
          description: FIlter by pairs after this date.
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          description: FIlter by pairs before this date.
          schema:
            type: string
            format: date-time
        - name: timeInterval
          in: query
          description: >-
            **[Optional]** Time interval.<BR/>**[Defaults]** `minutes | hours |
            days*`
          schema:
            type: string
        - name: timeFormat
          in: query
          description: >-
            **[Optional]** Time format of the timestamps in the return
            payload.<BR/>**[Defaults]** `milliseconds | ms* | iso | iso8601 | hr
            | human_readable`
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                    description: HTTP status code
                  title:
                    type: string
                    example: OK
                    description: Status title
                  description:
                    type: string
                    example: Successful request
                    description: Status description
                  payload:
                    type: object
                    properties:
                      metadata:
                        type: object
                        properties:
                          columns:
                            type: array
                            items:
                              type: string
                            example:
                              - timestamp
                              - open
                              - high
                              - low
                              - close
                              - volume
                              - quoteVolume
                              - trades
                              - exchangeId
                              - pairAddress
                              - baseAddress
                              - quoteAddress
                            description: Column names for the data arrays
                          startDate:
                            type: integer
                            format: int64
                            example: 1727904832187
                            description: Start date in milliseconds since epoch
                          endDate:
                            type: integer
                            format: int64
                            example: 1759527232187
                            description: End date in milliseconds since epoch
                      data:
                        type: object
                        additionalProperties:
                          type: array
                          items:
                            type: array
                            items:
                              oneOf:
                                - type: integer
                                - type: string
                            minItems: 12
                            maxItems: 12
                            description: >-
                              Array containing [timestamp, open, high, low,
                              close, volume, quoteVolume, trades, exchangeId,
                              pairAddress, baseAddress, quoteAddress]
                        description: Trading data indexed by pair address
                        example:
                          '0x10d05e057cb1ee7eac0559aa7f09bf06f44fd718':
                            - - 1727913600000
                              - '0.0004105818335350145800011301445552145'
                              - '0.0004105818335350145800011301445552145'
                              - '0.0004105818335350145800011301445552145'
                              - '0.0004105818335350145800011301445552145'
                              - '6.3820423846392694'
                              - >-
                                0.0026203506639833680000000000000000002340430932402863
                              - '1'
                              - '0x10d05e057cb1ee7eac0559aa7f09bf06f44fd718'
                              - '0x05f4e094c8f77d001a05dc7ffef208ccbea47079'
                              - '0x6b175474e89094c44da98b954eedeac495271d0f'
                              - '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      x-default: API_KEY
      name: x-api-key

````