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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Coin Historical Chart Data within Time Range by ID

> 返回单个币种在两个明确时间戳之间的历史序列——注意入参为秒、出参为毫秒。

返回单个币种在两个明确时间点之间的历史序列。`from` 和 `to` 为 Unix 秒级时间戳，而响应内部的时间戳单位为毫秒——两者单位不同，这是结果为空或错位的常见原因。返回 `prices`、`market_caps` 和 `total_volumes`，均为「时间戳，数值」二元组；CoinGecko 会根据窗口长度自动选择粒度。适合用于把序列对齐到某个已知事件窗口。如需截至当前的回溯窗口，[`get_coingecko_coins_id_market_chart`](https://aisa.one/docs/zh/api-reference/coingecko/get_coingecko-coins-id-market-chart) 改用 `days` 天数参数。

> [!NOTE]
>
> **第一次用？** 把任意 MCP 客户端指向 `https://mcp.aisa.one/mcp` —— Claude Code、
> Codex、Cursor、VS Code 都可以。鉴权走 OAuth：客户端打开浏览器，你点一次
> Allow，不需要粘贴任何 key。之后智能体通过几个元工具调用所有端点：
> `search`、`list_categories`、`get_details` 和 `batch_quote` 免费，`batch_use`
> 按次计费。各客户端的接入步骤见[通过 MCP 连接](https://aisa.one/docs/zh/agent-quickstart.md)；实时工具列表和
> 每次调用的价格见 [aisa.one/zh-cn/mcp](https://aisa.one/zh-cn/mcp#connect)。

[在你的 agent 里把这个端点跑起来 →](https://aisa.one/mcp?from=/zh/api-reference/coingecko/get_coingecko-coins-id-market-chart-range)

## 请求规范

* **方法与路径:** GET /apis/v1/coingecko/coins/\{id}/market\_chart/range
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/coingecko/coins/{id}/market_chart/range`
* **id:** path; 必填
* **from:** query; 必填
* **interval:** query; 可选
* **precision:** query; 可选
* **to:** query; 必填
* **vs\_currency:** query; 必填

[完整 OpenAPI 定义](https://aisa.one/docs/openapi/zh/coingecko.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "get_coingecko_coins_id_market_chart_range",
  "method": "GET",
  "path": "/apis/v1/coingecko/coins/{id}/market_chart/range",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "Coin ID. \n*refers to [`/coins/list`](/reference/coins-list).",
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "default": "bitcoin",
        "type": "string"
      }
    },
    {
      "description": "Starting date in ISO date string (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM`) or UNIX timestamp. \n**Use ISO date string for best compatibility.**",
      "in": "query",
      "name": "from",
      "required": true,
      "schema": {
        "default": "2025-12-22",
        "type": "string"
      }
    },
    {
      "description": "Data interval, leave empty for auto granularity.",
      "in": "query",
      "name": "interval",
      "required": false,
      "schema": {
        "enum": [
          "1m",
          "5m",
          "hourly",
          "daily"
        ],
        "type": "string"
      }
    },
    {
      "description": "Decimal place for currency price value.",
      "in": "query",
      "name": "precision",
      "required": false,
      "schema": {
        "enum": [
          "full",
          "0",
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10",
          "11",
          "12",
          "13",
          "14",
          "15",
          "16",
          "17",
          "18"
        ],
        "type": "string"
      }
    },
    {
      "description": "Ending date in ISO date string (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM`) or UNIX timestamp. \n**Use ISO date string for best compatibility.**",
      "in": "query",
      "name": "to",
      "required": true,
      "schema": {
        "default": "2025-12-31",
        "type": "string"
      }
    },
    {
      "description": "Target currency of market data. \n*refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies).",
      "in": "query",
      "name": "vs_currency",
      "required": true,
      "schema": {
        "default": "usd",
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

公开参考价格：每次成功请求 \$0.008 USD。 账户适用价格可能不同；支持报价的接口可按实际请求获取报价。


## OpenAPI

````yaml openapi/zh/coingecko.json GET /apis/v1/coingecko/coins/{id}/market_chart/range
openapi: 3.1.0
info:
  description: ''
  title: CoinGecko
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    coingecko:
      description: ''
      title: CoinGecko
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 2cebdc98d47ae0d3c355af637caf87081b8a62f7794a0c3667fcd49e4539823e
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/coingecko/api/{id}/volume_chart
    - /apis/v1/coingecko/coins/categories
    - /apis/v1/coingecko/coins/categories/list
    - /apis/v1/coingecko/coins/list
    - /apis/v1/coingecko/coins/markets
    - /apis/v1/coingecko/coins/{id}
    - /apis/v1/coingecko/coins/{id}/contract/{contract_address}
    - /apis/v1/coingecko/coins/{id}/contract/{contract_address}/market_chart
    - >-
      /apis/v1/coingecko/coins/{id}/contract/{contract_address}/market_chart/range
    - /apis/v1/coingecko/coins/{id}/history
    - /apis/v1/coingecko/coins/{id}/market_chart
    - /apis/v1/coingecko/coins/{id}/market_chart/range
    - /apis/v1/coingecko/coins/{id}/ohlc
    - /apis/v1/coingecko/coins/{id}/tickers
    - /apis/v1/coingecko/exchanges
    - /apis/v1/coingecko/exchanges/list
    - /apis/v1/coingecko/exchanges/{id}
    - /apis/v1/coingecko/exchanges/{id}/tickers
    - /apis/v1/coingecko/ping
    - /apis/v1/coingecko/search/trending
    - /apis/v1/coingecko/simple/price
    - /apis/v1/coingecko/simple/supported_vs_currencies
    - /apis/v1/coingecko/simple/token_price/{id}
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:907b027ae7bb3f1cda28caf6099bbb9f000d21ebbbcfc0cbd176a69f84296194
    facts_hash: 2cebdc98d47ae0d3c355af637caf87081b8a62f7794a0c3667fcd49e4539823e
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: coingecko
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/coingecko/coins/{id}/market_chart/range:
    get:
      tags:
        - default
      summary: Coin Historical Chart Data within Time Range by ID
      description: >-
        To get the historical chart data of a coin within certain time range in
        UNIX along with price, market cap and 24hrs volume based on particular
        coin ID


        This endpoint allows you to **get the historical chart data of a coin
        within certain time range in UNIX along with price, market cap and 24hr
        volume based on particular coin ID**
      operationId: get_coingecko_coins_id_market_chart_range
      parameters:
        - description: |-
            Coin ID. 
            *refers to [`/coins/list`](/reference/coins-list).
          in: path
          name: id
          required: true
          schema:
            default: bitcoin
            type: string
        - description: >-
            Starting date in ISO date string (`YYYY-MM-DD` or
            `YYYY-MM-DDTHH:MM`) or UNIX timestamp. 

            **Use ISO date string for best compatibility.**
          in: query
          name: from
          required: true
          schema:
            default: '2025-12-22'
            type: string
        - description: Data interval, leave empty for auto granularity.
          in: query
          name: interval
          required: false
          schema:
            enum:
              - 1m
              - 5m
              - hourly
              - daily
            type: string
        - description: Decimal place for currency price value.
          in: query
          name: precision
          required: false
          schema:
            enum:
              - full
              - '0'
              - '1'
              - '2'
              - '3'
              - '4'
              - '5'
              - '6'
              - '7'
              - '8'
              - '9'
              - '10'
              - '11'
              - '12'
              - '13'
              - '14'
              - '15'
              - '16'
              - '17'
              - '18'
            type: string
        - description: >-
            Ending date in ISO date string (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM`)
            or UNIX timestamp. 

            **Use ISO date string for best compatibility.**
          in: query
          name: to
          required: true
          schema:
            default: '2025-12-31'
            type: string
        - description: >-
            Target currency of market data. 

            *refers to
            [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies).
          in: query
          name: vs_currency
          required: true
          schema:
            default: usd
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                market_caps:
                  - - 1779027899041
                    - 1560631481361.8042
                  - - 1779028199661
                    - 1562027330524.267
                prices:
                  - - 1779027899041
                    - 77953.82550382407
                  - - 1779028199661
                    - 78052.87543398788
                total_volumes:
                  - - 1779027899041
                    - 18688431751.857048
                  - - 1779028199661
                    - 18974828816.446976
              schema:
                $ref: '#/components/schemas/Response39E58Aba19F7_CoinsMarketChart'
          description: Coin historical chart data within time range
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    Response39E58Aba19F7_CoinsMarketChart:
      properties:
        market_caps:
          description: Market cap data points as [timestamp, market_cap] pairs
          items:
            items:
              type: number
            type: array
          type: array
        prices:
          description: Price data points as [timestamp, price] pairs
          items:
            items:
              type: number
            type: array
          type: array
        total_volumes:
          description: Total volume data points as [timestamp, volume] pairs
          items:
            items:
              type: number
            type: array
          type: array
      required:
        - prices
        - market_caps
        - total_volumes
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.