# CoinGecko — Coin Historical Chart Data by ID

Get CoinGecko historical price, market cap and volume charts 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 prices, market caps, and total volumes for historical charts, and asset comparisons, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/coingecko/coingecko-coin-historical-chart-data-by-id/950264b0-8290-4377-a8f5-dfd019fda1d7/
API ID: 950264b0-8290-4377-a8f5-dfd019fda1d7
Provider: CoinGecko
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/coingecko/api/v3/coins/{id}/market_chart
Page update time: 2026-12-03T02:49:12.789Z
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.341Z. 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 Market Chart API

Supply id, vs\_currency and days. The response separates prices, market\_caps and total\_volumes into timestamp-value arrays. Optional interval accepts hourly or daily; omit it for automatic granularity, and use precision for price decimal formatting.

## What You Can Build

- **Historical charts**: Plot price, market capitalization and volume as separate series.
- **Asset comparisons**: Request matching target currencies and inspect the returned observation times.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `prices[]` | Pair of Unix timestamp in milliseconds and reported price |
| `market_caps[]` | Pair of Unix timestamp in milliseconds and market capitalization |
| `total_volumes[]` | Pair of Unix timestamp in milliseconds and reported 24-hour volume |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "CoinGecko — Coin Historical Chart Data 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 market data. \n*refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies)."
        },
        "days": {
          "type": "string",
          "description": "Data up to number of days ago. \nYou may use any integer or `max` for number of days."
        },
        "interval": {
          "type": "string",
          "description": "Data interval, leave empty for auto granularity.",
          "enum": [
            "hourly",
            "daily"
          ]
        },
        "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": "object",
  "properties": {
    "market_caps": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "prices": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "total_volumes": {
      "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/market_chart?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
{
  "market_caps": [
    [
      1779027899041,
      1560631481361.8042
    ],
    [
      1779028199661,
      1562027330524.267
    ]
  ],
  "prices": [
    [
      1779027899041,
      77953.82550382407
    ],
    [
      1779028199661,
      78052.87543398788
    ]
  ],
  "total_volumes": [
    [
      1779027899041,
      18688431751.857048
    ],
    [
      1779028199661,
      18974828816.446976
    ]
  ]
}
```

## 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
### Is days a start date?
No. It specifies a lookback period as a string containing an integer or max. Use the range endpoint for explicit from/to timestamps.

### Are timestamps seconds or milliseconds?
The returned chart arrays use Unix milliseconds. Keep those values distinct from range-query Unix seconds.

### Which interval values can I send?
This selected contract accepts hourly or daily. Omit interval for automatic granularity.

### Does total_volumes mean volume since the previous point?
It is the reported 24-hour volume series, not a per-interval trade count or volume increment.

### 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-historical-chart-data-by-id/950264b0-8290-4377-a8f5-dfd019fda1d7/

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