REST API

系统与元数据

五个不提供任何市场指标的接口:它们说明服务是否响应、数据是否新鲜、有哪些资产、每个资产实际能提供什么,以及你的密钥能做什么。

AI 智能体用一个 MCP 工具即可问同样的问题:get_system_info 返回服务健康状况和你的方案(市场数据族、历史深度、速率、剩余配额),不占用配额;还可按需返回所服务的交易对和数据新鲜度。见 MCP 服务器。

#服务健康状态

GET/v1/health无需密钥完整参考
此接口的全部 1 个字段(取自接口契约)
database`connected` when the service reaches its database. A failing check answers 503 `service_unavailable` with `database` in `error.details`.

探测接口。它说明服务是否运行、数据库是否响应。这是唯一无需密钥即可访问的接口,并且从不计入配额,因此监控系统可以随意查询而不消耗任何额度。

200
{
  "status": "ok",
  "server_time": "2026-11-08T12:51:13.156Z",
  "data_type": "health",
  "data": {
    "database": "connected"
  }
}

出现问题时:返回 503 及错误体(error.code: "service_unavailable",并在 error.details 下给出 database: "unreachable"、service 和 retry_after_s),以及 Retry-After 头。

#数据流新鲜度

GET/v1/status完整参考
此接口的全部 15 个字段(取自接口契约)
computed_atISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)When the status was measured: the OLDEST of its measurements (each data family is measured on its own, cached up to 5 minutes for market feeds and 30 seconds for the others). Every `age_s` is measured at or after this instant, not at `server_time`.
state`ok`, or `degraded` when at least one feed is stale or failed its check. The envelope's `status` stays `ok` (the request succeeded).
feed_countcountPublic feeds checked.
stale_feed_countcountFeeds older than their threshold.
error_feed_countcountFeeds that could not be checked.
max_age_ssecondsAge of the oldest feed.
feedsOne row per public feed.
feeds.feedPublic feed name. The closed list of this contract version; `routes` gives the routes each one supplies.
feeds.familyData family the feed belongs to, as in `/v1/limits` and the `x-family` of each route: `price_volume`, `derivatives`, `microstructure`, `trades`, `options`, `onchain`, `macro`, `etf`, `tokenomics` or `sentiment`.
feeds.routesThe public routes (contract paths) this feed supplies: watch this feed to know whether they are fresh. A per-timeframe feed (`cvd_1h`) supplies them at that timeframe.
feeds.age_ssecondsAge of the latest row of the feed. For a feed made of several series (one per asset, per macro series, per ETF), the age of its OLDEST series. For the market-hours intraday series (`macro_intraday_<tf>`, not `_continuous`), counted on weekdays only, like their threshold. `null` if the feed is empty or could not be checked.
feeds.expected_interval_ssecondsMaximum legitimate age of the feed.
feeds.threshold_ssecondsAge above which the feed is stale (1.5 × expected_interval_s).
feeds.is_staleWhether the feed is stale: older than `threshold_s`, or (series feed) at least one of its series is. `null` when the feed could not be checked (counted in `error_feed_count`).
feeds.stale_venue_countcountVenues lagging on this feed; `null` when the feed is not split by venue (every non-market feed).

每个数据流一行,使用其公开名称:距今时长、预期的发布节奏,以及服务器端计算的 is_stale 标志。所有数据流遵循同一条规则:超过预期节奏的 1.5 × 仍未交付,即视为延迟。不暴露内部表名、交易所名称或行数。在构建分析之前应先查询此接口:提前知道数据陈旧,好过在结果中才发现。它覆盖所有市场数据族:价格与成交量、衍生品、订单流、成交,以及期权、链上、宏观、ETF、代币经济和情绪。更新慢不等于延迟:月度宏观序列或季度 ETF 申报的距今时长达到数周是正常的,其 expected_interval_s 会说明这一点。

