Tool Reference
Complete reference for the tools exposed by the CoinAPI Exchange Rates Historical MCP server.
Exchange Rates Historical MCP Tool Reference
The historical server currently exposes 6 tools.
Metadata tools
exchange_rates_history_list_assets
Returns supported assets, including fiat currencies and cryptocurrencies.
Optional arguments
| Argument | Type | Description |
|---|---|---|
filter_asset_id | string | Optional comma- or semicolon-delimited asset list such as BTC;ETH;USD. |
Returns
Each item can include fields such as:
asset_idnametype_is_cryptoprice_usdid_iconchain_addresses
Use when
- You need to validate asset identifiers before requesting rates.
- You want asset metadata and current USD valuation fields in one call.
exchange_rates_history_list_asset_icons
Returns icon URLs for assets at a chosen pixel size.
Required arguments
| Argument | Type | Description |
|---|---|---|
size | integer | Icon size in pixels. Supported values: 16, 32, 64, 128, 256. |
Returns
Rows include:
asset_idurl
Use when
- You need a consistent icon set for asset selectors, watchlists, or chart headers.
exchange_rates_history_list_periods
Returns supported historical candle granularities.
Arguments
This tool does not require any arguments.
Typical periods
1SEC5SEC1MIN1HRS1DAY10DAY
Each row also includes metadata such as length_seconds, length_months, unit_count, unit_name, and display_name.
Historical rate tools
exchange_rates_history_get_rate
Returns the historical exchange rate for one base/quote pair at one timestamp.
Required arguments
| Argument | Type | Description |
|---|---|---|
asset_id_base | string | Base asset identifier such as BTC. |
asset_id_quote | string | Quote asset identifier such as USD. |
time | string | ISO 8601 timestamp for the requested historical snapshot. |
Returns
A single object with:
timeasset_id_baseasset_id_quoterate
Use when
- You need a point-in-time valuation for one pair.
- You are backfilling historical conversions for a known timestamp.
exchange_rates_history_get_all_rates
Returns all historical rates from one base asset to many quote assets at one timestamp.
Required arguments
| Argument | Type | Description |
|---|---|---|
asset_id_base | string | Base asset identifier such as BTC. |
time | string | ISO 8601 timestamp for the requested historical snapshot. |
Optional arguments
| Argument | Type | Description |
|---|---|---|
filter_asset_id | string | Optional comma- or semicolon-delimited quote asset list such as USD;EUR;GBP. |
invert | boolean | If true, returns reciprocal rates. Default: false. |
Returns
An object with:
asset_id_baserates[]
Each rates[] item includes:
timeasset_id_quoterate
Use when
- You want one historical base asset quoted in many currencies.
- You need fewer round trips than calling
exchange_rates_history_get_raterepeatedly.
Timeseries tool
exchange_rates_history_get_timeseries
Returns historical OHLC exchange-rate candles for one asset pair.
Required arguments
| Argument | Type | Description |
|---|---|---|
asset_id_base | string | Base asset identifier such as BTC. |
asset_id_quote | string | Quote asset identifier such as USD. |
period_id | string | Candle period such as 5SEC, 1MIN, 1HRS, or 1DAY. |
Optional arguments
| Argument | Type | Description |
|---|---|---|
time_start | string | ISO 8601 lower bound. If omitted, it can be inferred from time_end and limit. |
time_end | string | ISO 8601 upper bound. If omitted, the server defaults to the current time. |
limit | integer | Maximum number of rows to return. Allowed range: 1 to 100000. Default: 100. |
extended_gap_filling | boolean | Enables broader boundary-aware gap filling. Default: false. |
Billing note
Every 100 items returned by exchange_rates_history_get_timeseries count as one request for billing.
Returns
Rows contain fields such as:
time_period_starttime_period_endtime_opentime_closerate_openrate_highrate_lowrate_close
Use when
- You need historical candles for charting or analytics.
- You want OHLC rather than a single snapshot rate.
Practical examples
Example: one historical BTC/USD rate
{
"tool": "exchange_rates_history_get_rate",
"arguments": {
"asset_id_base": "BTC",
"asset_id_quote": "USD",
"time": "2025-04-01T00:00:00Z"
}
}Example: historical BTC rates against three quotes
{
"tool": "exchange_rates_history_get_all_rates",
"arguments": {
"asset_id_base": "BTC",
"time": "2025-04-01T00:00:00Z",
"filter_asset_id": "USD;EUR;GBP"
}
}Example: daily BTC/USD candles
{
"tool": "exchange_rates_history_get_timeseries",
"arguments": {
"asset_id_base": "BTC",
"asset_id_quote": "USD",
"period_id": "1DAY",
"time_start": "2025-04-01T00:00:00Z",
"time_end": "2025-04-05T00:00:00Z",
"limit": 10
}
}Usage guidance
- Start with
exchange_rates_history_list_assetswhen the client accepts user-entered asset symbols. - Call
exchange_rates_history_list_periodsbefore exposing timeseries interval selectors. - Use
exchange_rates_history_get_ratefor one pair andexchange_rates_history_get_all_ratesfor fan-out pricing from one base. - Use
exchange_rates_history_get_timeseriesfor charts, indicators, and backtests.