市场数据

面向 AI 智能体的宏观数据 API

一个 API 获取加密市场的宏观背景:利率、美元、流动性、股指、黄金与原油,涵盖日频与日内数据,并提供以比特币为参照的衍生指标。无需在加密市场数据之外再对接宏观数据源:同一密钥、同一格式。

加密市场所处的宏观环境:利率、美元、流动性、指数、黄金和原油,含日度与日内数据。这些接口都是全市场数据。

#面向 AI 智能体与 LLM 的宏观数据

“美国 10 年期收益率在上升吗?”“净流动性相对比特币如何变化?”“当前哪些宏观序列与 BTC 同步?”:AI 智能体通过 MCP 工具 get_macro_data 读取宏观背景,可逐个读取目录序列,也可读取衍生指标。

MCP tools/call
一次 MCP 调用获取最新的美国 10 年期国债收益率(DGS10)。
{
  "name": "get_macro_data",
  "arguments": {
    "series": "DGS10",
    "fields": ["macro"]
  }
}
  • 给 LLM 的提示:序列以其目录标识符命名(DGS10 即美国 10 年期收益率),不要猜测:get_system_info 会列出目录。
  • 给开发者:/v1/macro?series= 与 /v1/macro/series 为你自己的 AI 智能体提供用于 tool calling 的工具及其目录,与 MCP 服务器所用的组合相同。
  • 适用环境:Claude、ChatGPT、Cursor 及任何 MCP 客户端,包括支持 MCP 的 AI 智能体框架,如 LangChain 或 n8n。

通过 MCP 服务器指南接入你的 AI 智能体,或用开源的 Agent Skills 教它使用 BytNode。

#日度宏观序列

GET/v1/macrodata_type · macro完整参考
此接口的全部 6 个字段(取自接口契约)
timeISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)The day of the observation, at midnight UTC.
categorySeries category.
nameHuman-readable name of the series.
frequencyPublication frequency of the source (`daily`, `weekly`, `monthly`).
unitsUnit of `value` as published by the source.
valuesee `units`Latest value of the series, in the unit given by `units`.
GET/v1/macro/seriesdata_type · macro_series完整参考
此接口的全部 7 个字段(取自接口契约)
timeISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)The day of the latest observation of the series, at midnight UTC.
seriesSeries identifier (the value of the `series` parameter).
categorySeries category.
nameHuman-readable name of the series.
frequencyPublication frequency of the source (`daily`, `weekly`, `monthly`).
unitsUnit of `value` as published by the source.
valuesee `units`Latest value of the series, in the unit given by `units`.
GET/v1/macro/historydata_type · macro_history完整参考
此接口的全部 3 个字段(取自接口契约)
timeISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)The day of the observation, at midnight UTC.
valuesee the series `units`Value of the series on the day of `time`.
is_closed`true` = the row is final; `false` = provisional: the latest bucket while it still settles (a few seconds after its end, e.g. a candle whose volumes are not final yet), or the period in progress with `?live=1` on the routes that take it. Exception, rare: when a venue delivers trades LATE (seconds to minutes, e.g. during a burst), a closed row built from trades (trade candles, candle volumes, CVD, buy/sell ratio, trades per second) is corrected afterwards to include them, usually within minutes and at most one hour later; the correction only adds the late trades.

约二十个美国官方序列外加黄金,分为八个类别。/v1/macro 返回由 ?series=(必填)指定的某一个序列的最新值;/v1/macro/series 是目录,附每个序列的最新值;/v1/macro/history 返回由 ?series= 指定的某个序列的历史。

类别序列
外汇广义美元、新兴市场美元、EUR/USD、USD/JPY
利率联邦基金利率、2 年期、10 年期、30 年期,以及 10 年减 2 年、10 年减 3 个月的利差
通胀CPI、PCE、5 年与 10 年盈亏平衡通胀率
流动性M2、基础货币、美联储资产负债表、财政部一般账户、隔夜逆回购
波动率VIX
股票标普 500、纳斯达克综合指数
就业失业率、非农就业
大宗商品黄金、WTI 原油
curl
# The catalogue of the series served
curl -H "X-API-KEY: $BYTNODE_API_KEY" "https://api.bytnode.com/v1/macro/series"

# The history of one series
curl -H "X-API-KEY: $BYTNODE_API_KEY" \
  "https://api.bytnode.com/v1/macro/history?series=DGS10&limit=90"
字段类型说明
seriesstring传入 ?series= 的标识符。
categorystring八个类别之一。
namestring序列的可读名称。
unitsstring数值的单位。各序列不同:未经确认切勿将两个序列相加。
timestring观测日,UTC 零点。
valuefloat观测值。

#衍生指标

四个综合读数,基于原始序列和比特币价格按需计算。

