API de datos on-chain
Las métricas on-chain de Bitcoin y Ethereum en una sola API: MVRV, NVT, direcciones activas, estado de la red y del mempool, oferta de ETH, gas, staking, DeFi y ratios. Ya no hace falta conectar por separado un proveedor de análisis on-chain, un nodo de Ethereum y un explorador de bloques: una clave, un formato, todos los datos.
Lo que dice la cadena, con independencia del libro de órdenes: el estado de la red de Bitcoin, su valoración frente al uso y las ocho familias de Ethereum. Todas estas rutas son de todo el mercado: no aceptan ?symbol=.
#Datos on-chain para agentes de IA y LLM
«¿Está el MVRV de Bitcoin en zona de euforia?», «¿Cuánto ETH está en staking?», «¿Es Ethereum deflacionario esta semana?»: un agente de IA lee las redes de Bitcoin y Ethereum mediante la herramienta MCP get_onchain_data, sin nodo ni explorador de bloques.
{
"name": "get_onchain_data",
"arguments": {
"fields": ["btc_mvrv", "eth_staking", "eth_deflation"]
}
}- Para el LLM: las métricas on-chain describen una red entera y no toman par; un MVRV por encima de 3,5 ha significado históricamente euforia, y por debajo de 1 un mercado bajo su coste medio — una lectura, no una señal.
- Para desarrolladores: cada métrica es una ruta (
/v1/btc/mvrv,/v1/btc/mempool…), es decir, una herramienta para tu propio agente de IA cuando lo construyes con tool calling. - Dónde funciona: Claude, ChatGPT, Cursor y cualquier cliente MCP, incluidos los frameworks de agentes compatibles con MCP, como LangChain o n8n.
Conecta tu agente de IA con la guía del servidor MCP, o enséñale BytNode con los Agent Skills de código abierto.
#Cadencia y alcance
Estas familias no se actualizan al ritmo del mercado, y consultarlas cada minuto no sirve de nada.
- La red de Bitcoin: el mempool y las comisiones cambian cada minuto, el estado de la red cada cinco minutos, la minería cada diez.
- La valoración on-chain de Bitcoin: un punto al día, fechado con
timea medianoche UTC. - Ethereum: unos minutos para la oferta, el gas y la DeFi; una hora para el staking. El historial es diario.
Cada ruta tiene su historial en /history, con un limit. Ninguna acepta símbolo: pasar ?symbol=BTCUSDT se rechaza en lugar de ignorarse, para evitar que una cifra de todo el mercado se atribuya a un solo activo.
#La red de Bitcoin
Los 14 campos de esta ruta (según el contrato)
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. |
| Campo | Tipo | Descripción |
|---|---|---|
block_height | integer | Altura del último bloque. |
difficulty | float | Dificultad actual. |
progress_pct | float | Avance en el periodo de ajuste en curso, en porcentaje. |
difficulty_change_pct | float | Variación proyectada en el próximo ajuste, en porcentaje. |
block_time | object | El tiempo medio entre bloques y su diferencia respecto al objetivo de diez minutos. |
Los 10 campos de esta ruta (según el contrato)
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`. |
| Campo | Tipo | Descripción |
|---|---|---|
tx_count | integer | Transacciones pendientes. |
vsize | integer | Peso total pendiente. |
total_fee_sats | integer | Comisiones acumuladas de las transacciones pendientes, en satoshis. |
fee_histogram | array | El reparto de las comisiones ofrecidas, por tramo. |
trend | object | Una señal de llenado: filling, draining o stable. |
Los 14 campos de esta ruta (según el contrato)
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). |
| Campo | Tipo | Descripción |
|---|---|---|
fastest_fee_sat_vb / half_hour_fee_sat_vb / hour_fee_sat_vb / economy_fee_sat_vb / minimum_fee_sat_vb | integer | Comisiones recomendadas por nivel de prioridad, en satoshis por byte virtual, redondeadas al entero. |
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 | Las mismas, en valores fraccionarios: útil para un servicio que construye transacciones. |
fee_pressure | object | Una lectura cualitativa de la congestión. |
/v1/btc/fees/history devuelve por defecto una fila por lectura de la fuente (una por minuto); ?timeframe=1h, 4h o 1d conserva la última lectura de cada bucket cerrado, fechada al inicio del bucket.
Los 19 campos de esta ruta (según el contrato)
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. |
Concentración de los pools, recompensas de bloque y dificultad. El historial acepta un parámetro dataset para elegir entre concentration, rewards, difficulty y fee_rates.
| Campo | Tipo | Descripción |
|---|---|---|
concentration | object | top1_share_pct y top3_share_pct: la parte de los bloques minados por el primer pool y por los tres primeros, en porcentaje. Cada pool de la lista lleva su propio share_pct. |
latest_reward | object | La última recompensa de bloque observada, en sats y en USD, con el precio del BTC en ese bloque (btc_price_usd, block_height, y la hora del bloque en time), no el precio actual. |
#Valoración on-chain de Bitcoin
Cuatro métricas que ponen el precio frente al uso real de la cadena. Cada una expone una label: una referencia de lectura, nunca una señal de ejecución.
Los 4 campos de esta ruta (según el contrato)
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"El MVRV compara la capitalización con el valor al que las monedas se movieron por última vez. Por encima de 3,5, la historia habla de euforia; por debajo de 1, el mercado cotiza por debajo de su coste medio de adquisición.
Los 4 campos de esta ruta (según el contrato)
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. |
El NVT pone la capitalización frente al volumen de transacciones on-chain: un ratio precio/ingresos aplicado a una red. Se deriva bajo demanda y se sirve con nvt_signal, su versión suavizada a noventa días, con menos ruido.
Los 6 campos de esta ruta (según el contrato)
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`. |
El número de direcciones activas, con sus medias a siete y treinta días y el momentum que las compara. Es la medida más directa del uso.
Los 4 campos de esta ruta (según el contrato)
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). |
La relación entre los ingresos de los mineros y la dificultad. Cuando se desploma, los mineros menos eficientes venden sus reservas, generando una presión vendedora que no aparece en el libro de órdenes.
#On-chain de Ethereum
Ocho familias, todas de todo el mercado, todas con historial diario.
Los 9 campos de esta ruta (según el contrato)
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`. |
| Campo | Tipo | Descripción |
|---|---|---|
execution_issuance_cumulative | float | ETH emitido en la capa de ejecución desde el génesis (asignación del génesis incluida), en ETH — no la oferta en circulación. La oferta es total_supply = execution_issuance_cumulative + consensus_rewards_cumulative − burnt_fees_cumulative. |
consensus_rewards_cumulative | float | Emisión acumulada de la capa de consenso. No es la cantidad en staking: esa la sirve /v1/eth/staking, como total_staked. |
burnt_fees_cumulative | float | Total quemado desde el origen. |
withdrawn_cumulative | float | ETH retirados del staking, acumulado. |
total_supply | float | Oferta total de ETH: execution_issuance_cumulative + consensus_rewards_cumulative − burnt_fees_cumulative. |
burn_24h | float | Quemado en las últimas 24 h. |
net_issuance_24h | float | Emisión menos quema. Negativa, la oferta se contrae. |
label | string | Una lectura cualitativa de la emisión neta. |
Los 4 campos de esta ruta (según el contrato)
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). |
Los 7 campos de esta ruta (según el contrato)
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`. |
El precio del gas, su congestión y después su momentum: el valor actual comparado con sus medias a siete y treinta días, con el régimen que se deriva. El gas es la medida más reactiva de la demanda de bloques en Ethereum.
Los 5 campos de esta ruta (según el contrato)
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. |
| Campo | Tipo | Descripción |
|---|---|---|
staking_ratio | float | Parte de la oferta bloqueada, como fracción: 0.28 significa 28 %. |
total_staked / total_supply | float | El ETH realmente en staking (la suma de los saldos de los validadores) y la oferta total, los dos términos del ratio. |
apr_pct | float | null | Rendimiento anual del staking, en porcentaje: 3.1 significa 3,1 % anual. Se calcula igual en el valor actual y en el historial. |
Los 5 campos de esta ruta (según el contrato)
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`. |
La quema frente a la emisión, anualizadas, con la zona resultante. Es la lectura monetaria de Ethereum: con mucha actividad, la red destruye más de lo que emite.
Los 8 campos de esta ruta (según el contrato)
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`. |
| Campo | Tipo | Descripción |
|---|---|---|
tvl_usd | float | Valor total bloqueado en la DeFi de Ethereum. |
dex_volume_24h_usd / dex_volume_7d_usd | float | Volumen negociado en mercados descentralizados. |
eth_market_cap_usd | float | Capitalización de ETH. |
defi_health_ratio | float | La relación entre la actividad DeFi y la capitalización. |
defi_health_change_30d_pct | float | La tendencia a treinta días del TVL, en porcentaje. |
Los 5 campos de esta ruta (según el contrato)
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). |
Un índice compuesto que cruza la tasa de bloqueo con la contracción de la oferta: cuanto más sube, más escasa es la oferta disponible.
Los 6 campos de esta ruta (según el contrato)
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`. |
El ratio ETH/BTC, su capitalización relativa y su momentum a siete días: la medida de la rotación entre los dos activos de referencia.
Una dependencia que conviene conocer
Las familias supply, gas, deflation y squeeze provienen de una única fuente; mientras no está disponible, responden vacías con el motivo no_api_key en el snapshot. staking combina varias fuentes: el importe en staking viene de la API pública de la Beacon chain y no requiere clave; cuando tiene más de 1,5 veces su ritmo de recogida, staking_ratio y el índice squeeze valen null en lugar de un valor desfasado. defi y price-btc siguen disponibles.