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

# 加密货币历史数据

> 某种代币在指定日期的历史快照（价格、市值、交易量）。



## OpenAPI

````yaml openapi/zh/coingecko.json GET /coingecko/coins/{id}/history
openapi: 3.0.3
info:
  title: CoinGecko API
  version: 1.0.0
  description: >-
    通过 AIsa 网关路由的 CoinGecko 加密货币市场数据。涵盖代币元数据、实时和历史价格、OHLC、交易所、行情代码、类别及热门搜索。代理位于
    `https://api.coingecko.com/api/v3/` 的公共 CoinGecko v3 API。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /coingecko/coins/{id}/history:
    get:
      summary: 加密货币历史数据
      description: 某种代币在指定日期的历史快照（价格、市值、交易量）。
      operationId: coingeckoCoinHistory
      parameters:
        - $ref: '#/components/parameters/CoinId'
        - name: date
          in: query
          required: true
          description: 日期采用 `dd-mm-yyyy` 格式。
          schema:
            type: string
          example: 30-12-2024
        - name: localization
          in: query
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: 给定日期的快照对象。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoinGeckoObject'
        '401':
          description: 上游提供商返回的 CoinGecko 套餐限制或授权错误。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoinGeckoError'
components:
  parameters:
    CoinId:
      name: id
      in: path
      required: true
      description: CoinGecko 代币 ID（例如 `bitcoin`、`ethereum`）。通过 `/coins/list` 获取列表。
      schema:
        type: string
      example: bitcoin
  schemas:
    CoinGeckoObject:
      type: object
      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

````