链上数据 API
一个 API 获取比特币与以太坊链上指标:MVRV、NVT、活跃地址、网络与内存池状态、ETH 供应量、Gas、质押、DeFi 与比率。无需分别对接链上分析服务、以太坊节点和区块浏览器:一个密钥、一种格式、全部数据。
链本身反映的情况,与订单簿无关:比特币网络的状态、相对使用量的估值,以及以太坊的八个市场数据族。这些接口都是全市场数据:不接受 ?symbol=。
#面向 AI 智能体与 LLM 的链上数据
“比特币的 MVRV 处于狂热区间吗?”“有多少 ETH 在质押?”“以太坊本周是通缩的吗?”:AI 智能体通过 MCP 工具 get_onchain_data 读取比特币与以太坊网络,无需节点或区块浏览器。
{
"name": "get_onchain_data",
"arguments": {
"fields": ["btc_mvrv", "eth_staking", "eth_deflation"]
}
}- 给 LLM 的提示:链上指标描述整个网络,不接收交易对;历史上 MVRV 高于 3.5 意味着狂热,低于 1 表示市场低于平均成本——这是解读,不是信号。
- 给开发者:每个指标对应一个接口(
/v1/btc/mvrv、/v1/btc/mempool……),在用 tool calling 构建自己的 AI 智能体时即对应一个工具。 - 适用环境:Claude、ChatGPT、Cursor 及任何 MCP 客户端,包括支持 MCP 的 AI 智能体框架,如 LangChain 或 n8n。
通过 MCP 服务器指南接入你的 AI 智能体,或用开源的 Agent Skills 教它使用 BytNode。
#更新频率与范围
这些市场数据族不按市场节奏刷新,每分钟查询毫无意义。
- 比特币网络:内存池和手续费每分钟变化,网络状态每五分钟,挖矿数据每十分钟。
- 比特币链上估值:每天一个数据点,以
time(UTC 零点)标注。 - 以太坊:供应、Gas 和 DeFi 数分钟更新一次;质押一小时一次。历史为日度。
每个接口都在 /history 下有对应历史,并支持 limit。都不接受交易对:传入 ?symbol=BTCUSDT 会被拒绝而不是忽略,以免全市场数字被归到单一资产名下。
#比特币网络
此接口的全部 14 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
difficulty | difficulty units | Network mining difficulty (on a difficulty-adjustment row, the difficulty after it). |
block_height | block height | Height of a block: the latest block on `/v1/btc/network`; the reward sample in `latest_reward`; the block where a difficulty adjustment took effect on `/v1/btc/mining/history?dataset=difficulty`. |
progress_pct | percent (58.5 = 58.5 %) | Progress through the current 2016-block difficulty period. |
difficulty_change_pct | percent (58.5 = 58.5 %) | Expected difficulty change at the next adjustment (`/v1/btc/mining/history?dataset=difficulty`: the change applied at that adjustment). |
block_time | Average block time over 24 h (`avg_24h_s`), its deviation from the 600 s target, and a `label`. | |
block_time.avg_24h_s | seconds | Average block time over 24 hours. |
block_time.deviation_s | seconds | avg_24h_s - 600. |
block_time.label | 24 h block time versus the 600 s target: `slow` (> +30 s), `fast` (< -30 s) or `on_target`. | |
next_adjustment | Next difficulty adjustment: progress, expected change, date, remaining blocks and time. | |
next_adjustment.estimated_retarget_at | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Estimated instant of the next adjustment. |
next_adjustment.remaining_block_count | count | Blocks left before the adjustment. |
next_adjustment.next_retarget_block_height | block height | Height of the block of the next adjustment. |
next_adjustment.remaining_s | seconds | Estimated time left before the adjustment, seconds. |
| 字段 | 类型 | 说明 |
|---|---|---|
block_height | integer | 最新区块高度。 |
difficulty | float | 当前难度。 |
progress_pct | float | 当前调整周期的进度,以百分比表示。 |
difficulty_change_pct | float | 下次调整的预计变化,以百分比表示。 |
block_time | object | 平均出块时间及其与十分钟目标的差距。 |
此接口的全部 10 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
tx_count | count | Unconfirmed transactions in the mempool. |
vsize | virtual bytes | Total virtual size of the mempool. |
total_fee_sats | satoshis | Total fees waiting in the mempool. |
fee_histogram | `[fee_rate, vsize]` pairs: how much virtual size (virtual bytes) waits at each fee rate (sat/vB). | |
trend | Mempool size change over 1 h, 4 h and 24 h, and its `label` (`filling`, `draining`, `stable`). | |
trend.vsize_change_1h | virtual bytes | Mempool size change over 1 hour. |
trend.vsize_change_4h | virtual bytes | Mempool size change over 4 hours. |
trend.vsize_change_24h | virtual bytes | Mempool size change over 24 hours. |
trend.label | `filling` (vsize grew over 1 h), `draining` (shrank) or `stable`. |
| 字段 | 类型 | 说明 |
|---|---|---|
tx_count | integer | 待确认交易。 |
vsize | integer | 待确认交易的总权重。 |
total_fee_sats | integer | 待确认交易的累计手续费,单位为聪。 |
fee_histogram | array | 按档位划分的手续费分布。 |
trend | object | 填充信号:filling、draining 或 stable。 |
此接口的全部 14 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
fastest_fee_sat_vb | satoshis per virtual byte (sat/vB) | Fee rate for the next block. |
half_hour_fee_sat_vb | satoshis per virtual byte (sat/vB) | Fee rate for confirmation within ~30 minutes. |
hour_fee_sat_vb | satoshis per virtual byte (sat/vB) | Fee rate for confirmation within ~1 hour. |
economy_fee_sat_vb | satoshis per virtual byte (sat/vB) | Fee rate for a low-priority confirmation. |
minimum_fee_sat_vb | satoshis per virtual byte (sat/vB) | Minimum relay fee rate. |
fastest_fee_precise_sat_vb | satoshis per virtual byte (sat/vB) | `fastest_fee_sat_vb`, unrounded. |
half_hour_fee_precise_sat_vb | satoshis per virtual byte (sat/vB) | `half_hour_fee_sat_vb`, unrounded. |
hour_fee_precise_sat_vb | satoshis per virtual byte (sat/vB) | `hour_fee_sat_vb`, unrounded. |
economy_fee_precise_sat_vb | satoshis per virtual byte (sat/vB) | `economy_fee_sat_vb`, unrounded. |
minimum_fee_precise_sat_vb | satoshis per virtual byte (sat/vB) | `minimum_fee_sat_vb`, unrounded. |
fee_pressure | `fastest_economy_ratio` = fastest / economy fee rate, and its `label`: `normal` (<= 2), `elevated` (> 2), `congested` (> 5). | |
fee_pressure.fastest_economy_ratio | fastest / economy | Fastest fee rate divided by the economy fee rate (a quotient). |
fee_pressure.label | Fee pressure: `normal` (ratio <= 2), `elevated` (> 2) or `congested` (> 5). |
| 字段 | 类型 | 说明 |
|---|---|---|
fastest_fee_sat_vb / half_hour_fee_sat_vb / hour_fee_sat_vb / economy_fee_sat_vb / minimum_fee_sat_vb | integer | 按优先级推荐的手续费,单位为聪/虚拟字节,取整。 |
fastest_fee_precise_sat_vb / half_hour_fee_precise_sat_vb / hour_fee_precise_sat_vb / economy_fee_precise_sat_vb / minimum_fee_precise_sat_vb | float | 同上,以小数表示:适合构建交易的服务。 |
fee_pressure | object | 对拥堵程度的定性解读。 |
/v1/btc/fees/history 默认每次读取数据源返回一行(每分钟一次);?timeframe=1h、4h 或 1d 则保留每个已收盘 bucket 的最后一次读取,时间为 bucket 的开始时刻。
此接口的全部 19 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
concentration | Mining pool concentration over the last period. | |
concentration.total_block_count | count | Blocks in the period. |
concentration.top1_share_pct | percent (58.5 = 58.5 %) | Share of blocks mined by the largest pool. |
concentration.top3_share_pct | percent (58.5 = 58.5 %) | Share of blocks mined by the three largest pools. |
concentration.pool_count | count | Number of pools that mined at least one block. |
concentration.label | Centralisation risk from the top-3 pool share: `healthy` (<= 40 %), `moderate` (> 40 %), `high_risk` (> 50 %). | |
latest_reward | Average block reward (subsidy + fees) of the latest blocks, in satoshis and USD. | |
latest_reward.time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
latest_reward.block_height | block height | Height of a block: the latest block on `/v1/btc/network`; the reward sample in `latest_reward`; the block where a difficulty adjustment took effect on `/v1/btc/mining/history?dataset=difficulty`. |
latest_reward.avg_reward_sats | satoshis | Average block reward. |
latest_reward.avg_reward_usd | USD | Average block reward in USD. |
latest_reward.btc_price_usd | USD | BTC price in USD at the time of the row: the current price on `/v1/eth/price-btc`, the price at the block of the reward in `latest_reward` of `/v1/btc/mining` (used for `avg_reward_usd`). |
pools | Pools ranked by blocks mined: `name`, `slug`, `block_count`, `rank`, `share_pct`. | |
pools.name | Human-readable name. | |
pools.slug | Stable identifier. | |
pools.block_count | count | Blocks mined over the period. |
pools.rank | rank (1 = first) | Rank. |
pools.share_pct | percent (58.5 = 58.5 %) | Share of blocks. |
矿池集中度、区块奖励与难度。历史接口接受 dataset 参数,可在 concentration、rewards、difficulty 和 fee_rates 之间选择。
| 字段 | 类型 | 说明 |
|---|---|---|
concentration | object | top1_share_pct 与 top3_share_pct:最大矿池以及前三大矿池挖出的区块占比,以百分比表示。列表中的每个矿池都带有各自的 share_pct。 |
latest_reward | object | 观测到的最新区块奖励(聪与美元),并附该区块时的 BTC 价格(btc_price_usd、block_height,区块时间见 time)——并非当前价格。 |
#比特币链上估值
四个把价格与链的实际使用情况相对照的指标。每个都给出一个 label:用于解读的参考,而绝非交易信号。
此接口的全部 4 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | The day the value refers to, at midnight UTC. |
mvrv | dimensionless ratio | Market value / realised value. |
label | `undervalued` (<= 1), `fair` (> 1), `elevated` (> 2.5), `overvalued` (> 3.5). | |
change_30d_pct | percent (58.5 = 58.5 %) | Relative change of the value over 30 days, percent. |
curl -H "X-API-KEY: $BYTNODE_API_KEY" \
"https://api.bytnode.com/v1/btc/mvrv"MVRV 将市值与币最后一次转移时的价值相比。高于 3.5 时历史上对应狂热;低于 1 时,市场交易价格低于平均获取成本。
此接口的全部 4 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | The day the value refers to, at midnight UTC. |
nvt | dimensionless ratio | Market cap / on-chain transaction volume of the day (NVT ratio), change returned to the sender excluded. |
nvt_signal | dimensionless ratio | NVT Signal: market cap of the day / 90-day average of the on-chain transaction volume in USD. `null` with less than 90 days of data. |
label | Zone of the NVT Signal against its own last 730 days (share of those days when it was lower): `undervalued` (below 25 %), `fair` (from 25 %), `overvalued` (from 75 %), `bubble` (from 95 %). `null` with less than 365 days of NVT Signal. |
NVT 将市值与链上交易量相比:把市销率应用于一个网络。它按需计算,并附带 nvt_signal——九十日平滑版本,噪音更小。
此接口的全部 6 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | The day the value refers to, at midnight UTC. |
active_addresses | count | Addresses active on the day. |
active_addresses_sma_7d | count | 7-day simple moving average of active_addresses. |
active_addresses_sma_30d | count | 30-day simple moving average of active_addresses. |
sma_7d_vs_30d_pct | percent (58.5 = 58.5 %) | (7-day simple moving average - 30-day simple moving average) / 30-day average, percent. |
label | 7-day vs 30-day average: `accelerating` (> +5 %), `decelerating` (< -5 %) or `stable`. |
活跃地址数,附七日和三十日均值以及比较两者的动量。这是衡量使用情况最直接的指标。
此接口的全部 4 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | The day the value refers to, at midnight UTC. |
revenue_per_difficulty_usd | USD per unit of difficulty | Miners' daily revenue (USD) divided by the network difficulty of the day: revenue per unit of work. Read it against its 30-day average. |
revenue_per_difficulty_sma_30d_usd | USD per unit of difficulty | 30-day simple moving average of revenue_per_difficulty_usd. |
label | `healthy` (at or above its 30-day average), `stress` (below it), `capitulation` (below 70 % of it — historically near BTC bottoms). |
矿工收入与难度之比。当它骤降时,效率最低的矿工会卖出储备,形成在订单簿中看不到的抛压。
#以太坊链上
八个市场数据族,均为全市场数据,均有日度历史。
此接口的全部 9 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
execution_issuance_cumulative | ETH | Cumulative execution-layer issuance (genesis + proof-of-work rewards before the Merge), as published by Etherscan. NOT the supply: `total_supply` = this + `consensus_rewards_cumulative` - `burnt_fees_cumulative` (was `eth_supply`). |
consensus_rewards_cumulative | ETH | Cumulative consensus-layer issuance (staking rewards) since the Beacon Chain launch. NOT the ETH staked: see `total_staked` on `/v1/eth/staking`. |
burnt_fees_cumulative | ETH | ETH burnt since EIP-1559 (cumulative). |
withdrawn_cumulative | ETH | ETH withdrawn from staking (cumulative). |
total_supply | coins | Total coins issued (circulating + locked), net of burns. |
burn_24h | ETH | ETH burnt over the last 24 h. |
net_issuance_24h | ETH | New ETH issued minus ETH burnt over 24 h. Negative = deflationary. |
label | `deflationary` (24 h net issuance < 0), `inflationary` (> 0) or `neutral`. |
| 字段 | 类型 | 说明 |
|---|---|---|
execution_issuance_cumulative | float | 自创世以来在执行层发行的 ETH(含创世分配),以 ETH 计——不是流通供应量。供应量为 total_supply = execution_issuance_cumulative + consensus_rewards_cumulative − burnt_fees_cumulative。 |
consensus_rewards_cumulative | float | 共识层的累计发行量。它不是质押量:质押量由 /v1/eth/staking 以 total_staked 提供。 |
burnt_fees_cumulative | float | 自创世以来的累计销毁量。 |
withdrawn_cumulative | float | 从质押中提取的 ETH 累计量。 |
total_supply | float | ETH 总供应量:execution_issuance_cumulative + consensus_rewards_cumulative − burnt_fees_cumulative。 |
burn_24h | float | 最近 24 小时的销毁量。 |
net_issuance_24h | float | 发行减去销毁。为负时供应收缩。 |
label | string | 对净发行的定性解读。 |
此接口的全部 4 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
base_fee_gwei | gwei | EIP-1559 base fee (burnt). |
gas_used_ratio | fraction (0.585 = 58.5 %) | Block gas used / gas target over recent blocks. |
label | Congestion: `low` (gas_used_ratio < 0.5), `normal`, or `high` (> 0.8). |
此接口的全部 7 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
base_fee_gwei | gwei | EIP-1559 base fee (burnt). |
gas_used_ratio | fraction (0.585 = 58.5 %) | Block gas used / gas target over recent blocks. |
gas_sma_7d_gwei | gwei | 7-day simple moving average of the base fee. |
gas_sma_30d_gwei | gwei | 30-day simple moving average of the base fee. |
sma_7d_vs_30d_pct | percent (58.5 = 58.5 %) | (7-day simple moving average - 30-day simple moving average) / 30-day average, percent. |
label | `high_demand` (gas_used_ratio > 0.8 and sma_7d_vs_30d_pct > 0), `low_demand` (< 0.5 and sma_7d_vs_30d_pct < 0), otherwise `normal`. |
Gas 价格、拥堵程度及其动量:当前值与七日和三十日均值的比较,以及由此得出的状态。Gas 是以太坊区块需求最灵敏的指标。
此接口的全部 5 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
staking_ratio | fraction (0.585 = 58.5 %) | Share of the ETH supply staked. |
total_staked | ETH | ETH staked (beacon chain). |
total_supply | coins | Total coins issued (circulating + locked), net of burns. |
apr_pct | percent (58.5 = 58.5 %) | Annualised rate in percent. |
| 字段 | 类型 | 说明 |
|---|---|---|
staking_ratio | float | 被锁定的供应占比,以小数表示:0.28 表示 28%。 |
total_staked / total_supply | float | 实际质押的 ETH(验证者余额之和)与总供应量,即该比率的两项。 |
apr_pct | float | null | 年化质押收益,以百分比表示:3.1 表示每年 3.1%。当前值与历史采用相同的计算方式。 |
此接口的全部 5 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
burn_24h | ETH | ETH burnt over the last 24 h. |
net_issuance_24h | ETH | New ETH issued minus ETH burnt over 24 h. Negative = deflationary. |
net_issuance_annualized_pct | percent (58.5 = 58.5 %) | Net issuance annualised, as a percent of supply. Negative = the supply shrinks. |
label | `deflationary` (24 h net issuance < 0) or `inflationary`. |
年化的销毁与发行对比,以及由此得出的区间。这是以太坊的货币视角:活跃度高时,网络销毁的多于发行的。
此接口的全部 8 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
tvl_usd | USD | Total value locked in Ethereum DeFi. |
dex_volume_24h_usd | USD | DEX volume over 24 h. |
dex_volume_7d_usd | USD | DEX volume over 7 days. |
eth_market_cap_usd | USD | ETH market capitalisation. |
defi_health_ratio | fraction (0.585 = 58.5 %) | tvl_usd / eth_market_cap_usd. |
defi_health_change_30d_pct | percent (58.5 = 58.5 %) | Relative change of `defi_health_ratio` (TVL / ETH market cap) over 30 days, percent. |
label | 30-day trend of `defi_health_ratio` (TVL / ETH market cap): `growing`, `declining` or `stable`. |
| 字段 | 类型 | 说明 |
|---|---|---|
tvl_usd | float | 以太坊 DeFi 锁定总价值。 |
dex_volume_24h_usd / dex_volume_7d_usd | float | 去中心化交易所的成交量。 |
eth_market_cap_usd | float | ETH 市值。 |
defi_health_ratio | float | DeFi 活跃度与市值之比。 |
defi_health_change_30d_pct | float | TVL 的三十日趋势,以百分比表示。 |
此接口的全部 5 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
staking_ratio | fraction (0.585 = 58.5 %) | Share of the ETH supply staked. |
net_issuance_annualized_pct | percent (58.5 = 58.5 %) | Net issuance annualised, as a percent of supply. Negative = the supply shrinks. |
squeeze_index | score from 0 to 100 | Supply squeeze index: combines the staked share and net issuance. Higher = less liquid ETH available. |
label | `low` (< 33), `moderate` (>= 33), `high` (>= 66). |
一个综合指数,结合锁定率与供应收缩:越高说明可用供应越稀缺。
此接口的全部 6 个字段(取自接口契约)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Point-in-time value: the instant of the measurement (when the source was read). |
eth_price_usd | USD | ETH price. |
btc_price_usd | USD | BTC price in USD at the time of the row: the current price on `/v1/eth/price-btc`, the price at the block of the reward in `latest_reward` of `/v1/btc/mining` (used for `avg_reward_usd`). |
eth_price_btc | BTC | ETH price in BTC (ETH price / BTC price). |
change_7d_pct | percent (58.5 = 58.5 %) | Relative change of the value over 7 days, percent. |
label | 7-day momentum of ETH/BTC: `eth_outperform` (> 0), `btc_outperform` (< 0) or `neutral`. |
ETH/BTC 比率、相对市值及其七日动量:衡量两种基准资产之间轮动的指标。
需要了解的依赖
supply、gas、deflation 和 squeeze 系列来自单一上游数据源;该数据源不可用时,它们会返回空值,并在快照中给出原因 no_api_key。staking 组合多个数据源:质押数量来自公开的 Beacon chain API,无需密钥;当其数据超过采集周期的 1.5 倍时,staking_ratio 与 squeeze 指数返回 null,而不是过期的数值。defi 和 price-btc 仍正常提供。