GET/v1/macro/correlationsdata_type · macro_correlations完整参考
此接口的全部 8 个字段(取自接口契约)
timeISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)Point-in-time value: the last date used by the window (at the top level, the most recent of all windows; see `oldest_input_date`).
oldest_input_datecalendar date (YYYY-MM-DD)Date of the OLDEST input the value uses (a monthly series lags a daily one): the value cannot be fresher than this input. `time` is the most recent input; each component carries its own date.
methodHow the value is computed.
correlationsPearson correlation from -1 to 1, per macro series and window, with `sample_count` = number of common days.
correlations.dxyPearson correlation of daily returns against BTC over the last dxy, from -1 to 1.
correlations.sp500Pearson correlation of daily returns against BTC over the last sp500, from -1 to 1.
correlations.goldPearson correlation of daily returns against BTC over the last gold, from -1 to 1.
correlations.vixPearson correlation of daily returns against BTC over the last vix, from -1 to 1.

比特币与美元、标普 500、黄金和 VIX 的滚动相关性,窗口为三十天和九十天,基于共同日期的日收益率计算。在对齐的历史不足时,相关性保持为 null。

GET/v1/macro/net-liquiditydata_type · macro_net_liquidity完整参考
此接口的全部 7 个字段(取自接口契约)
timeISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)The day the value refers to, at midnight UTC.
net_liquidity_usdUSDFed balance sheet (WALCL) - Treasury General Account (TGA) - overnight reverse repo (ON RRP), in USD.
walcl_usdUSDFed total assets (WALCL), as known on that day.
tga_usdUSDTreasury General Account (WTREGEN), as known on that day.
rrp_usdUSDOvernight reverse repo (RRPONTSYD) of that day.
walcl_datecalendar date (YYYY-MM-DD)Observation day of the WALCL value used (weekly series).
tga_datecalendar date (YYYY-MM-DD)Observation day of the TGA value used (weekly series).
GET/v1/macro/net-liquidity/historydata_type · macro_net_liquidity_history完整参考
此接口的全部 8 个字段(取自接口契约)
timeISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)The day the value refers to, at midnight UTC.
net_liquidity_usdUSDFed balance sheet (WALCL) - Treasury General Account (TGA) - overnight reverse repo (ON RRP), in USD.
walcl_usdUSDFed total assets (WALCL), as known on that day.
tga_usdUSDTreasury General Account (WTREGEN), as known on that day.
rrp_usdUSDOvernight reverse repo (RRPONTSYD) of that day.
walcl_datecalendar date (YYYY-MM-DD)Observation day of the WALCL value used (weekly series).
tga_datecalendar date (YYYY-MM-DD)Observation day of the TGA value used (weekly series).
is_closed`true` = the row is final; `false` = provisional: the latest bucket while it still settles (a few seconds after its end, e.g. a candle whose volumes are not final yet), or the period in progress with `?live=1` on the routes that take it. Exception, rare: when a venue delivers trades LATE (seconds to minutes, e.g. during a burst), a closed row built from trades (trade candles, candle volumes, CVD, buy/sell ratio, trades per second) is corrected afterwards to include them, usually within minutes and at most one hour later; the correction only adds the late trades.

净流动性:美联储资产负债表减去财政部一般账户,再减去隔夜逆回购。响应包含公式及各组成部分,并明确标注单位,因为三个源序列的单位不同。

GET/v1/macro/momentumdata_type · macro_momentum完整参考
此接口的全部 9 个字段(取自接口契约)
timeISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)Point-in-time value: the date of the most recent input. See `oldest_input_date` for the stalest one.
oldest_input_datecalendar date (YYYY-MM-DD)Date of the OLDEST input the value uses (a monthly series lags a daily one): the value cannot be fresher than this input. `time` is the most recent input; each component carries its own date.
scaleReading scale of the score.
30dMomentum score over the last 30d, from -100 to +100.
30d.scorescore from -100 to +100Macro momentum for crypto: positive = macro tailwind (weaker dollar, growing liquidity).
30d.componentsThe inputs of the score and their contributions.
90dMomentum score over the last 90d, from -100 to +100.
90d.scorescore from -100 to +100Macro momentum for crypto: positive = macro tailwind (weaker dollar, growing liquidity).
90d.componentsThe inputs of the score and their contributions.

取值 −100 到 +100 的评分,基于 M2、美联储资产负债表和美元在三十天和九十天内的动态。货币供应上升、美元走弱会推高评分。每个组成部分都带有以百分比表示的变化率 change_pct。