200
{
  "status": "ok",
  "server_time": "2026-11-08T12:51:14.698Z",
  "data_type": "status",
  "data": {
    "computed_at": "2026-11-08T12:51:13.669Z",
    "state": "ok",
    "feed_count": 82,
    "stale_feed_count": 0,
    "error_feed_count": 0,
    "max_age_s": 7649473.7,
    "feeds": [
      {
        "feed": "klines_futures_1m",
        "family": "price_volume",
        "routes": [
          "/v1/klines",
          "/v1/klines/history"
        ],
        "age_s": 73.7,
        "expected_interval_s": 120,
        "threshold_s": 180,
        "is_stale": false,
        "stale_venue_count": 0
      },
      {
        "feed": "klines_1m",
        "family": "price_volume",
        "routes": [
          "/v1/klines",
          "/v1/klines/history"
        ],
        "age_s": 73.7,
        "expected_interval_s": 180,
        "threshold_s": 270,
        "is_stale": false,
        "stale_venue_count": 0
      },
      {
        "feed": "klines_multi",
        "family": "price_volume",
        "routes": [
          "/v1/klines",
          "/v1/klines/history"
        ],
        "age_s": 373.7,
        "expected_interval_s": 660,
        "threshold_s": 990,
        "is_stale": false,
        "stale_venue_count": null
      }
    ]
  }
}
字段类型说明
statusstring请求成功时始终为 ok;数据流的状态见 data.state。
server_timestring响应生成的时刻,采用带毫秒的 ISO 8601 UTC 格式。
data.computed_atstring状态的测量时刻:取各项测量中最早的一次(市场数据流最多缓存五分钟,其他市场数据族三十秒)。每个 age_s 都在该时刻或之后计量,而不是 server_time。
data.statestringok;只要有一个数据流延迟或其检查失败,则为 degraded。
data.feed_countinteger已检查的数据流数量。
data.stale_feed_countinteger延迟的数据流数量。
data.error_feed_countinteger检查失败的数据流数量。
data.max_age_sfloat | null各数据流中观测到的最大距今时长。
data.feedsarray每个数据流一项,说明见下表。
每个数据流的字段类型说明
feedstring数据流的公开名称:klines_1m、funding_rate、cvd_1h、options_aggregates、btc_mempool、macro_daily_weekly、etf_filings……完整的封闭列表见契约(feed 的 enum)。
familystring该数据流所属的配额市场数据族,与 /v1/limits 及每个接口的 x-family 一致:price_volume、derivatives、microstructure、trades、options、onchain、macro、etf、tokenomics 或 sentiment。
routesstring[]提供该数据流数据的公开路由:数据流延迟时可据此知道哪些路由受影响。
age_sfloat | null距上次交付的秒数。由多条序列组成的数据流(每个资产、每条宏观序列、每只 ETF 一条),取其最旧序列的时长;交易时段内的日内宏观序列(macro_intraday_1m … macro_intraday_1d)只按工作日计算,与其阈值一致。若该数据流尚无数据或检查失败,则为 null。
expected_interval_sinteger预期节奏:该数据流仍属正常的最长距今时长(例如每日序列为一天)。
threshold_sinteger所采用的阈值,始终为 1.5 × expected_interval_s。
is_staleboolean | null若数据流超过其阈值、其中任一交易所超过阈值,或(序列型数据流)其中任一序列超过阈值,则为真。检查失败时为 null,并计入 error_feed_count。
stale_venue_countinteger | null该数据流上延迟的交易所数量,从不给出名称。若该数据流不按交易所拆分(市场数据族以外的所有数据流),则为 null。

#交易对目录

GET/v1/symbolsdata_type · symbols完整参考
此接口的全部 5 个字段(取自接口契约)
symbolTrading pair, e.g. `BTCUSDT`.
base_assetBase asset of the pair.
nameHuman-readable name.
quote_assetQuote currency of the pair (`USDT` for BTCUSDT, `USDC` for USDTUSDC): the currency of its prices.
marketsMarkets served for the pair: `spot` and `futures` (USDT-margined perpetual), or `spot` only for the two stablecoin pairs (their `/futures` routes answer `unavailable: not_applicable`).

已启用资产的实时列表。以它为准:不要在客户端硬编码列表,应在启动时读取。

