# Coin Historical Chart

**API:** Data API

**Endpoint:** `GET /v1/beta/coingecko/coins/{id}/market_chart`

**Tags:** CoinGecko

Historical series for one coin over a trailing window set by `days`, returned as three parallel arrays: `prices`, `market_caps` and `total_volumes`. Each entry is a two-element pair of timestamp and value, and the timestamp is in milliseconds. Granularity follows `days` automatically, or force it with `interval` (`daily` or `hourly`). Use it to chart a trend ending now. For an explicit start and end use `get_coingecko_coins_id_market_chart_range`; for candlesticks use `get_coingecko_coins_id_ohlc`; for one specific past day use `get_coingecko_coins_id_history`.

### Pricing reference

- Metering: Plan resource units.
- Reference request estimate: USD 0.008.
- Unit cost basis: USD 0.0.
- Resource unit: `provider_credit`.
- Cost bases do not establish the final customer price, including when zero.

Reference metadata only, not an account quote, a guaranteed price or a spending cap. Resource credits are not Felo credits. Final charges follow Felo billing records.

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `id` | path | yes | string, default: "bitcoin" | Coin ID. *refers to [`/coins/list`](/reference/coins-list). |
| `days` | query | yes | string, default: "1" | Data up to number of days ago. You may use any integer or `max` for number of days. |
| `interval` | query | no | string, enum: "1m", "5m", "hourly", "daily" | Data interval, leave empty for auto granularity. |
| `precision` | query | no | string, enum: "full", "0", "1", "2", "3", "4", … | Decimal place for currency price value. |
| `vs_currency` | query | yes | string, default: "usd" | Target currency of market data. *refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies). |

## Responses

### 200 — Coin historical chart data

Headers:
- `X-Request-Id` (string) — Request identifier to include when contacting Felo support.

**application/json**

Schema: `Response860C3Ae68Ea5_CoinsMarketChart` (`#/components/schemas/Response860C3Ae68Ea5_CoinsMarketChart`)

Example:

```json
{
  "prices": [
    [
      1779027899041,
      77953.82550382407
    ],
    [
      1779028199661,
      78052.87543398788
    ]
  ],
  "market_caps": [
    [
      1779027899041,
      1560631481361.8042
    ],
    [
      1779028199661,
      1562027330524.267
    ]
  ],
  "total_volumes": [
    [
      1779027899041,
      18688431751.857048
    ],
    [
      1779028199661,
      18974828816.446976
    ]
  ]
}
```

### 400 — The request could not be processed. Check the request parameters.

### 401 — A valid Felo API key is required.

### 402 — The request cannot proceed because a billing requirement is not met.

### 403 — The account is not permitted to perform this operation.

### 429 — A request or spending limit has been reached.

### 502 — The service could not complete the request.

### 503 — The API or billing service is temporarily unavailable.

### 504 — The service timed out while processing the request.

### default — Error response; upstream passthrough responses may use provider formats

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response860C3Ae68Ea5_CoinsMarketChart

`#/components/schemas/Response860C3Ae68Ea5_CoinsMarketChart`

```json
{
  "type": "object",
  "required": [
    "prices",
    "market_caps",
    "total_volumes"
  ],
  "properties": {
    "prices": {
      "type": "array",
      "description": "Price data points as [timestamp, price] pairs",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "market_caps": {
      "type": "array",
      "description": "Market cap data points as [timestamp, market_cap] pairs",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "total_volumes": {
      "type": "array",
      "description": "Total volume data points as [timestamp, volume] pairs",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    }
  }
}
```
