---
title: "Historical coin price chart"
method: GET
path: "/api/v1/coins/{coinId}/history"
tags: ["coins"]
---

# Historical coin price chart

`GET /api/v1/coins/{coinId}/history`

## Request

- Base URL: `https://api.bitcompare.net`
- URL: `https://api.bitcompare.net/api/v1/coins/{coinId}/history`
- Auth: one of:
  - none
  - HTTP bearer

Historical price timeseries for a coin.

## Path parameters

- `coinId` string, required: Canonical coin id (e.g. "bitcoin")

## Query parameters

- `days` integer

## Response `200`

Successful response

- object
  - `data` object, required
    - `coinId` string, required
    - `days` integer, required
    - `source` 'rate_history' | 'cache' | 'coingecko', required: Where the data came from
    - `prices` object[], required: Price points, oldest → newest
      - `timestamp` number, required: Unix epoch milliseconds
      - `price` number, required
      - `volume` number
      - `marketCap` number
    - `lastUpdated` string, required: ISO-8601 timestamp of the most recent refresh

## Other responses

- `401`: Missing or invalid API key
- `429`: Plan rate limit exceeded — see X-RateLimit-* headers and Retry-After

---

[API](https://skmtc.dev/bitcompare/apis/bitcompare-api.md) · [All operations](https://skmtc.dev/bitcompare/apis/bitcompare-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bitcompare/apis/bitcompare-api/revisions/936dfbf752d2?raw)