200
{
  "status": "ok",
  "server_time": "2026-11-08T12:51:15.750Z",
  "data_type": "symbols",
  "data": [
    {
      "symbol": "AAVEUSDT",
      "base_asset": "AAVE",
      "name": "Aave",
      "quote_asset": "USDT",
      "markets": [
        "spot",
        "futures"
      ]
    },
    {
      "symbol": "ADAUSDT",
      "base_asset": "ADA",
      "name": "Cardano",
      "quote_asset": "USDT",
      "markets": [
        "spot",
        "futures"
      ]
    }
  ]
}
字段类型说明
symbolstring传入 ?symbol= 的标识符。
base_assetstring基础资产(BTC、ETH)。期权接口的 ?asset= 使用的就是它。
namestring完整名称,用于显示。
quote_assetstring计价货币:该交易对价格的币种(BTCUSDT 为 USDT,USDTUSDC 为 USDC)。
marketsstring[]提供的市场:spot 和 futures,两个稳定币交易对仅有 spot。

#能力报告

GET/v1/capabilitiesdata_type · capabilities完整参考
此接口的全部 25 个字段(取自接口契约)
asset_class`crypto` or `stablecoin` (spot only, no futures metrics).
feeds_active_last_24hPer source feed, under its `/v1/status` name (`trades_spot`, `trades_kline_futures_seconds`, `oi`, `funding_rate`, `klines_1m`...): whether it received data for this symbol in the last 24 h.
feeds_active_last_24h.klines_futures_1m`true` when the `klines_futures_1m` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.trades_spot`true` when the `trades_spot` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.trades_futures`true` when the `trades_futures` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.oibase asset quantity (BTC for BTCUSDT)`true` when the `oi` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.funding_rate`true` when the `funding_rate` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.liquidations_events`true` when the `liquidations_events` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.trades_kline_futures_seconds`true` when the `trades_kline_futures_seconds` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.klines_futures_multi`true` when the `klines_futures_multi` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.klines_1m`true` when the `klines_1m` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.klines_multi`true` when the `klines_multi` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
feeds_active_last_24h.orderbook_1m`true` when the `orderbook_1m` feed delivered data in the last 24 hours; `null` when its probe did not conclude in time.
computed_metrics_availableDerived metrics available for the symbol.
computed_metrics_blockedDerived metrics unavailable, with the missing feeds.
feeds_not_applicableFeeds that do not exist for this symbol (the futures feeds of a spot-only stablecoin), under their `/v1/status` names.
stablecoin_noteSpot-only stablecoin: why its futures feeds and derived metrics do not apply. Absent for any other symbol.
computed_metrics_not_applicableDerived metrics that do not apply (stablecoins have no futures).
computed_metrics_not_applicable.basisWhy `basis` does not apply to this symbol.
computed_metrics_not_applicable.oi_changebase asset quantity (BTC for BTCUSDT)Why `oi_change` does not apply to this symbol.
computed_metrics_not_applicable.liquidations_cumulativeWhy `liquidations_cumulative` does not apply to this symbol.
computed_metrics_not_applicable.liquidations_big_small_ratioWhy `liquidations_big_small_ratio` does not apply to this symbol.
computed_metrics_not_applicable.funding_cumulativeWhy `funding_cumulative` does not apply to this symbol.
computed_metrics_not_applicable.indicatorsWhy `indicators` does not apply to this symbol.
computed_metrics_not_applicable.trades_kline_futuresWhy `trades_kline_futures` does not apply to this symbol.

该资产实际能提供的内容,基于最近二十四小时测量。它让你能预判空响应而不是事后发现,并区分在此无意义的指标与暂时受阻的指标。

curl -H "X-API-KEY: $BYTNODE_API_KEY"   "https://api.bytnode.com/v1/capabilities?symbol=BTCUSDT"
字段类型说明
symbolstring所查询的资产——位于响应外层,与 data 并列。
asset_classstringcrypto 或 stablecoin。
feeds_active_last_24hobject被探测的数据流,根据其在窗口内是否产生数据分别为真或假;若探测未能及时得出结论则为 null。能力不等于新鲜度:二十小时前还活跃的数据流在这里仍为真。对于稳定币,只探测现货数据流。
computed_metrics_availablearray可计算的指标:其所有输入数据流都存在。
computed_metrics_blockedobject无法计算的指标,附缺失的数据流及原因。undetermined_feeds 列出探测超时的数据流:状态未知,而非缺失。
computed_metrics_not_applicableobject对于稳定币:所有源自期货市场的指标及其原因。这是有意为之,而非故障。
feeds_not_applicablearray针对稳定币:期货类数据流,这些数据流不做探测,而不是被报告为假。
stablecoin_notestring对于稳定币:现货上仍可用的内容。

