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

# Coin Market Chart Range

> Historical series for one coin between two explicit timestamps — note seconds in, milliseconds out.

Historical series for one coin between two explicit points in time. `from` and `to` are Unix timestamps in seconds, while the timestamps inside the response are in milliseconds — the two are not the same unit, which is the usual source of empty or misaligned results. Returns `prices`, `market_caps` and `total_volumes` as timestamp-and-value pairs; CoinGecko picks granularity from the window length. Use it to line a series up with a known event window. For a trailing window ending now, [`get_coingecko_coins_id_market_chart`](/docs/api-reference/coingecko/get_coingecko-coins-id-market-chart) takes a `days` count instead.


## OpenAPI

````yaml openapi/coingecko.json GET /coingecko/coins/{id}/market_chart/range
openapi: 3.0.3
info:
  title: CoinGecko API
  version: 1.0.0
  description: >-
    CoinGecko crypto market data routed through the AIsa gateway. Covers coin
    metadata, live and historical prices, OHLC, exchanges, tickers, categories,
    and trending search. Proxies the public CoinGecko v3 API at
    `https://api.coingecko.com/api/v3/`.
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /coingecko/coins/{id}/market_chart/range:
    get:
      summary: Coin Market Chart Range
      description: >-
        Historical series for one coin between two explicit points in time.
        `from` and `to` are Unix timestamps in seconds, while the timestamps
        inside the response are in milliseconds — the two are not the same unit,
        which is the usual source of empty or misaligned results. Returns
        `prices`, `market_caps` and `total_volumes` as timestamp-and-value
        pairs; CoinGecko picks granularity from the window length. Use it to
        line a series up with a known event window. For a trailing window ending
        now, `get_coingecko_coins_id_market_chart` takes a `days` count instead.
      operationId: get_coingecko_coins_id_market_chart_range
      parameters:
        - $ref: '#/components/parameters/CoinId'
        - $ref: '#/components/parameters/VsCurrency'
        - name: from
          in: query
          required: true
          description: Start UNIX timestamp (seconds).
          schema:
            type: integer
          example: 1713398400
        - name: to
          in: query
          required: true
          description: End UNIX timestamp (seconds).
          schema:
            type: integer
          example: 1713484800
        - name: precision
          in: query
          schema:
            type: string
          description: >-
            `full` or a value from `0` to `18` to specify decimal places for
            currency price values.
          example: '2'
      responses:
        '200':
          description: Same shape as `/coins/{id}/market_chart`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoinGeckoMarketChart'
        '401':
          description: >-
            CoinGecko plan restriction or authorization error returned by the
            upstream provider.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoinGeckoError'
components:
  parameters:
    CoinId:
      name: id
      in: path
      required: true
      description: >-
        CoinGecko coin ID (e.g., `bitcoin`, `ethereum`). Get the list via
        `/coins/list`.
      schema:
        type: string
      example: bitcoin
    VsCurrency:
      name: vs_currency
      in: query
      required: true
      description: >-
        Target currency for price (e.g., `usd`, `eur`, `btc`). See
        `/simple/supported_vs_currencies`.
      schema:
        type: string
        default: usd
  schemas:
    CoinGeckoMarketChart:
      type: object
      properties:
        prices:
          type: array
          items:
            type: array
            items:
              type: number
        market_caps:
          type: array
          items:
            type: array
            items:
              type: number
        total_volumes:
          type: array
          items:
            type: array
            items:
              type: number
      additionalProperties: true
    CoinGeckoError:
      type: object
      properties:
        status:
          type: object
          additionalProperties: true
        error:
          type: object
          additionalProperties: true
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: AISA API Key

````