面向 AI 智能体的宏观数据 API
一个 API 获取加密市场的宏观背景:利率、美元、流动性、股指、黄金与原油,涵盖日频与日内数据,并提供以比特币为参照的衍生指标。无需在加密市场数据之外再对接宏观数据源:同一密钥、同一格式。
加密市场所处的宏观环境:利率、美元、流动性、指数、黄金和原油,含日度与日内数据。这些接口都是全市场数据。
#面向 AI 智能体与 LLM 的宏观数据
“美国 10 年期收益率在上升吗?”“净流动性相对比特币如何变化?”“当前哪些宏观序列与 BTC 同步?”:AI 智能体通过 MCP 工具 get_macro_data 读取宏观背景,可逐个读取目录序列,也可读取衍生指标。
{
"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。
#日度宏观序列
此接口的全部 6 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | The day of the observation, at midnight UTC. |
category | Series category. | |
name | Human-readable name of the series. | |
frequency | Publication frequency of the source (`daily`, `weekly`, `monthly`). | |
units | Unit of `value` as published by the source. | |
value | see `units` | Latest value of the series, in the unit given by `units`. |
此接口的全部 7 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | The day of the latest observation of the series, at midnight UTC. |
series | Series identifier (the value of the `series` parameter). | |
category | Series category. | |
name | Human-readable name of the series. | |
frequency | Publication frequency of the source (`daily`, `weekly`, `monthly`). | |
units | Unit of `value` as published by the source. | |
value | see `units` | Latest value of the series, in the unit given by `units`. |
此接口的全部 3 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | The day of the observation, at midnight UTC. |
value | see 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 原油 |
# 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"| 字段 | 类型 | 说明 |
|---|---|---|
series | string | 传入 ?series= 的标识符。 |
category | string | 八个类别之一。 |
name | string | 序列的可读名称。 |
units | string | 数值的单位。各序列不同:未经确认切勿将两个序列相加。 |
time | string | 观测日,UTC 零点。 |
value | float | 观测值。 |
#衍生指标
四个综合读数,基于原始序列和比特币价格按需计算。
此接口的全部 8 个字段(取自接口契约)
time | ISO 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_date | calendar 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. |
method | How the value is computed. | |
correlations | Pearson correlation from -1 to 1, per macro series and window, with `sample_count` = number of common days. | |
correlations.dxy | Pearson correlation of daily returns against BTC over the last dxy, from -1 to 1. | |
correlations.sp500 | Pearson correlation of daily returns against BTC over the last sp500, from -1 to 1. | |
correlations.gold | Pearson correlation of daily returns against BTC over the last gold, from -1 to 1. | |
correlations.vix | Pearson correlation of daily returns against BTC over the last vix, from -1 to 1. |
比特币与美元、标普 500、黄金和 VIX 的滚动相关性,窗口为三十天和九十天,基于共同日期的日收益率计算。在对齐的历史不足时,相关性保持为 null。
此接口的全部 7 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | The day the value refers to, at midnight UTC. |
net_liquidity_usd | USD | Fed balance sheet (WALCL) - Treasury General Account (TGA) - overnight reverse repo (ON RRP), in USD. |
walcl_usd | USD | Fed total assets (WALCL), as known on that day. |
tga_usd | USD | Treasury General Account (WTREGEN), as known on that day. |
rrp_usd | USD | Overnight reverse repo (RRPONTSYD) of that day. |
walcl_date | calendar date (YYYY-MM-DD) | Observation day of the WALCL value used (weekly series). |
tga_date | calendar date (YYYY-MM-DD) | Observation day of the TGA value used (weekly series). |
此接口的全部 8 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | The day the value refers to, at midnight UTC. |
net_liquidity_usd | USD | Fed balance sheet (WALCL) - Treasury General Account (TGA) - overnight reverse repo (ON RRP), in USD. |
walcl_usd | USD | Fed total assets (WALCL), as known on that day. |
tga_usd | USD | Treasury General Account (WTREGEN), as known on that day. |
rrp_usd | USD | Overnight reverse repo (RRPONTSYD) of that day. |
walcl_date | calendar date (YYYY-MM-DD) | Observation day of the WALCL value used (weekly series). |
tga_date | calendar 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. |
净流动性:美联储资产负债表减去财政部一般账户,再减去隔夜逆回购。响应包含公式及各组成部分,并明确标注单位,因为三个源序列的单位不同。
此接口的全部 9 个字段(取自接口契约)
time | ISO 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_date | calendar 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. |
scale | Reading scale of the score. | |
30d | Momentum score over the last 30d, from -100 to +100. | |
30d.score | score from -100 to +100 | Macro momentum for crypto: positive = macro tailwind (weaker dollar, growing liquidity). |
30d.components | The inputs of the score and their contributions. | |
90d | Momentum score over the last 90d, from -100 to +100. | |
90d.score | score from -100 to +100 | Macro momentum for crypto: positive = macro tailwind (weaker dollar, growing liquidity). |
90d.components | The inputs of the score and their contributions. |
取值 −100 到 +100 的评分,基于 M2、美联储资产负债表和美元在三十天和九十天内的动态。货币供应上升、美元走弱会推高评分。每个组成部分都带有以百分比表示的变化率 change_pct。
此接口的全部 22 个字段(取自接口契约)
time | ISO 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_date | calendar 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. |
score | score from 0 to 100 | Share of risk-on signals × 100. |
label | `risk_on` (score above 50), `risk_off` (below 50) or `neutral` (exactly 50). | |
risk_on_signal_count | count | Signals currently risk-on. |
available_signal_count | count | Signals that could be evaluated (data available). |
signal_count | count | Signals in the model. |
signals | Each signal: its `condition` and whether it is risk-on now (`is_risk_on`). | |
signals.vix | The `vix` signal: its reading, and whether it counts as risk-on. | |
signals.dxy | The `dxy` signal: its reading, and whether it counts as risk-on. | |
signals.yield_curve | The `yield_curve` signal: its reading, and whether it counts as risk-on. | |
signals.sp500 | The `sp500` signal: its reading, and whether it counts as risk-on. | |
signals.gold | The `gold` signal: its reading, and whether it counts as risk-on. | |
context | The raw inputs used by the signals. | |
context.vix | index points | CBOE Volatility Index. |
context.dxy | index points | US Dollar Index. |
context.dxy_7d_ago | index points | US Dollar Index seven days earlier. |
context.yield_curve_10y2y_pp | percentage points | 10-year minus 2-year US Treasury yield. |
context.sp500 | index points | S&P 500. |
context.sp500_sma_50d | index points | 50-day simple moving average of the S&P 500. |
context.gold_usd | USD per troy ounce | Gold price. |
context.gold_7d_ago_usd | USD per troy ounce | Gold price seven days earlier. |
基于五个信号、取值 0 到 100 的评分:VIX 低位、美元回落、收益率曲线斜率为正、标普高于五十日均线、黄金回落。没有数据的信号会被排除在计算之外,而不是被视为不利。
#日内宏观
此接口的全部 16 个字段(取自接口契约)
series | Series identifier (the value of the `series` parameter). | |
source | Upstream source. | |
instrument_code | Code of the instrument at the source (informative; use `series` in requests). | |
category | Series category. | |
name | Human-readable name of the series. | |
units | Unit of `value` as published by the source. | |
volume_kind | What `volume` measures for this instrument (`broker` = the source's own flow, not the whole market). | |
timeframes | Timeframes natively collected for the series. | |
history_start_date | calendar date (YYYY-MM-DD) | First day of available history. |
last_candle_at | Last candle available, per timeframe. | |
last_candle_at.1m | Start of the latest 1m candle served for this series (ISO 8601 UTC). | |
last_candle_at.5m | Start of the latest 5m candle served for this series (ISO 8601 UTC). | |
last_candle_at.15m | Start of the latest 15m candle served for this series (ISO 8601 UTC). | |
last_candle_at.1h | Start of the latest 1h candle served for this series (ISO 8601 UTC). | |
last_candle_at.4h | Start of the latest 4h candle served for this series (ISO 8601 UTC). | |
last_candle_at.1d | Start of the latest 1d candle served for this series (ISO 8601 UTC). |
此接口的全部 7 个字段(取自接口契约)
time | ISO 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. |
open | series unit | Open. |
high | series unit | High. |
low | series unit | Low. |
close | series unit | Close. |
volume | see `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 提供。
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
series | string | 必填 | /v1/macro/intraday/series 返回的 series(例如 PAXGUSDT)。不接受目录中的 instrument_code 列。 |
timeframe | string | 必填 | 1m、5m、15m、1h、4h、1d——必填。每个序列只提供其目录条目中列出的周期;其他周期返回 422 timeframe_not_served。该市场数据族没有 30m 周期。 |
limit | integer | 100 | K 线数量,1 到 1000。 |
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 在外层信封中给出。