未知或已停用的交易对会返回 422 invalid_symbol,并附有效交易对列表。

#你的方案限制

GET/v1/limitsdata_type · limits完整参考
此接口的全部 18 个字段(取自接口契约)
planYour plan: `free`, `traders`, `financial`, `startup` or `enterprise` (`legacy` for an internal unmetered key: every limit below is then unset).
familiesData families your plan includes (`price_volume`, `derivatives`, `microstructure`, `trades`, `snapshot`, `indicators`, `macro`, `options`, `onchain`, `etf`, `tokenomics`, `sentiment`); `null` = all of them. A route outside them answers 403 `plan_family`.
historyHistory window per timeframe, one object per timeframe the API serves.
history.timeframeThe timeframe the window applies to.
history.window_ssecondsHow far back this timeframe may be read, in seconds, measured from now; `null` = unlimited. Beyond it: 403 `history_depth`.
trades_window_ssecondsHow far back individual trades (`/v1/trades/spot`, `/futures`, `/large`) may be read, in seconds; `0` = not in your plan (family `trades`), `null` = unlimited.
liquidations_events_countcountHow many of the most recent individual liquidations `/v1/liquidations/events` may return, counted from the latest: 100 (Free), 500 (Traders), 1,000 (Financial), 10,000 (Startup); a larger `limit` answers 403 `history_depth`. `null` = no count set (Enterprise, or an unmetered key): up to 10,000 per call, the route's maximum. `0` = not in your plan (family `derivatives`).
rateThe per-minute rate, as a token bucket; `null` = unlimited or unmetered key. The same values as the `RateLimit` headers (`rate` policy).
rate.requests_per_minutecountRequests per minute of your plan (the bucket refills at this pace).
rate.burst_countcountCapacity of the bucket: requests you can send at once.
rate.refill_ssecondsSeconds to refill the bucket from empty.
rate.remaining_countcountRequests left right now (after this one).
rate.reset_ssecondsSeconds until fully restored.
quotaThe monthly quota; `null` = unlimited or unmetered key. The same values as the `RateLimit` headers (`quota` policy). It resets on the 1st of the month, 00:00 UTC.
quota.monthly_countcountRequests included per calendar month.
quota.month_length_ssecondsLength of the current calendar month, in seconds.
quota.remaining_countcountRequests left right now (after this one).
quota.reset_ssecondsSeconds until fully restored.

你的密钥能做什么,读取自为本次请求提供服务的方案:包含的市场数据族、每个周期的历史窗口、逐笔窗口、单笔爆仓的条数,以及每分钟速率和月度配额及其剩余量。分页前据此确定 limit 和 since_ms,而不是通过 403 history_depth 才发现窗口。不计入你的配额。使用不计量的密钥时,所有限制均为 null。

curl -H "X-API-KEY: $BYTNODE_API_KEY" "https://api.bytnode.com/v1/limits"
字段类型说明
planstring | null你的方案:free、traders、financial、startup 或 enterprise。
familiesstring[] | null你的方案包含的市场数据族;null 表示全部。超出这些市场数据族的接口返回 403 plan_family。
history[].timeframe / window_sstring / integer | null每个 timeframe 一条:可读取的回溯范围,单位为秒(window_s);0 = 不在您的方案内,null = 不限。
trades_window_sinteger | null逐笔成交(/v1/trades/*)可回溯读取的范围,单位为秒;0 = 不在您的方案内(trades 市场数据族),null = 不限。
liquidations_events_countinteger | null/v1/liquidations/events 可返回的最近单笔爆仓条数。
rateobject | null以令牌桶表示的每分钟速率:requests_per_minute、burst_count(突发容量)、refill_s(从空到满所需秒数)、remaining_count、reset_s。与 RateLimit 响应头的值相同。
quotaobject | null月度配额:monthly_count、month_length_s、remaining_count、reset_s(直到下月 1 日 00:00 UTC)。