Fetch Metric Data
fetch_metric_data_toolFetch metric timeseries for one metric and one or many slugs.
Defaults: last 30 days (time_period="30d"), interval="1d".
Use this when the assets are already known and the values over time matter.
For the opposite direction — "which assets satisfy X" / "top N by X", one
aggregated value per asset across the whole universe — use
assets_by_metric_tool. To confirm a metric exists for a slug first, use
metrics_and_assets_discovery_tool; to draw the result, use show_chart.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slugs | Yes | List of slug identifiers (e.g., ["bitcoin"], ["bitcoin", "ethereum"], etc.). Accepts at most 10 slugs at a time. Only metrics that have `supports_many_slugs: true` can accept more than one slug. Check the `supports_many_slugs` field in the metrics_and_assets_discovery_tool response before passing multiple slugs. Financial and on-chain metrics generally support multiple slugs; social, sentiment, and derivatives metrics generally do not. The tool returns data for one metric and one or many slugs. | |
| metric | Yes | Metric name to fetch (e.g., 'price_usd'). IMPORTANT: Before fetching data, verify metric names by calling the metrics_and_assets_discovery_tool first. Only metrics listed there are supported. Do not guess or infer metric names — they may differ from what you expect. | |
| interval | No | The interval between two data points in the timeseries data (e.g., '5m', '1h', '1d'). The format is: <number><suffix>, where: - <number> is an integer - <suffix> is one of: - m (minutes) - h (hours) - d (days) - w (weeks) - y (years) For example, 5m means that the data returned will have a 5 minute interval between two data points. Each metric has predefined `min_interval`. It describes the lowest possible interval for which data is available. If the metric has `min_interval=1d` it means that Santiment has one data point per day for that metric. For these metrics `interval="5m"` won't work as 5 minutes is less than 1 day. | |
| time_period | No | How far back in time to fetch the data for (e.g., '7d', '30d', '90d'). This parameter defines the range of metric data to fetch - from <time_period> time ago up until now. Defaults to 30d. |