## GET /openapi/v1/chains/history

One chain's total market cap and 24-hour volume over time, by day or by hour — the history of
`/chains`' `market` figures.

### Query parameters

| Parameter | Type | Default | Notes |
|:--|:--|:--|:--|
| `id` | integer | required | The chain's id from `/chains` |
| `interval`, `time_start`, `time_end` | string | `1d`, none, now | See [History: what the endpoints share](#history-what-the-endpoints-share) |

### Response

```json
{
  "code": 0,
  "message": "success",
  "message_key": "SUCCESS",
  "result": {
    "id": 126,
    "interval": "1d",
    "points": [
      {
        "time": "2026-10-19T00:00:00Z",
        "market_cap": "401234567890.12",
        "volume_24h": "21345678901.5"
      }
    ]
  }
}
```

#### Fields

| Field | Type | Notes |
|:--|:--|:--|
| `id`, `interval` | number, string | What you asked for |
| `points[].time` | string | RFC3339 UTC: the start of the hour, or midnight for a day |
| `points[].market_cap`, `points[].volume_24h` | string | USD, never `null` |

Each point is the last figure we recorded in its hour or day, from the same records as `/chains`.
`/chains`' `coins_count` and `market_cap_share` have no history. New points arrive every hour, and the newest ones can still be revised for a while after;
today's daily point appears once the day is over. How far back a chain goes depends on when we
started recording it ([Data methodology](#history)).

### Examples

```bash
# A chain's daily market cap and volume since 1 October
curl -H "X-Api-Key: <your-api-key>" \
  "https://open-api.coinworldcap.com/openapi/v1/chains/history?id=126&time_start=2026-10-01T00:00:00Z"
```

| HTTP status | `code` | When |
|:--|:--|:--|
| 400 | 40000 | `id` missing or not a positive integer; a parameter the shared history rules refuse |
| 404 | 40400 | No chain with that `id`, or one we have disabled. A chain that exists without any history answers `200` with `points: []` |

The other errors are in [Errors](#errors).
