Crypto MCP Server for AI Agents
An AI agent connects, discovers twenty-one tools, reads their descriptions to understand what data exists, and composes its own requests. No URL to build, no REST schema to parse.
The server speaks the MCP protocol over HTTP transport. It relays each call to the API with your key, under the API’s names, units and conventions, and presents the result for an AI agent: compact rows, a summary per series, a bounded size.
#Connect your AI to the crypto MCP server
A URL and a header. The server is closed by default: without a valid X-API-KEY, no tool is announced and every request is refused with 401 (X-Deny-Reason: missing_api_key when the header is absent, invalid_api_key when the key is unknown or revoked).
{
"mcpServers": {
"bytnode": {
"type": "http",
"url": "https://api.bytnode.com/mcp",
"headers": { "X-API-KEY": "your_key" }
}
}
}The exact shape of the configuration file depends on the AI agent, and the generic block above does not fit every one: Claude Desktop, ChatGPT and Gemini CLI read it differently. The MCP server page gives the ready-to-paste config for each client: Claude Desktop, Claude Code, ChatGPT, Cursor, Codex, VS Code, LangChain, n8n and more.
How the connection works:
- The transport is Streamable HTTP without sessions: each request stands alone. CORS is open on
/mcp: an MCP client running in a browser can connect. serverInfo.versionis the version of the MCP surface (1.4.0) — its tools, its instructions and the shape of its responses —, distinct from the version of the API contract (1.2.0); every response repeats it inmcp_version.- Some clients keep the tool definitions they received when they connected: when
mcp_versionchanges (a new major version means a change to adapt to), reconnect the connector to load the new ones. - The capabilities announce only what exists — tools and resources, no
listChangednotifications — and an unknown resource answers the JSON-RPC error-32002.
Signing in:
- Connectors that sign in with OAuth (claude.ai, ChatGPT, Claude Code) need no key: a request without one gets
401withWWW-Authenticate: Bearer resource_metadata=…, which points to the authorization server, bytnode.com, where you approve the connection. - Otherwise the key goes in the
X-API-KEYheader, or asAuthorization: Bearer. - Without a key, the server card
https://api.bytnode.com/.well-known/mcp/server-card.jsondescribes the whole surface (tools, resources, version, authentication), and/mcp/server.jsonis its entry for the official MCP registry.
#The twenty-one tools
Nineteen are read-only and an AI agent can replay them without risk (the live ones hold one WebSocket connection of your plan, see Real-time and alerts; three read your exchange accounts and send your holdings to the AI model, see Your portfolio); create_alert and delete_alert manage your alerts (see Real-time and alerts).
The five data tools have one target each — a pair, an asset, the whole market, macro, on-chain — and work the same way:
fields(the names of the fields to return),limit,since_ms/until_ms,last,columns,detailandmax_tokens(detailed underget_pair_data) mean the same thing in each;- every response carries
server_timeandresponse_tokens; - their common conventions — modes, windows, summary, units, size budget — are in the server’s instructions, sent once at connection rather than repeated in every description.
rank_pairs ranks every pair on one metric, and read_export reads the rest of a response cut by its budget.
get_market_sentiment takes the same window parameters — since_ms / until_ms, last, limit and max_tokens — with its own defaults (100 rows per series), and its own detail: summary by default, or full.
Every tool that uses quota (the five data tools, get_pair_brief, get_market_indicators, rank_pairs and get_market_sentiment) lets an AI agent control what it spends:
dry_run=trueplans the call without making it: it returnsestimated_api_requests, the rate and monthly quota left on your key, andwould_be_refusedwhen the call would be refused; no data, no quota. The fields, the window and the history depth are checked; the families of your plan are checked by the real call only.max_quota_cost=Nrefuses the call, before any request, when it would use more than N quota requests (422, codequota_cost_exceeded).
The estimate is a floor: in rare cases the call uses one request more, and api_requests always gives the real count.
get_system_info
Your plan and, on demand, the served pairs, the data freshness and the catalogues an AI agent needs to target a field.
It always returns the health of the service and plan: your key’s plan — its families, its history depth per timeframe, its rate and the quota remaining — without counting against your quota.
include adds the live list of pairs and/or a freshness summary, freshness_fields the freshness of given fields, catalogs the series that get_macro_data expects or the capabilities of one pair. Each part asked for counts one request.
Parameters
includestring[]- Any of symbols (the live list of served pairs) and freshness (the data freshness summary: state, stale_fields, stale_feeds). Both at once.
freshness_fieldsstring[]- Names of fields, of any data tool, whose freshness you want: per field, age_s and is_stale. Implies freshness.
catalogsstring[]- Any of macro_series and macro_intraday_series (the series of get_macro_data, the latter with their timeframes), symbol_capabilities. Several at once.
symbolstring- Required by symbol_capabilities: which feeds are live and which metrics are available or blocked, before asking.
categorystring- Filters the macro_series catalogue.
get_pair_brief
The state of a pair in one call, always the same shape, with no field to choose:
price_change(the price and its rolling changes),funding_nextand the latestbasis;- the
oi(withoi_usd) andcvdof the last closed 1h bucket; - the liquidations of the last 24 hours as one object (
liquidations_24h:fromandto, the start of the first and of the last 1h bucket,long_usd,short_usd,total_usd,bucket_count); - the Fear & Greed index (
fear_greed).
Every value is a flat object: no series to read, no total to look for in summary. Each value comes with its context: its place in its own recent history.
The call costs two quota requests per pair, plus one. sentiment=true adds sentiment: the fear_greed, leverage and volatility states of the pair (score, state, meaning) on the last closed 1h bucket, for one more quota request per pair.
For anything else — other fields, a history, another step — get_pair_data. It reads current values: on Free, which has no snapshot family, it is refused, and get_pair_data with last: "1h" gives the latest points.
Parameters
symbolstring[]- Required: a pair, e.g. BTCUSDT, or a list of up to 10 pairs to compare them; with several, every key is prefixed with its pair (BTCUSDT/funding_next), and fear_greed, of the whole market, comes once.
sentimentbooleandefault false- Adds sentiment: the fear_greed, leverage and volatility states of the pair (score, state, meaning) on the last closed 1h bucket. One more quota request per pair.
dry_runbooleandefault false- Plans the call without making it: its quota cost, your remaining rate and quota, the checks. No data, no quota.
max_quota_costinteger- Refuses the call, before any request, if it would use more quota requests than this.
get_pair_data
Market data of one pair, or of up to ten compared in one call: price and candles, trades, order book and order flow, derivatives (open interest, funding, basis, liquidations) and tokenomics. One call, many fields, current value or dated history.
The fields served by the REST snapshot share a single request per pair; the others (large trades, for instance) go to their own route, in parallel. fields lists the fields to return, limit the number of latest points of each series.
By default every value is the aggregate across venues. exchanges (a list) narrows flows, trades, open interest, funding, basis, liquidations, the order book and the spread to the venues you name — candles stay aggregated — and the response repeats the venues served. The accepted names are the enumeration of the parameter in the tool’s JSON schema.
Parameters
symbolstring[]- Required: the trading pair, e.g. BTCUSDT, or a list of up to 10 pairs to compare them: requests are counted per pair, every key becomes pair/field (ETHUSDT/funding_next), and a refused pair does not stop the others (errors, partial). The live list comes from get_system_info.
fieldsstring[]- Required: the fields to return, several per call, among the 24 names of this tool (listed below). A field of another tool is refused with the name of its tool.
limitinteger- The N latest points of each series; by default, the latest one (with a timeframe, the N latest buckets). A current-value-only field such as price_change gives one point; a limit above a field’s own maximum (1000 for a series, 10000 for individual trades) is capped, and warnings says so. With a window, a ceiling of points per series. describe_fields says what N counts.
timeframestringdefault 1h- Step of the fields tagged timeframe. When omitted: 1h on a current value; in history, a step giving about 200 points. 1w: klines only.
livebooleandefault false- Current value only: adds the candle still forming, marked is_closed: false.
since_ms / until_msstring- The bounds of a dated window: epoch milliseconds, an ISO 8601 date (2026-10-20T00:00:00Z; without a time zone, UTC) or a duration ago ('48h', '30d'; units m, h, d, w). Present: every requested field returns its history.
laststring- History over the given duration ('48h', '30d') in whole closed buckets: since_ms moves back to the start of its bucket, so last: '7d' in 1h gives 168 candles where since_ms: '7d' gives 167. It replaces since_ms (both together are refused); until_ms can set its end.
min_usdnumber- USD threshold of trades_large (default 100,000, minimum 1,000) and of liquidations_events.
marketstringdefault all- Market of cvd, buy_sell_ratio, trades_avg_size and orderbook: all (spot + perpetual futures), spot or futures. The tool maps it to the route of that market.
exchangesstring[]- Only these venues instead of the aggregate: flows, trades, open interest, funding, basis, liquidations, order book and spread; not klines. The accepted names are in the tool’s JSON schema; the response repeats the venues served.
columnsstring[]- The columns to keep in each row, as a list (e.g. ["close", "volume"]; a CSV string is accepted too), dotted notation for nested fields — the equivalent of ?fields= in the REST API (here, fields names the data fields). Applied per field: a column that exists in at least one requested field is applied where it exists, and warnings says where it was ignored; a column unknown to every field is refused, with a suggestion. Overrides detail.
detailstringdefault compact- compact: the main columns of heavy rows, is_closed dropped when every row is closed, trade ids dropped; omitted_columns names what was left out. full: every column.
contextbooleandefault false- Adds context: where the latest value of each series sits in its own recent history (percentile, z-score, window). No quota.
dry_runbooleandefault false- Plans the call without making it: its quota cost, your remaining rate and quota, the checks. No data, no quota.
max_quota_costinteger- Refuses the call, before any request, if it would use more quota requests than this.
max_tokensintegerdefault 6000- Response budget in estimated tokens, from 1,500 up to 16,000 (default 6,000). The same parameter on every data tool, get_market_indicators, rank_pairs, get_market_sentiment and read_export.
get_options_data
Options and spot ETFs of one asset: options summary, open interest, volume, put/call, implied volatility, max pain, greeks, OI by strike, and etf_fundamentals (the quarterly SEC filings of spot ETFs per issuer; no daily flows).
expiries: true adds the active expiries with, per expiry, calls and puts OI, put/call, max pain, top strikes and ATM IV; options_summary and options_put_call_ratio are totals across expiries.
Parameters
assetstring- Required: the asset alone, e.g. BTC, never a pair.
fieldsstring[]- The fields to return, among the 11 names of this tool (listed below). The only data tool where it is optional: expiries: true can come alone.
limitinteger- The N latest points of each series; by default, the latest one (with a timeframe, the N latest buckets). A current-value-only field such as price_change gives one point; a limit above a field’s own maximum (1000 for a series, 10000 for individual trades) is capped, and warnings says so. With a window, a ceiling of points per series. describe_fields says what N counts.
expiriesbooleandefault false- Adds data.expiries: the active expiries and the figures of each, in one request. Their date is the expiry of the other fields. Valid on its own, without any field.
timeframestring- Step of the options history (fields tagged timeframe). When omitted, a step giving about 200 points.
expirystring- An expiry, YYYY-MM-DD: options_oi_distribution, and options_max_pain in history, where it is required.
tickerstring- One ETF issuer, e.g. IBIT: optional filter of the history of etf_fundamentals.
contextbooleandefault false- Adds context: where the latest value of each series sits in its own recent history (percentile, z-score, window). No quota.
dry_runbooleandefault false- Plans the call without making it: its quota cost, your remaining rate and quota, the checks. No data, no quota.
max_quota_costinteger- Refuses the call, before any request, if it would use more quota requests than this.
get_market_overview
The whole crypto market, with no target: total market cap, volume and BTC/ETH dominance (global_market), two Fear & Greed indices (fear_greed and CMC’s, fear_greed_cmc), altcoin_season, and the cmc20 and cmc100 indices.
Parameters
fieldsstring[]- Required: the fields to return, several per call, among the 6 names of this tool (listed below). A field of another tool is refused with the name of its tool.
limitinteger- The N latest points of each series; by default, the latest one (with a timeframe, the N latest buckets). A current-value-only field such as price_change gives one point; a limit above a field’s own maximum (1000 for a series, 10000 for individual trades) is capped, and warnings says so. With a window, a ceiling of points per series. describe_fields says what N counts.
timeframestring- Step of global_market only (1h, 4h, 1d); the indices are daily.
contextbooleandefault false- Adds context: where the latest value of each series sits in its own recent history (percentile, z-score, window). No quota.
dry_runbooleandefault false- Plans the call without making it: its quota cost, your remaining rate and quota, the checks. No data, no quota.
max_quota_costinteger- Refuses the call, before any request, if it would use more quota requests than this.
get_macro_data
US macro. macro reads one FRED series (DGS10, DCOILWTICO…) — without series, the latest value of every series; macro_intraday reads one intraday instrument of its catalogue (e.g. PAXGUSDT), series required. Four computed fields take no target: net liquidity, crypto-macro correlations, momentum and a risk score. The lists of series come from the catalogues of get_system_info.
Parameters
fieldsstring[]- Required: the fields to return, several per call, among the 6 names of this tool (listed below). A field of another tool is refused with the name of its tool.
limitinteger- The N latest points of each series; by default, the latest one (with a timeframe, the N latest buckets). A current-value-only field such as price_change gives one point; a limit above a field’s own maximum (1000 for a series, 10000 for individual trades) is capped, and warnings says so. With a window, a ceiling of points per series. describe_fields says what N counts.
seriesstring- The series identifier: a FRED series for macro (e.g. DGS10; optional for its current value), an instrument for macro_intraday (e.g. PAXGUSDT; required).
timeframestring- Step of macro_intraday only (its catalogue lists the steps of each instrument).
dry_runbooleandefault false- Plans the call without making it: its quota cost, your remaining rate and quota, the checks. No data, no quota.
max_quota_costinteger- Refuses the call, before any request, if it would use more quota requests than this.
get_onchain_data
Bitcoin and Ethereum on-chain, with no target: eight btc_* fields (network, mempool, fees, mining, MVRV, NVT, active addresses, revenue per difficulty) and eight eth_* fields (supply, gas, staking, deflation, DeFi, gas momentum, supply squeeze, ETH price in BTC).
Parameters
fieldsstring[]- Required: the fields to return, several per call, among the 16 names of this tool (listed below). A field of another tool is refused with the name of its tool.
limitinteger- The N latest points of each series; by default, the latest one (with a timeframe, the N latest buckets). A current-value-only field such as price_change gives one point; a limit above a field’s own maximum (1000 for a series, 10000 for individual trades) is capped, and warnings says so. With a window, a ceiling of points per series. describe_fields says what N counts.
timeframestring- Step of btc_fees only (1h, 4h, 1d); the other series keep their source cadence.
datasetstring- concentration (default), rewards, difficulty or fee_rates, for the history of btc_mining.
dry_runbooleandefault false- Plans the call without making it: its quota cost, your remaining rate and quota, the checks. No data, no quota.
max_quota_costinteger- Refuses the call, before any request, if it would use more quota requests than this.
get_market_indicators
The nineteen technical indicators, computed on demand, for one to ten pairs. symbol (a list, as in the other tools), timeframe and indicators are mandatory; only limit has a default, at 1. The parameters, defaults and bounds of each type are in the tool’s JSON schema and description.
await c.call_tool("get_market_indicators", {
"symbol": "BTCUSDT",
"timeframe": "1h",
"limit": 60,
"indicators": [
{"id": "rsi_7", "type": "rsi", "period": 7},
{"id": "rsi_21", "type": "rsi", "period": 21},
{"id": "macd", "type": "macd", "fast": 12, "slow": 26, "signal": 9},
{"id": "adx_14", "type": "adx", "period": 14},
],
})The same rules apply as in REST: an id of your choice for each indicator, unique in the call, and a ceiling of limit + warm-up ≤ 1000. One quota request per pair.
The response has the shape of the data tools:
datacarries one series perid@timeframe(pair/id@timeframewith several pairs),indicatorsthe type and parameters of each;- a pair where indicators do not apply (a stablecoin) has its keys at
null, withnot_applicableinunavailable; - a refused pair is reported under
errors.
describe_fields
The full definition of the fields of the five data tools, with no API call and no quota:
- what each one returns (columns, conventions, how its rows are dated);
- the unit of every column (
units) and the thresholds of every label (labels); - its tool and target, timeframes, maximum points, history, extra parameters and
livesupport.
It also describes the output keys that are not fields: liquidations_24h, oi_usd, cumulative_net_volume, ranking, context and sentiment.
The description of each tool carries one line per field, with the same tags as the index, and this tool gives the rest. The same definitions are MCP resources: bytnode://fields (the index, with the tool of every field) and bytnode://fields/{name}.
Parameters
fieldsstring[]- Names to describe, at least one: fields of any data tool, or the output keys liquidations_24h, oi_usd, cumulative_net_volume, ranking, context and sentiment. An unknown name is refused with a suggestion.
rank_pairs
Every served pair ranked on one metric, the top limit returned, for one quota request whatever the number of pairs. For one pair’s full data, get_pair_data.
The quota request is made with your key on the route of the metric’s family, so your plan applies:
| Metric | What it ranks | Family |
|---|---|---|
oi_usd | Open interest in USD | Derivatives |
volume_usd_24h | Spot + futures volume of the last 24 closed hours, the sum of hourly volume × close | Price and volume |
funding_next | The next estimated funding: estimated_rate_pct, 8h equivalent in %, and apr_pct | Derivatives |
price_change_pct | The rolling change over window | Price and volume |
rsi | RSI 14 on the last closed candle of timeframe | Indicators |
fear_greed, leverage, volatility, momentum | The computed sentiment scores, 0 to 100, on the last closed bucket of timeframe; state keeps only the pairs in one state, e.g. leverage with overheated_longs | Indicators |
In the response:
data.rankinggives each pair’srank,symbol, value and price — for a sentiment metric,score,stateandmeaning;- values are at most 60 seconds old (
computed_at); for the sentiment metrics,computed_atis the start of their bucket; - a pair without the metric — spot-only pairs for
oi_usd,funding_nextandrsi, a missing feed — is listed inexcluded; for the sentiment metrics,excluded.warming_uplists the pairs without a score yet.
Parameters
metricstring- Required: oi_usd, volume_usd_24h, funding_next, price_change_pct, rsi, or a sentiment score: fear_greed, leverage, volatility or momentum.
orderstringdefault desc- desc (largest first, the default) or asc — the most negative funding, for instance.
limitintegerdefault 10- The number of pairs returned, from 1 to 100.
windowstringdefault 1d- price_change_pct only: 1h, 4h, 1d (default) or 1w.
timeframestringdefault 4h / 1h- rsi: the candles of the RSI, 1h, 4h (default) or 1d. Sentiment metrics: the bucket, 1h (default), 4h or 1d.
statestring- Sentiment metrics only: keeps the pairs in this state (e.g. overheated_longs with leverage). Refused with another metric.
dry_runbooleandefault false- Plans the call without making it: its quota cost, your remaining rate and quota, the checks. No data, no quota.
max_quota_costinteger- Refuses the call, before any request, if it would use more quota requests than this.
max_tokensintegerdefault 6000- Response budget in estimated tokens, from 1,500 up to 16,000 (default 6,000). The same parameter on every data tool, get_market_indicators, rank_pairs, get_market_sentiment and read_export.
read_export
The rest of a response cut by its size budget, page by page, in the same format, with no API request and no quota.
- A cut response carries
export.export_id, and themissingof itsranges(or, for several pairs, the top-levelmissing) gives the call to make:read_export(export_id=…, key='klines@1h', offset=N). - Each page says
row_count,total_row_countandnext_offset(nullat the end), andkeyslists every series of the export with its number of rows. - An export lives one hour and is read with the API key that produced it.
Parameters
export_idstring- Required: export.export_id of the cut response (its bytnode:// URI is accepted too).
keystring- The series to read, as keyed in the response’s data (klines@1h, for instance); by default the first. keys lists them.
offsetintegerdefault 0- The first row to return, 0 being the most recent; the row_count in the ranges of the cut response gives it.
max_tokensintegerdefault 6000- Response budget in estimated tokens, from 1,500 up to 16,000 (default 6,000). The same parameter on every data tool, get_market_indicators, rank_pairs, get_market_sentiment and read_export.
get_market_sentiment
Computed sentiment per pair (symbol, up to ten) or, without it, for the whole market: for each indicator a score from 0 to 100, a state and a meaning, one sentence with its figures, frozen per closed bucket (timeframe 1h, 4h or 1d). A history needs last or since_ms.
Parameters
symbolstring[]- 1 to 10 pairs; omit for the whole market.
timeframestringdefault 1h- 1h, 4h or 1d.
indicatorsstring[]- The indicators to keep (default all). A history costs one quota request per pair and per indicator: name only those you need.
since_ms / until_msstring- The bounds of a history: epoch milliseconds, an ISO 8601 date or a duration ago ('48h').
laststring- History over the given duration ('7d', '30d'); replaces since_ms (both together are refused).
limitintegerdefault 100- History rows per series, 1 to 1000.
detailstringdefault summary- summary: score, state, meaning, confidence and drivers; full adds components, the sub-indicators with their percentile in the pair’s own history.
dry_runbooleandefault false- Plans the call without making it: its quota cost, your remaining rate and quota, the checks. No data, no quota.
max_quota_costinteger- Refuses the call, before any request, if it would use more quota requests than this.
max_tokensintegerdefault 6000- Response budget in estimated tokens, from 1,500 up to 16,000 (default 6,000). The same parameter on every data tool, get_market_indicators, rank_pairs, get_market_sentiment and read_export.
#Real-time and alerts
Six tools read the real-time stream — the same feed as the WebSocket API — and manage alerts. They come with the plans that include WebSocket access; on other plans they answer 403 plan_websocket (list_alerts and delete_alert stay open). Reading live data holds one WebSocket connection of your plan per API key, closed after five minutes without a call. They use no quota.
get_live_data
One pair, observed over window_seconds, returned as a summary, never the raw feed:
trades:trade_count,volume_usd, buy and sell volume,net_flow_usd= the aggressive delta,vwap,change_pct, the largest trades;book(consolidated): best bid and ask,mid_price,spread_bps,bid_depth_usdandask_depth_usd,bid_ratio;liquidations(futures).
A window your connection already covers answers at once.
Parameters
pairstring- The pair, e.g. BTCUSDT.
marketstringdefault futures- futures (perpetual) or spot.
window_secondsintegerdefault 10- 1 to 60 seconds.
get_market_snapshot
Up to ten pairs in one call, over the last five seconds: last_price, change_pct, volume_usd, net_flow_usd, mid_price, spread_bps and bid_ratio.
Parameters
pairsstring[]- Up to ten pairs; default BTC, ETH, SOL, XRP, BNB and DOGE.
marketstringdefault futures- futures (perpetual) or spot.
get_stream_status
The stream’s health and freshness, whether your key holds a live connection and on which channels, your plan’s WebSocket connections and your active alerts against the limit. No parameter.
create_alert
A server-side alert: it fires once and keeps watching after the agent disconnects. Active alerts per account: 5, 50 or 500 depending on the plan.
condition, and what value means for it:
price_above/price_below: a price;change_pct: a % move withinwindow_minutes(+5 rise, -5 fall);liquidations: USD liquidated withinwindow_minutes;big_trade: the USD of one trade.
notify chooses how you are told:
| Value | What happens |
|---|---|
wait | The default. Holds the call until the alert fires, up to wait_seconds, with a progress notification every 15 seconds. If it has not fired, the alert stays active and list_alerts(alert_id, wait=true) resumes waiting. |
webhook | Answers at once, then POSTs a JSON to your HTTPS webhook_url when the alert fires, with X-BytNode-Timestamp and X-BytNode-Signature: sha256=…: the HMAC-SHA256 of timestamp + "." + body with the secret returned once at creation. Three attempts, public addresses only. |
mcp | Notifies the MCP session, only for clients that keep a notification stream open: the MCP 2026-07-28 protocol has none, and the call is then refused. |
Parameters
pairstring- The pair, e.g. BTCUSDT.
conditionstring- price_above, price_below, change_pct, liquidations or big_trade.
valuenumber- The threshold: a price, a % or USD.
notifystringdefault wait- wait, webhook or mcp.
marketstringdefault futures- futures (perpetual) or spot.
window_minutesintegerdefault 60- change_pct and liquidations: 1 to 240.
sidestring- liquidations: long or short; big_trade: buy or sell. Optional.
webhook_urlstring- HTTPS, notify=webhook only.
wait_secondsintegerdefault 240- notify=wait: how long to hold the call, up to 600.
expires_in_hoursintegerdefault 720- 1 to 720 (30 days).
notestring- Free text returned with the alert.
list_alerts
Your active alerts, and those that fired or expired in the last seven days, with what fired them (trigger) and the webhook delivery (delivery). With alert_id and wait=true, waits for that alert to fire.
Parameters
alert_idstring- One alert, e.g. al_1a2b3c4d5e6f7a8b.
statusstring- active, triggered or expired.
waitbooleandefault false- With alert_id: wait for it to fire.
wait_secondsintegerdefault 240- With wait=true: how long to hold the call, up to 600.
delete_alert
Stops an alert at once; it is no longer listed.
Parameters
alert_idstring- One alert, e.g. al_1a2b3c4d5e6f7a8b.
#Your portfolio
Three read-only tools read the exchange accounts you connected in the console. They answer about you, not about the market: get_my_portfolio, get_my_portfolio_history and get_my_activity.
| Tool | Answers | REST routes it calls | Main parameters |
|---|---|---|---|
get_my_portfolio | What do my exchange accounts hold now? | /v1/portfolio; with detail=full, also /v1/portfolio/balances and /v1/portfolio/accounts | account_id, detail (summary or full) |
get_my_portfolio_history | How did their value change? | /v1/portfolio/history | account_id, last or since_ms / until_ms |
get_my_activity | What did I do? | /v1/portfolio/trades/v1/portfolio/transfers/v1/portfolio/funding/v1/portfolio/ledger | kinds, account_id, last or since_ms / until_ms, limit, cursor |
All three also take dry_run, max_quota_cost and max_tokens, like the other tools.
What they return
- Read-only: nothing can be traded or moved. Amounts are in dollars at BytNode prices; an asset with no price is never estimated (
value_usdisnulland the asset is listed inunpriced). get_my_portfolio:total_usd,accounts,assets(amount, value, share),wallets_usd,positionsandopen_orders.detail=fulladds every balance line and the accounts.get_my_portfolio_history: one value per day, newest first (30 days by default, up to 730), with the change over the period, the high, the low and the maximum drawdown. Deposits and withdrawals move the value: checkget_my_activitybefore calling a change a gain.get_my_activity: trades, deposits, withdrawals, funding payments and the ledger, newest first, 50 rows per kind by default (500 at most). For each kind that has more rows,next_cursorgives the cursor to pass ascursor, with that kind alone inkinds.- No connected account:
datacomes back empty withunavailable: no_exchange_account. It is not an error.
Key and quota
- The tools go through the same REST routes as the API (
/v1/portfolio/*): same key, same rate limit, same quota. One accepted request is one unit, on every plan, Free included. get_my_portfoliocosts 1 request (detail=full: 3),get_my_portfolio_history1, andget_my_activity1 per kind (5 when every kind is read).api_requestsgives the real count;dry_run=trueplans it.- A key with no customer behind it, a system key for instance, receives
403 portfolio_no_account. - When the service that reads your accounts cannot be reached:
503 portfolio_unavailable.
Hide the tools
Connect with ?portfolio=off at the end of the server address and the three tools do not exist for that client:
{
"mcpServers": {
"bytnode": {
"type": "http",
"url": "https://api.bytnode.com/mcp?portfolio=off",
"headers": { "X-API-KEY": "your_key" }
}
}
}- They are absent from
tools/list. - A call to one of them is refused:
Error (HTTP 403), codeportfolio_tools_off. - The parameter is read at every request (the protocol has no session): it applies to the address configured in your MCP client, not to one conversation. To get the tools back, configure the address without it.
- The MCP screen of the console writes the configuration with or without it.
#Current crypto market data or history
The mode follows from a single thing: the presence of a dated window. Without since_ms, until_ms or last, a data tool answers with the current value; with one of them, every requested field answers with its history over the window — several dated metrics in one call.
| Request | What each field returns |
|---|---|
| fields: [...] | Each field’s latest point; for a bucketed series, the last closed bucket. |
| limit: N | The N latest points of each series; for a field tagged timeframe, the N latest buckets of timeframe (1h by default): basis, oi_change and the other per-minute series are then aggregated by bucket. A current-value-only field gives one. |
| since_ms / until_ms, or last | Its whole series over the period, never cut silently (rules below). |
| live: true | The fields listed below gain the candle still forming, provisional. Refused with a window, and when no requested field serves it. |
How a dated window is read:
- A row is returned when its time (the start of its bucket) is ≥
since_msand ≤until_ms; an unfinished bucket is never returned. lastmovessince_msback to the start of its bucket:last: '24h'in 1h gives all 24 closed buckets,since_ms: '24h'at most 23.- Without a timeframe, the server picks a step giving about 200 points for the whole call and says so in
ranges.note. - An imposed timeframe that does not fit is refused before the call, with the exact reason (outside your plan, or too many points for one call) and the step that would work.
Fields that serve the candle still forming
klinescvdspread_interexchangetrades_klinetrades_kline_spottrades_kline_futures
#Targeting crypto pairs and markets
Each data tool has its target:
- a pair for
get_pair_data(symbol, required); - an asset for
get_options_data(asset, required); - a catalogue series for
get_macro_data(series); - none for
get_market_overviewandget_onchain_data.
Each field belongs to one tool. Anything that does not fit is refused before the first network call, never absorbed, and every problem is listed in the same message.
| Case | Response |
|---|---|
| A missing target | An error naming the missing parameter, with an example: symbol and asset are required by their tool’s schema, series by macro_intraday and by the history of macro. |
| A field asked from the wrong tool | Error: 'fear_greed' is a field of get_market_overview: call that tool. The message names the field’s tool rather than a neighbouring field. |
| series that no requested field expects | Error: only macro and macro_intraday read series; the computed macro fields have no target. |
| asset filled in with a pair | Error: asset expects the asset alone. There is no automatic derivation. |
| A parameter the chosen route does not accept | Error: for example expiry on the current value of options_max_pain, which only its history accepts. |
| A timeframe that no field uses | Error: the timeframe applies to no requested field (each tool says which fields take it: klines, cvd, trades_kline… for a pair, global_market, macro_intraday, btc_fees). |
| A dated window on a field that has none | Error: the field has no dated history; ask for its current value, without a window, or for the field that carries its history, which the message names (price_change → klines, funding_next → funding_rate). |
| last together with since_ms | Error: last replaces since_ms, give one of them. A bound that is neither epoch milliseconds, nor an ISO 8601 date, nor a duration is refused with the accepted forms. |
| More than 10 pairs in symbol | Error: at most 10 pairs per call, with the number given. |
#The 63 crypto market fields
The names are those of the API, the same for the current value and the history, with these differences:
- the global market is
global_markethere andglobalin the REST snapshot (globalis a reserved word in Python, the server’s language); - the market is a parameter here (
market: "spot") and a path suffix in REST (/v1/cvd/spot); - the figures of each options expiry come with
expiries: trueofget_options_data(REST:/v1/options/expiry); - the capabilities of a pair come with the
symbol_capabilitiescatalogue (REST:/v1/capabilities?symbol=…); - a history says the step the tool used in
timeframe_applied, since it may choose it.
The detail of each field — its tool, what it contains, its units, what N counts, its ceiling, its history — is given by describe_fields; each tool’s description carries one line per field, with its tags (timeframe, current value only, live, maximum limit). See also the data catalogue.
get_pair_data: twenty-four per-pair fields (symbol)
klinesprice_changetrades_spottrades_futurestrades_largetrades_kline_futures_secondsoifunding_nextfunding_ratefunding_cumulativebasisoi_changeliquidations_eventsliquidations_cumulativeliquidations_big_small_ratioorderbookcvdspread_interexchangebuy_sell_ratiotrades_avg_sizetrades_klinetrades_kline_spottrades_kline_futurestokenomics
get_options_data: eleven per-asset fields (asset)
options_summaryoptions_oioptions_oi_changeoptions_oi_distributionoptions_volumeoptions_put_call_ratiooptions_ivoptions_iv_klinesoptions_max_painoptions_greeksetf_fundamentals
The options fields and etf_fundamentals. The active expiries, with the figures of each, come with expiries: true. options_max_pain lists every active expiry, nearest first, and limit: N keeps the N nearest, without a window; a window gives the history of one expiry, then required.
get_market_overview: six whole-market fields (no target)
global_marketfear_greedfear_greed_cmcaltcoin_seasoncmc20cmc100
get_macro_data: six macro fields
macromacro_intradaymacro_net_liquiditymacro_correlationsmacro_momentummacro_risk
macro without series returns the last value of every FRED series; with it, that series alone, and its history requires it. macro_intraday always requires it and refuses 30m. The two do not carry the same instruments: do not substitute one for the other. The four computed fields (macro_net_liquidity, macro_correlations, macro_momentum, macro_risk) take no series.
get_onchain_data: sixteen on-chain fields (no target)
btc_networkbtc_mempoolbtc_feesbtc_miningbtc_mvrvbtc_nvtbtc_active_addressesbtc_revenue_per_difficultyeth_supplyeth_gaseth_stakingeth_deflationeth_defieth_gas_momentumeth_squeezeeth_price_btc
Only btc_fees takes a timeframe; the history of btc_mining takes a dataset; the valuations (btc_mvrv, btc_nvt…) are daily.
Current value only
price_changetrades_spottrades_futurestrades_largetrades_kline_futures_secondsfunding_nextliquidations_eventsmacro_correlationsmacro_momentummacro_riskoptions_summaryoptions_oi_distributionoptions_greeks
These fields have no dated history: they serve their current value (one point, or with limit the N latest where the field counts rows — trades, liquidation events). A since_ms or until_ms window on them is refused rather than ignored — an AI agent would believe it filtered a period while receiving the latest points.
#The response: crypto market data your AI agent can read
The data keeps the API’s names, units and conventions, under one key per field, but it is presented for an AI agent rather than returned unchanged.
A field with a timeframe is keyed field@tf; with several pairs, every key is prefixed with its pair (ETHUSDT/funding_next, BTCUSDT/cvd@1h).
A response carries:
- always
mode,data,api_requests,server_time(the server’s time, ISO 8601 UTC),mcp_version(the version of the MCP surface) andresponse_tokens(its own size, in estimated tokens); - when they apply,
scopes,summary,ranges,freshness,warnings,errors,partial,unavailable,omitted_columns,missing,truncation,export,timeframe_appliedandwindow.
get_market_indicators and rank_pairs answer in the same envelope. An empty or not applicable series is null, and unavailable says why. unavailable and out_of_plan_fields are those of the snapshot.
No tool declares an outputSchema: the keys are described here, and structuredContent carries the same JSON as the text.
{
"mode": "latest",
"data": {
"klines@1h": {
"first_time": "2026-10-21T13:00:00.000Z",
"step_s": -3600,
"columns": ["open", "high", "low", "close", "volume"],
"rows": [[…], …]
},
"oi@1h": { "first_time": …, "step_s": -3600, "columns": ["oi", "oi_usd", … ], "rows": [ … ] },
"funding_next": { … },
"price_change": { … }
},
"scopes": {
"symbol:BTCUSDT": ["klines@1h", "oi@1h", "funding_next", "price_change"]
},
"summary": {
"klines@1h": { "column": "close", "latest": …, "min": …, "max": …, "mean": …,
"change_pct": …, "high_max": …, "low_min": …, … }
},
"freshness": { "age_s": { "klines@1h": 4, "funding_next": 2, … }, "stale": [] },
"omitted_columns": { "klines@1h": ["is_closed"] },
"timeframe_applied": "1h",
"unavailable": { … },
"api_requests": 1,
"server_time": "2026-10-21T14:02:31.512Z",
"response_tokens": 1840
}The keys of the response, one by one:
data: a list of rows comes as{columns, rows}, rows newest first; a single point as an object; an empty or not applicable series asnull.- A series at a regular step has no
timecolumn butfirst_timeandstep_s, whatever its number of rows, one included: row i is datedfirst_time + i × step_s,step_sbeing negative, from the newest row back; at the slightest gap, thetimecolumn stays. - Events (individual trades, liquidations) and tables keep their
time, and what every row shares is said once on the block:date(eachtimeis then the UTC time of that day,12:54:30.494Z) or a singletime(every row at that instant, as in a table of expiries);.000is dropped when no row has milliseconds. - Floats keep 6 significant digits, except supplies and cumulative totals, which keep their whole units.
- With
detail: "compact"(the default), heavy rows keep their main columns,is_closedis dropped when every row is closed and trade ids are dropped;omitted_columnsnames what was left out, anddetail: "full"returns it.
- A series at a regular step has no
scopes: the real scope of each key —symbol:X,asset:X,series:Xormarketfor a field with no target.macroasked for withoutseriesis labelledmarket, never with a series. With several pairs, a key’s prefix already names its pair: only the scopes of the other targets remain (market…).mode:latestorhistory; in history,windowrepeats the bounds andrangesgives, per series, what is really covered:timeframe,row_count,fromandto(the start of the first and of the last bucket, like thetimeof every row),noteandtruncated;- when a series is cut,
missingsays how to get the rest — a lowerlimit, an earlier window ending atnext_until_ms, orread_exportfrom the offset it gives.
summary: per series, on its main column:- the latest and oldest values, the min and max with their time, and the mean;
- for a flow (liquidations, net volume…), the sum, with
sumsof its parts (long_usdandshort_usd,buy_volumeandsell_volume); - for a state, the change (and
change_pctwhen meaningful); - candles add
high_maxandlow_minwith their time; individual trades and liquidations addby_side(count, quantity and USD per side).
freshness(current value):age_s, the seconds since each key’s source feed last delivered (the date of a row is itstime), andstale, the keys whose feed is late, from the feed monitor;warningsnames every stale field — its value is not current — and every projection column a field ignored.- Size: a response is bounded to 6,000 estimated tokens by default; the
max_tokensparameter of the data tools,get_market_indicators,rank_pairs,get_market_sentimentandread_exportsets it from 1,500 up to 16,000, andresponse_tokensgives the size of each response. Beyond the budget:- the heaviest series keep their most recent rows;
- the cut is stated once, in the
rangesof each series:row_countrows returned oftotal_row_count, andmissing, how to get the rest, often themax_tokensthat fits the whole response; - the same field cut for several pairs carries one instruction, in the top-level
missing;truncationonly for what has noranges; - the metadata identical for several pairs (
ranges,omitted_columns,freshness) is written once per field, under the field’s name; exportkeeps the full data for one hour, for the same key:read_exportreads it page by page withexport.export_id, in the format of the responses, with no API request and no quota.- The export is also the MCP resource
bytnode://exports/{id}, for clients that read resources, in one block, with 8 significant digits and thetimeof every row.
timeframe_applied: the step actually applied, as soon as a field used it;live: present when the candle still forming was asked for.errorsandpartial: a field in error does not block the others, nor a refused pair the other pairs. It is reported undererrors(a pair under its name) and the response carriespartial: true.api_requests: the requests this call counted against your quota — for each pair, one for the current values of the snapshot fields together; one for every other field, every history andexpiries.oi_usd: every row ofoicarries the open interest in USD,oi× the close of the reference spot candle of the same bucket (nullwithout it), in current value too, at no extra request;get_pair_briefcarries it as well.cumulative_net_volume: every row ofcvdcarries it, the running total ofnet_volumefrom the oldest row of the series served: the CVD curve over the period.liquidations_cumulative: its current value is its last closed bucket (1h by default), dated at its start like any row.context(always inget_pair_brief, withcontext=trueonget_pair_data,get_options_dataandget_market_overview): for each series, where its latest value sits in its own recent history. It places a value; it is not a signal.value,percentile(0 to 100, ties count half),z(standard deviations from the mean),n(points compared) andwindow;vs, what it is compared with: the settled funding of 8h windows over 70 days, the same hour of day over 30 days, daily returns over 90 days…;- the reference history is read by the server, with the same window on every plan and no quota;
- an entry can be
unavailable:warming(computed in the background, ready on a later call),history_too_short,stale_feed,not_covered.
#Errors on crypto market data calls
Every error starts with Error (HTTP NNN): message. When the API answered, it ends with [code: …], the API’s stable error.code.
A failed tool call is flagged as an MCP error (isError), never returned as data, and carries the same error as fields in structuredContent.error: {status, code, message, param?, hint?, retry_after_s?}.
Its code is:
- the API’s when it gave one (
invalid_symbol,plan_family,history_depth,rate_limited,quota_exceeded…); - otherwise, one that follows the status (
invalid_requestfor a 422,unauthorizedfor a 401…); wrong_toolfor a field asked from the wrong tool, with the right tool inhint(call get_market_overview);unknown_fieldfor an unknown field or column,unknown_parameterfor an unknown parameter, withdid you mean …inhint.
retry_after_s is the delay to wait when the message states one.
| Situation | Behaviour |
|---|---|
| Request without a valid key | 401, X-Deny-Reason: missing_api_key (or invalid_api_key), before a single tool is announced. |
| Invalid request | Error (HTTP 422) listing every problem, before any network call. |
| Family outside the plan | Error (HTTP 403): The 'options' data family is not included in your plan. GET /v1/limits lists the families of your key; https://bytnode.com/pricing lists the plans that open it. [code: plan_family] — the data exists, just not in your plan. |
| Snapshot outside the plan (Free) | An explicit Error (HTTP 403) on current values (the snapshot fields, get_pair_brief), naming the plan that opens them; the other fields are still served, and a short history (last: '1h') gives the latest points. |
| A period beyond the plan’s depth | Refused before the call, with the plan’s depth at that step and the step that would serve the period; at the boundary, the API’s Error (HTTP 403) [code: history_depth]. |
| Rate limit or quota | Error (HTTP 429) with the detail of the API: rate per minute, or monthly quota. |
| One field in error | Reported under errors, the others served, partial: true; an identical error on several fields is written once (same error as '…'). The call fails only when no field succeeds. |
| One pair refused among several | Reported under errors with its name (an invalid symbol, for instance), the other pairs served, partial: true. The call fails only when no pair succeeds. |
| An invalid symbol | The API’s Error (HTTP 422), ending with [code: invalid_symbol], which lists the accepted values; the live list comes from get_system_info. |
| An expired or unknown export | Error (HTTP 404) from read_export, ending with [code: not_found]: an export lives one hour and is read with the key that produced it; call the tool again. |
| Upstream not answering | One retry on 502, 503, 504 or a network failure. A 500 is not replayed: every request counts against your quota. |
| Timeout | Error (HTTP 504) after thirty seconds without a response. |
| Internal server error | Error (HTTP 500) with the type of the error only; the detail stays in the server log. |
| A portfolio tool refused | 403, portfolio_tools_off when the address carries ?portfolio=off; 403, portfolio_no_account for a key with no customer behind it. |