Fetch metric
fetch_metricRead one metric's observations by its exact id from get_asset_metrics: exact decimal strings with original source clocks, revision, finality and gaps. End is exclusive. No new observation is acquired. Without an API key it serves metrics whose plan is free at 24h, 1w, 1M or 1Y; a chart above the free plan answers with the plan it needs, its free sample window and the free metrics closest to it. A long selection answers with its latest observations and the end to send for earlier ones. For a coin's price on a date, get_price_history answers directly.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"metric": "<metric>"
},
"name": "fetch_metric"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Exclusive UNIX seconds UTC. Leave it out to read up to the latest observation. | |
| sma | No | Smoothing window in observations; 0 returns the raw series. | |
| asset | No | Asset code, for example BTC or ETH; get_assets_list gives every code with its name. | BTC |
| start | No | Inclusive UNIX seconds UTC. Without it fetch_metric reads the latest year of daily observations (ten years of weekly ones, every monthly and yearly one). | |
| metric | Yes | Exact metric id as get_asset_metrics lists it, for example ckh.SpotPrice or eth.PriceUSD. | |
| interval | No | Resolution: 24h daily, 1w weekly, 1M monthly, 1Y yearly. get_metric_metadata gives the intervals a metric offers. | 24h |
| smoothing | No | How sma smooths the series: simple mean (sma), exponential mean (ema) or moving median (median). | sma |
| publication | No | An actual retained publication ID; only supported metric/interval pairs accept it. |