GET/v1/macro/riskdata_type · macro_risk完整参考
此接口的全部 22 个字段(取自接口契约)
timeISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)Point-in-time value: the date of the most recent signal. See `oldest_input_date` for the stalest one.
oldest_input_datecalendar date (YYYY-MM-DD)Date of the OLDEST input the value uses (a monthly series lags a daily one): the value cannot be fresher than this input. `time` is the most recent input; each component carries its own date.
scorescore from 0 to 100Share of risk-on signals × 100.
label`risk_on` (score above 50), `risk_off` (below 50) or `neutral` (exactly 50).
risk_on_signal_countcountSignals currently risk-on.
available_signal_countcountSignals that could be evaluated (data available).
signal_countcountSignals in the model.
signalsEach signal: its `condition` and whether it is risk-on now (`is_risk_on`).
signals.vixThe `vix` signal: its reading, and whether it counts as risk-on.
signals.dxyThe `dxy` signal: its reading, and whether it counts as risk-on.
signals.yield_curveThe `yield_curve` signal: its reading, and whether it counts as risk-on.
signals.sp500The `sp500` signal: its reading, and whether it counts as risk-on.
signals.goldThe `gold` signal: its reading, and whether it counts as risk-on.
contextThe raw inputs used by the signals.
context.vixindex pointsCBOE Volatility Index.
context.dxyindex pointsUS Dollar Index.
context.dxy_7d_agoindex pointsUS Dollar Index seven days earlier.
context.yield_curve_10y2y_pppercentage points10-year minus 2-year US Treasury yield.
context.sp500index pointsS&P 500.
context.sp500_sma_50dindex points50-day simple moving average of the S&P 500.
context.gold_usdUSD per troy ounceGold price.
context.gold_7d_ago_usdUSD per troy ounceGold price seven days earlier.

基于五个信号、取值 0 到 100 的评分:VIX 低位、美元回落、收益率曲线斜率为正、标普高于五十日均线、黄金回落。没有数据的信号会被排除在计算之外,而不是被视为不利。

#日内宏观

GET/v1/macro/intraday/seriesdata_type · macro_intraday_series完整参考
此接口的全部 16 个字段(取自接口契约)
seriesSeries identifier (the value of the `series` parameter).
sourceUpstream source.
instrument_codeCode of the instrument at the source (informative; use `series` in requests).
categorySeries category.
nameHuman-readable name of the series.
unitsUnit of `value` as published by the source.
volume_kindWhat `volume` measures for this instrument (`broker` = the source's own flow, not the whole market).
timeframesTimeframes natively collected for the series.
history_start_datecalendar date (YYYY-MM-DD)First day of available history.
last_candle_atLast candle available, per timeframe.
last_candle_at.1mStart of the latest 1m candle served for this series (ISO 8601 UTC).
last_candle_at.5mStart of the latest 5m candle served for this series (ISO 8601 UTC).
last_candle_at.15mStart of the latest 15m candle served for this series (ISO 8601 UTC).
last_candle_at.1hStart of the latest 1h candle served for this series (ISO 8601 UTC).
last_candle_at.4hStart of the latest 4h candle served for this series (ISO 8601 UTC).
last_candle_at.1dStart of the latest 1d candle served for this series (ISO 8601 UTC).
GET/v1/macro/intraday/historydata_type · macro_intraday_history完整参考
此接口的全部 7 个字段(取自接口契约)
timeISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z)Start of the bucket the row covers: a 1h bucket at 14:00 covers 14:00:00 to 14:59:59.999.
openseries unitOpen.
highseries unitHigh.
lowseries unitLow.
closeseries unitClose.
volumesee `volume_kind`Volume reported by the source for this instrument (not the whole market).
is_closed`true` = the row is final; `false` = provisional: the latest bucket while it still settles (a few seconds after its end, e.g. a candle whose volumes are not final yet), or the period in progress with `?live=1` on the routes that take it. Exception, rare: when a venue delivers trades LATE (seconds to minutes, e.g. during a burst), a closed row built from trades (trade candles, candle volumes, CVD, buy/sell ratio, trades per second) is corrected afterwards to include them, usually within minutes and at most one hour later; the correction only adds the late trades.

五个宏观品种的 OHLC K 线,用于按小时而非按天与加密资产比较:EUR/USD、USD/JPY、WTI 原油、ICE 美元指数和代币化黄金,每个提供六个周期(1m 至 1d,无 30m)。10 年和 30 年期利率、VIX、标普 500 和纳斯达克是 FRED 每日序列,由 /v1/macro 提供。

参数类型默认值说明
seriesstring必填/v1/macro/intraday/series 返回的 series(例如 PAXGUSDT)。不接受目录中的 instrument_code 列。
timeframestring必填1m、5m、15m、1h、4h、1d——必填。每个序列只提供其目录条目中列出的周期;其他周期返回 422 timeframe_not_served。该市场数据族没有 30m 周期。
limitinteger100K 线数量,1 到 1000。
curl
curl -H "X-API-KEY: $BYTNODE_API_KEY" \
  "https://api.bytnode.com/v1/macro/intraday/history?series=PAXGUSDT&timeframe=1h&limit=200"

请求某个序列不提供的周期会返回 422 timeframe_not_served,并列出它提供的周期,而不是返回空列表,以免让人误以为数据有缺口。data 是 K 线列表,按时间从新到旧排列;series 和 timeframe 在外层信封中给出。