Fetch Metric Data
fetch_metric_data_toolFetch metric timeseries for one metric and one or many slugs, or for a text search term.
Defaults: last 30 days (time_period="30d"), interval="1d".
Pass text instead of slugs to get a social metric for any word or phrase
(e.g. how often "sold" was mentioned), not just for an asset.
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 |
|---|---|---|---|
| text | No | Pass either `slugs` or `text`, not both. A search term (word or phrase, e.g. "sold" or "etf approval") to compute the metric for, instead of an asset. Supported only by social metrics such as social_volume_total and social_dominance_total. For text, social dominance is the share of all social documents that match the term. | |
| slugs | No | Pass either `slugs` or `text`, not both. 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. |