rate-hub
Indicative fiat and crypto rates over MCP, paid per request via x402 at $0.0001/request.
使うべきか
品質と安全性
検出事項(3)
- HIGH
- MEDIUMsearch_assets 内
- INFOsearch_assets 内
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"rate-hub": {
"url": "https://x402-v1.sky-1.org/mcp"
}
}
}リモートエンドポイント
https://x402-v1.sky-1.org/mcpstreamable-httpできること
ツール一覧
ツール(7)
🟢get_categories
Coin categories (GET /v1/categories): each category id and name with the catalog uids that belong to it, for example layer-1 or stablecoins. Join it with uids from get_rates or search_assets to group holdings. It changes about once a day; as_of says when it was refreshed. A coin can be in several categories, and only the larger coins of a category are listed. Categories without a catalog member are omitted. The result grows with the catalog (one uid list per category, both copies of the result). not_ready (503) before the first daily refresh; not_found when the server has categories switched off.
入力スキーマ
{
"type": "object",
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"as_of": {
"type": "string"
},
"build": {
"type": "string"
},
"categories": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"uids": {
"type": [
"null",
"array"
],
"items": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
}
}
},
"required": [
"id",
"name",
"uids"
],
"additionalProperties": false
}
},
"server_time": {
"type": "string"
}
},
"required": [
"as_of",
"build",
"categories",
"server_time"
],
"additionalProperties": false
}🟢get_daily(assets, vs, days)
Immutable daily rates for uids and UTC days (POST /v1/rates/daily). Days are UTC calendar dates (YYYY-MM-DD) in the past. Crypto history older than about a year is served at daily granularity from daily candles (source s8) back to the earliest day each asset has; an asset with no such history is out_of_range. Each item carries a status: ok = exact immutable rate; out_of_range = the day is before the archive start, after today UTC, before the first available day of a crypto asset, or before the asset was listed (final, do not retry); pending = transient upstream miss, retry after retry_after seconds; unsupported = unknown uid. Limits (assets, quotes, assets times days) are in get_meta. Edge cases: read resource ratehub://docs/behavior (behaviour notes).
入力スキーマ
{
"type": "object",
"properties": {
"assets": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"description": "Catalog uids",
"minItems": 1,
"maxItems": 100
},
"vs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Quote currencies",
"minItems": 1,
"maxItems": 3
},
"days": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"description": "Past UTC calendar days, YYYY-MM-DD",
"minItems": 1,
"maxItems": 1000
}
},
"required": [
"assets",
"vs",
"days"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"build": {
"type": "string"
},
"rates": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"properties": {
"day": {
"type": "string"
},
"prices": {
"type": [
"null",
"object"
],
"additionalProperties": {
"type": "string"
}
},
"retry_after": {
"type": [
"null",
"integer"
]
},
"source": {
"type": [
"null",
"string"
]
},
"status": {
"type": "string"
},
"type": {
"type": [
"null",
"string"
]
},
"uid": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
}
},
"required": [
"day",
"status",
"uid"
],
"additionalProperties": false
}
},
"server_time": {
"type": "string"
}
},
"required": [
"build",
"rates",
"server_time"
],
"additionalProperties": false
}🟢get_meta
API limits, supported quote currencies, and build info (GET /v1/meta).
入力スキーマ
{
"type": "object",
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"api_version": {
"type": "string"
},
"build": {
"type": "string"
},
"collector": {
"type": [
"null",
"object"
],
"properties": {
"crypto": {
"type": [
"null",
"object"
],
"properties": {
"last_success_at": {
"type": [
"null",
"string"
]
}
},
"additionalProperties": false
},
"fiat": {
"type": [
"null",
"object"
],
"properties": {
"last_success_at": {
"type": [
"null",
"string"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"max_assets": {
"type": "integer"
},
"max_body_bytes": {
"type": "integer"
},
"max_daily_pairs": {
"type": [
"null",
"integer"
]
},
"max_vs": {
"type": "integer"
},
"pending_retry_after_seconds": {
"type": [
"null",
"integer"
]
},
"stale_after_seconds": {
"type": [
"null",
"object"
],
"properties": {
"crypto": {
"type": "integer"
},
"fiat": {
"type": "integer"
}
},
"required": [
"crypto",
"fiat"
],
"additionalProperties": false
},
"supported_vs": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
},
"upstreams": {
"type": [
"null",
"object"
],
"additionalProperties": {
"type": "object",
"properties": {
"consecutive_failures": {
"type": "integer"
},
"last_error_class": {
"type": [
"null",
"string"
]
},
"last_success": {
"type": [
"null",
"string"
]
},
"status": {
"type": "string"
}
},
"required": [
"consecutive_failures",
"status"
],
"additionalProperties": false
}
}
},
"required": [
"api_version",
"build",
"max_assets",
"max_body_bytes",
"max_vs",
"supported_vs"
],
"additionalProperties": false
}🟢get_rates(assets, vs, include, source)
Batch indicative prices for catalog uids (POST /v1/rates). Prices are decimal strings. Uids are class-ranged (uid = class*1e8+seq; 1=fiat e.g. usd 100000001, 2=crypto e.g. btc 200000001). Use search_assets to find uids. Per-rate status: ok = fresh price; stale = last known price, upstream is late (see as_of); pending = in the catalog but not priced yet, wait retry_after seconds for that asset and ask again; unsupported = the uid is not in the catalog (a dynamic coin may have expired; look it up again). Size: about 0.4 KB per asset and quote without include (the result is sent twice, as text and as structuredContent; sizes here count both); sparkline adds a long price array per asset, so request it only when needed. Limits (max assets, max quote currencies) are in get_meta. Optional source (a code such as s1) returns that source's own price instead of the server's choice: source_code equals it, and an asset the source has no reading for is unsupported, never another source's price; exchange codes only answer when the deployment runs multi-source aggregation. A dynamic coin expires after 7 days without use and may get a new uid when registered again (also after a server reset): match it by symbol or a new search, not by a stored uid. Edge cases: read resource ratehub://docs/behavior (behaviour notes).
入力スキーマ
{
"type": "object",
"properties": {
"assets": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"description": "Catalog uids to price (class*1e8+seq; use search_assets to find uids)",
"minItems": 1,
"maxItems": 100
},
"vs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Quote currency codes (usd, eur, btc, ...)",
"minItems": 1,
"maxItems": 3
},
"include": {
"type": [
"null",
"array"
],
"items": {
"type": "string",
"enum": [
"change",
"market",
"sparkline"
]
},
"description": "Optional extras: change, market, sparkline. sparkline is large (a long price array per asset); ask for it only when needed",
"maxItems": 3
},
"source": {
"type": [
"null",
"string"
],
"description": "Optional source code such as s1: every rate is then that source's own reading, or unsupported when it has none (never another source's price)",
"pattern": "^s[0-9]+$"
}
},
"required": [
"assets",
"vs"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"build": {
"type": "string"
},
"rates": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"properties": {
"as_of": {
"type": [
"null",
"string"
]
},
"change": {
"type": [
"null",
"object"
],
"properties": {
"d30": {
"type": [
"null",
"string"
]
},
"d7": {
"type": [
"null",
"string"
]
},
"h1": {
"type": [
"null",
"string"
]
},
"h24": {
"type": [
"null",
"string"
]
},
"quote": {
"type": "string"
}
},
"required": [
"quote"
],
"additionalProperties": false
},
"day": {
"type": [
"null",
"string"
]
},
"day_change_pct": {
"type": [
"null",
"string"
]
},
"fetched_at": {
"type": [
"null",
"string"
]
},
"high_volatility": {
"type": [
"null",
"boolean"
]
},
"market": {
"type": [
"null",
"object"
],
"properties": {
"ath": {
"type": [
"null",
"string"
]
},
"ath_at": {
"type": [
"null",
"string"
]
},
"atl": {
"type": [
"null",
"string"
]
},
"atl_at": {
"type": [
"null",
"string"
]
},
"circulating_supply": {
"type": [
"null",
"string"
]
},
"high_24h": {
"type": [
"null",
"string"
]
},
"low_24h": {
"type": [
"null",
"string"
]
},
"market_cap": {
"type": [
"null",
"string"
]
},
"max_supply": {
"type": [
"null",
"string"
]
},
"quote": {
"type": "string"
},
"rank": {
"type": [
"null",
"integer"
]
},
"total_supply": {
"type": [
"null",
"string"
]
},
"volume_24h": {
"type": [
"null",
"string"
]
}
},
"required": [
"quote"
],
"additionalProperties": false
},
"prices": {
"type": [
"null",
"object"
],
"additionalProperties": {
"type": "string"
}
},
"retry_after": {
"type": [
"null",
"integer"
]
},
"source": {
"type": [
"null",
"string"
]
},
"sources": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
},
"sparkline": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
},
"status": {
"type": "string"
},
"symbol": {
"type": [
"null",
"string"
]
},
"type": {
"type": [
"null",
"string"
]
},
"uid": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
}
},
"required": [
"status",
"uid"
],
"additionalProperties": false
}
},
"server_time": {
"type": "string"
}
},
"required": [
"build",
"rates",
"server_time"
],
"additionalProperties": false
}🟢get_series(uid, vs, range, max_points)
Price history of one asset for charts (GET /v1/rates/series). Crypto: every range. Fiat: 1d and 7d from rate-hub's own readings taken about every 30 minutes; 30d, 90d, 1y and max one point per UTC day from the daily archive (it has a start day, days without a document are skipped, a cold range fills over a few retries, so an early answer may have fewer points). A fiat with no reading in the range, or an unknown uid, answers status unsupported with empty points, not an error. status: ok = fresh series; stale = last cached series, upstream failed (see fetched_at); pending = not ready, retry after retry_after seconds; unsupported = unknown uid, an asset no upstream knows, or a fiat with no reading in the range. Size: about 110 bytes per point (both copies of the result). max_points (2..500, default 100) downsamples evenly and keeps the first and last point; pass 500 for full detail. A non-USD fiat quote clips the series at the start of the fiat archive (range max only), and with a dynamic coin an unsupported answer may mean its uid expired. Edge cases: read resource ratehub://docs/behavior (behaviour notes).
入力スキーマ
{
"type": "object",
"properties": {
"uid": {
"type": "integer",
"description": "Catalog uid of a crypto asset",
"minimum": 0,
"maximum": 4294967295
},
"vs": {
"type": "string",
"description": "Quote currency"
},
"range": {
"type": "string",
"description": "Chart range",
"enum": [
"1d",
"7d",
"30d",
"90d",
"1y",
"max"
]
},
"max_points": {
"type": [
"null",
"integer"
],
"description": "Downsample to at most this many points, 2..500 (default 100); first and last points are kept"
}
},
"required": [
"uid",
"vs",
"range"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"build": {
"type": "string"
},
"fetched_at": {
"type": [
"null",
"string"
]
},
"points": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"properties": {
"price": {
"type": "string"
},
"t": {
"type": "string"
}
},
"required": [
"price",
"t"
],
"additionalProperties": false
}
},
"range": {
"type": "string"
},
"retry_after": {
"type": [
"null",
"integer"
]
},
"server_time": {
"type": "string"
},
"source": {
"type": [
"null",
"string"
]
},
"status": {
"type": "string"
},
"uid": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"vs": {
"type": "string"
}
},
"required": [
"build",
"points",
"range",
"server_time",
"status",
"uid",
"vs"
],
"additionalProperties": false
}🟡get_top(limit, vs, include_market)
Top crypto assets by market rank (GET /v1/top), with change and, by default, the market block (rank, market cap, volume, supply). Size: about 1 KB per asset with market (both copies of the result), smaller without. Default limit is 20 (max 250); pass include_market=false for a compact list. Items that cannot be priced in the requested quote are skipped. Edge cases: read resource ratehub://docs/behavior (behaviour notes).
入力スキーマ
{
"type": "object",
"properties": {
"limit": {
"type": [
"null",
"integer"
],
"description": "Ranked assets to return (1..250, default 20)"
},
"vs": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
},
"description": "Quote currencies (default usd)",
"maxItems": 3
},
"include_market": {
"type": [
"null",
"boolean"
],
"description": "Include the market block (rank, market cap, volume, supply) per asset; default true. false makes the result smaller"
}
},
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"build": {
"type": "string"
},
"rates": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"properties": {
"as_of": {
"type": [
"null",
"string"
]
},
"change": {
"type": [
"null",
"object"
],
"properties": {
"d30": {
"type": [
"null",
"string"
]
},
"d7": {
"type": [
"null",
"string"
]
},
"h1": {
"type": [
"null",
"string"
]
},
"h24": {
"type": [
"null",
"string"
]
},
"quote": {
"type": "string"
}
},
"required": [
"quote"
],
"additionalProperties": false
},
"day": {
"type": [
"null",
"string"
]
},
"day_change_pct": {
"type": [
"null",
"string"
]
},
"fetched_at": {
"type": [
"null",
"string"
]
},
"high_volatility": {
"type": [
"null",
"boolean"
]
},
"market": {
"type": [
"null",
"object"
],
"properties": {
"ath": {
"type": [
"null",
"string"
]
},
"ath_at": {
"type": [
"null",
"string"
]
},
"atl": {
"type": [
"null",
"string"
]
},
"atl_at": {
"type": [
"null",
"string"
]
},
"circulating_supply": {
"type": [
"null",
"string"
]
},
"high_24h": {
"type": [
"null",
"string"
]
},
"low_24h": {
"type": [
"null",
"string"
]
},
"market_cap": {
"type": [
"null",
"string"
]
},
"max_supply": {
"type": [
"null",
"string"
]
},
"quote": {
"type": "string"
},
"rank": {
"type": [
"null",
"integer"
]
},
"total_supply": {
"type": [
"null",
"string"
]
},
"volume_24h": {
"type": [
"null",
"string"
]
}
},
"required": [
"quote"
],
"additionalProperties": false
},
"prices": {
"type": [
"null",
"object"
],
"additionalProperties": {
"type": "string"
}
},
"retry_after": {
"type": [
"null",
"integer"
]
},
"source": {
"type": [
"null",
"string"
]
},
"sources": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
},
"sparkline": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
},
"status": {
"type": "string"
},
"symbol": {
"type": [
"null",
"string"
]
},
"type": {
"type": [
"null",
"string"
]
},
"uid": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
}
},
"required": [
"status",
"uid"
],
"additionalProperties": false
}
},
"server_time": {
"type": "string"
}
},
"required": [
"build",
"rates",
"server_time"
],
"additionalProperties": false
}🟢search_assets(q, symbol, symbols, candidate, chain, ...)
Catalog lookup (GET /v1/assets); use it to turn tickers or names into uids. Filters: q (free text), symbol, symbols (several tickers in one call), candidate (the uid of a candidates entry; registers that coin on demand; use alone), chain+contract (an unknown Solana mint can be registered on demand; mints are case-sensitive). Size: about 0.4 KB per asset (both copies of the result). Without any filter the default limit is 50 (the whole catalog is hundreds of assets); page with limit (1..1000) and after (next_after of the previous page). An explicit limit of 0 is an error. For a q lookup with few catalog hits, candidates lists at most 5 unregistered coins (not yet priced); pass a candidate's uid as candidate to register it and make it priceable. Dynamic coins expire after 7 days without use and may get a new uid after expiry or a server reset, so do not store a dynamic uid as identity; asset.icon is a placeholder image for an asset with no image source. Edge cases: read resource ratehub://docs/behavior (behaviour notes).
入力スキーマ
{
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "Free-text search over symbol and name"
},
"symbol": {
"type": "string",
"description": "Exact symbol (non-unique, all matches returned)"
},
"symbols": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
},
"description": "Several exact symbols in one call, e.g. [btc, eth, sol]; all matches for each are returned",
"maxItems": 100
},
"candidate": {
"type": "integer",
"description": "The uid of a candidates entry from an earlier search; registers that coin on demand and returns its asset. Use alone",
"minimum": 0,
"maximum": 4294967295
},
"chain": {
"type": "string",
"description": "Chain name with contract"
},
"contract": {
"type": "string",
"description": "Token contract address"
},
"limit": {
"type": [
"null",
"integer"
],
"description": "Page size 1..1000. Default 50 when no filter is given, otherwise no limit"
},
"after": {
"type": [
"null",
"integer"
],
"description": "Uid cursor for pagination (next_after from the previous page)",
"minimum": 0,
"maximum": 4294967295
}
},
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"assets": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"properties": {
"capabilities": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
},
"contracts": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"chain": {
"type": "string"
}
},
"required": [
"address",
"chain"
],
"additionalProperties": false
}
},
"dynamic": {
"type": [
"null",
"boolean"
]
},
"icon": {
"type": [
"null",
"string"
]
},
"name": {
"type": "string"
},
"successor_uid": {
"type": [
"null",
"integer"
],
"minimum": 0,
"maximum": 4294967295
},
"symbol": {
"type": "string"
},
"tier": {
"type": "string"
},
"type": {
"type": "string"
},
"uid": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
}
},
"required": [
"name",
"symbol",
"tier",
"type",
"uid"
],
"additionalProperties": false
}
},
"build": {
"type": "string"
},
"candidates": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"properties": {
"market_cap_rank": {
"type": [
"null",
"integer"
]
},
"name": {
"type": "string"
},
"symbol": {
"type": "string"
},
"uid": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
}
},
"required": [
"name",
"symbol",
"uid"
],
"additionalProperties": false
}
},
"candidates_status": {
"type": [
"null",
"string"
]
},
"next_after": {
"type": [
"null",
"integer"
],
"minimum": 0,
"maximum": 4294967295
},
"total": {
"type": [
"null",
"integer"
]
}
},
"required": [
"assets",
"build"
],
"additionalProperties": false
}コミュニティ
エビデンス