# CoinGecko — Coin OHLC Chart by ID

Get CoinGecko OHLC candles via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by CoinGecko, pass parameters such as days, vs_currency, and retrieve structured data including structured JSON records, identifiers, and response metadata for candlestick charts, and chart comparisons, ready for production pipelines and AI agent automation using a single OpenAny API key.

Documentation: https://openany.si/coingecko/coingecko-coin-ohlc-chart-by-id/e9e62be9-47e2-48a7-b651-667a831ced80/
API ID: e9e62be9-47e2-48a7-b651-667a831ced80
Provider: CoinGecko
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/coingecko/api/v3/coins/{id}/ohlc
Page update time: 2026-12-03T02:49:12.821Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:12.395Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## CoinGecko Coin OHLC Chart API

Supply id, vs\_currency and a days value from the supported enum. Each response row is ordered as timestamp, open, high, low and close. Timestamps use milliseconds, and this selected implementation exposes precision but no interval parameter.

## What You Can Build

- **Candlestick charts**: Render the four price values in their documented order.
- **Chart comparisons**: Keep OHLC rows separate from point-price and volume series.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `[]` | OHLC row: Unix timestamp in milliseconds, open, high, low, close |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "CoinGecko — Coin OHLC Chart by ID request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Coin ID. \n*refers to [`/coins/list`](/reference/coins-list)."
        }
      },
      "required": [
        "id"
      ]
    },
    "query": {
      "type": "object",
      "properties": {
        "vs_currency": {
          "type": "string",
          "description": "Target currency of price data. \n*refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies)."
        },
        "days": {
          "type": "string",
          "description": "Data up to number of days ago.",
          "enum": [
            "1",
            "7",
            "14",
            "30",
            "90",
            "180",
            "365"
          ]
        },
        "precision": {
          "type": "string",
          "description": "Decimal place for currency price value.",
          "enum": [
            "full",
            "0",
            "1",
            "2",
            "3",
            "4",
            "5",
            "6",
            "7",
            "8",
            "9",
            "10",
            "11",
            "12",
            "13",
            "14",
            "15",
            "16",
            "17",
            "18"
          ]
        }
      },
      "required": [
        "vs_currency",
        "days"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "array",
  "items": {
    "type": "array",
    "items": {
      "type": "number"
    }
  }
}
```

## Request example
Scenario: Official example · Official response / contract request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/coingecko/api/v3/coins/bitcoin/ohlc?days=1&vs_currency=usd' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
[
  [
    1779199200000,
    76769.0,
    76889.0,
    76744.0,
    76818.0
  ],
  [
    1779201000000,
    76712.0,
    76712.0,
    76321.0,
    76422.0
  ]
]
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which days values are accepted?
Use one of the strings 1, 7, 14, 30, 90, 180 or 365. Unlike some market-chart endpoints, this contract does not accept max.

### Does each row include trading volume?
No. The documented row contains timestamp and four price values. It is OHLC, not an OHLCV row.

### Can I select hourly candles with interval?
This selected contract exposes id, vs_currency, days and precision only. Do not add an interval parameter from another implementation.

### Are these values interchangeable with a daily chart snapshot?
No. Candle open/high/low/close and sampled chart observations describe different measurements. Keep the endpoint and time aggregation attached to the values.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected implementation. Follow its billing unit and any request-dependent rules before sending the request.

## Available implementations
- CoinGecko: https://openany.si/coingecko/coingecko-coin-ohlc-chart-by-id/e9e62be9-47e2-48a7-b651-667a831ced80/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
