> ## 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 OHLC Chart by ID

> Candlestick rows for one coin — timestamp, open, high, low and close, with no field names.

Candlestick data for one coin as a bare array of rows, each row positional: timestamp in milliseconds, then open, high, low and close. There are no field names in the response and no volume. Candle width is derived from `days`, which is required. Use it for candle or technical analysis. For a price line together with market cap and traded volume use [`get_coingecko_coins_id_market_chart`](https://aisa.one/docs/api-reference/coingecko/get_coingecko-coins-id-market-chart) instead.

> [!NOTE]
>
> **First time?** Point any MCP client at `https://mcp.aisa.one/mcp` — Claude
> Code, Codex, Cursor, VS Code and the rest. Authorization is OAuth: the client
> opens a browser, you click Allow once, and there is no key to paste. Your
> agent then reaches every endpoint through a few meta tools: `search`,
> `list_categories`, `get_details` and `batch_quote` are free, `batch_use` is
> billed per call. Setup per client is in
> [Connect via MCP](https://aisa.one/docs/agent-quickstart.md); the live tool list and what each call
> costs are on [aisa.one/mcp](https://aisa.one/mcp#connect).

[Set this endpoint up in your agent →](https://aisa.one/mcp?from=/api-reference/coingecko/get_coingecko-coins-id-ohlc)

## Request contract

* **Method and path:** GET /apis/v1/coingecko/coins/\{id}/ohlc
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/coingecko/coins/{id}/ohlc`
* **id:** path; required
* **days:** query; required
* **interval:** query; optional
* **precision:** query; optional
* **vs\_currency:** query; required

[Complete OpenAPI definition](https://aisa.one/docs/openapi/coingecko.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "get_coingecko_coins_id_ohlc",
  "method": "GET",
  "path": "/apis/v1/coingecko/coins/{id}/ohlc",
  "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": "Data up to number of days ago.",
      "in": "query",
      "name": "days",
      "required": true,
      "schema": {
        "default": "1",
        "enum": [
          "1",
          "7",
          "14",
          "30",
          "90",
          "180",
          "365",
          "max"
        ],
        "type": "string"
      }
    },
    {
      "description": "Data interval, leave empty for auto granularity.",
      "in": "query",
      "name": "interval",
      "required": false,
      "schema": {
        "enum": [
          "daily",
          "hourly"
        ],
        "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": "Target currency of price 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"
      }
    }
  }
}
```

## Cost and request rules

Published reference price: \$0.008 USD per successful request. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi/coingecko.json GET /apis/v1/coingecko/coins/{id}/ohlc
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}/ohlc:
    get:
      tags:
        - default
      summary: Coin OHLC Chart by ID
      description: >-
        To get the OHLC chart (Open, High, Low, Close) of a coin based on
        particular coin ID


        This endpoint allows you to **get the OHLC chart (Open, High, Low,
        Close) of a coin based on particular coin ID**
      operationId: get_coingecko_coins_id_ohlc
      parameters:
        - description: |-
            Coin ID. 
            *refers to [`/coins/list`](/reference/coins-list).
          in: path
          name: id
          required: true
          schema:
            default: bitcoin
            type: string
        - description: Data up to number of days ago.
          in: query
          name: days
          required: true
          schema:
            default: '1'
            enum:
              - '1'
              - '7'
              - '14'
              - '30'
              - '90'
              - '180'
              - '365'
              - max
            type: string
        - description: Data interval, leave empty for auto granularity.
          in: query
          name: interval
          required: false
          schema:
            enum:
              - daily
              - hourly
            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: >-
            Target currency of price 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:
                - - 1779199200000
                  - 76769
                  - 76889
                  - 76744
                  - 76818
                - - 1779201000000
                  - 76712
                  - 76712
                  - 76321
                  - 76422
              schema:
                $ref: '#/components/schemas/Response39E58Aba19F7_CoinsOHLC'
          description: Coin OHLC chart data
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    Response39E58Aba19F7_CoinsOHLC:
      description: OHLC data points as [timestamp, open, high, low, close] arrays
      items:
        items:
          type: number
        type: array
      type: array
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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