Get historical market chart
get_market_chartFetch historical price, market cap, and volume series for a cryptocurrency over a chosen time window, with configurable data points and full-period change percentage.
Instructions
Get historical price, market cap, and volume series for a coin over a look-back window. Long windows are down-sampled to max_points evenly spaced observations; the reported change_percent is always computed from the full series.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Look-back window in days ('1', '7', '30', '365') or 'max'. | 30 |
| coin_id | Yes | CoinGecko coin id, e.g. 'bitcoin'. | |
| interval | No | Sampling granularity: 'auto', 'daily', or 'hourly'. Some values need a paid plan. | auto |
| max_points | No | Maximum points returned per series (10-1000). | |
| vs_currency | No | Quote currency, e.g. 'usd'. | usd |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | Yes | Look-back window requested, in days, or 'max'. | |
| prices | Yes | Price series, oldest first. | |
| coin_id | Yes | CoinGecko coin id. | |
| interval | Yes | Sampling granularity CoinGecko applied: auto, daily, or hourly. | |
| last_price | No | Most recent price in the window. | |
| downsampled | Yes | True when points were dropped to fit max_points. | |
| first_price | No | Earliest price in the window. | |
| market_caps | Yes | Market-cap series, oldest first. | |
| point_count | Yes | Points per series after down-sampling. | |
| vs_currency | Yes | Currency the series are denominated in. | |
| total_volumes | Yes | Volume series, oldest first. | |
| change_display | No | Formatted change across the window. | |
| change_percent | No | Percentage change across the window. |