API de datos macro para agentes de IA
El contexto macro del mercado cripto en una sola API: tipos de interés, dólar, liquidez, índices bursátiles, oro y petróleo, diarios e intradía, con indicadores que los leen frente a Bitcoin. Sin otra fuente macro que conectar junto a tu flujo cripto: la misma clave, el mismo formato.
El contexto en el que se mueve el mercado cripto: tipos, dólar, liquidez, índices, oro y petróleo, diarios e intradía. Todas estas rutas son de todo el mercado.
#Datos macro para agentes de IA y LLM
«¿Sube el rendimiento a 10 años de EE. UU.?», «¿Cómo se ha movido la liquidez neta frente a Bitcoin?», «¿Qué series macro se mueven con BTC ahora mismo?»: un agente de IA lee el contexto macro mediante la herramienta MCP get_macro_data, una serie del catálogo a la vez o como indicadores derivados.
{
"name": "get_macro_data",
"arguments": {
"series": "DGS10",
"fields": ["macro"]
}
}- Para el LLM: una serie se nombra por su identificador de catálogo (
DGS10es el rendimiento a 10 años de EE. UU.), nunca se adivina:get_system_infolista el catálogo. - Para desarrolladores:
/v1/macro?series=y/v1/macro/seriesdan a tu propio agente de IA una herramienta y su catálogo para el tool calling, la misma pareja en la que se apoya el servidor MCP. - 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.
#Series macro diarias
Los 6 campos de esta ruta (según el contrato)
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`. |
Los 7 campos de esta ruta (según el contrato)
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`. |
Los 3 campos de esta ruta (según el contrato)
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. |
Unas veinte series oficiales de EE. UU., más el oro, repartidas en ocho categorías. /v1/macro devuelve el último valor de UNA serie, indicada con ?series= (obligatorio); /v1/macro/series es el catálogo, con el último valor de cada serie; /v1/macro/history el historial de una serie, indicada con ?series=.
| Categoría | Series |
|---|---|
| Divisas | Dólar amplio, dólar de mercados emergentes, EUR/USD, USD/JPY |
| Tipos | Fed funds, 2 años, 10 años, 30 años, y las pendientes 10 años − 2 años y 10 años − 3 meses |
| Inflación | CPI, PCE, inflación implícita a 5 y 10 años |
| Liquidez | M2, base monetaria, balance de la Fed, cuenta general del Tesoro, repos inversos a un día |
| Volatilidad | VIX |
| Renta variable | S&P 500, Nasdaq composite |
| Empleo | Tasa de desempleo, nóminas no agrícolas |
| Materias primas | Oro, petróleo 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"| Campo | Tipo | Descripción |
|---|---|---|
series | string | El identificador que pasar en ?series=. |
category | string | Una de las ocho categorías. |
name | string | La etiqueta legible de la serie. |
units | string | La unidad del valor. Varía de una serie a otra: nunca sumes dos series sin leerla. |
time | string | El día de la observación, a medianoche UTC. |
value | float | El valor observado. |
#Indicadores derivados
Cuatro lecturas compuestas, calculadas bajo demanda a partir de las series brutas y del precio de Bitcoin.
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 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. |
La correlación móvil de Bitcoin con el dólar, el S&P 500, el oro y el VIX, a treinta y noventa días, calculada sobre los rendimientos diarios en fechas comunes. Una correlación sigue siendo null mientras el historial alineado sea insuficiente.
Los 7 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. |
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). |
Los 8 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. |
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. |
La liquidez neta: el balance de la Fed, menos la cuenta general del Tesoro, menos los repos inversos a un día. La respuesta incluye la fórmula y sus componentes, y la unidad es explícita, ya que las tres series de origen no usan la misma.
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 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. |
Una puntuación de −100 a +100, construida sobre la dinámica de M2, del balance de la Fed y del dólar, a treinta y noventa días. Una masa monetaria al alza y un dólar a la baja empujan la puntuación hacia arriba. Cada componente lleva su tasa de variación en porcentaje, change_pct.
Los 22 campos de esta ruta (según el contrato)
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. |
Una puntuación de 0 a 100 sobre cinco señales: VIX bajo, dólar en retroceso, pendiente de la curva de tipos positiva, S&P por encima de su media de cincuenta días, oro en retroceso. Una señal sin datos se excluye del cálculo en lugar de contarse como desfavorable.
#Macro intradía
Los 16 campos de esta ruta (según el contrato)
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). |
Los 7 campos de esta ruta (según el contrato)
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. |
Cinco instrumentos macro en velas OHLC, para comparar las cripto por horas en lugar de por días: EUR/USD, USD/JPY, petróleo WTI, el índice del dólar ICE y el oro tokenizado, cada uno en seis temporalidades (1m a 1d, sin 30m). Los tipos a 10 y 30 años, el VIX, el S&P 500 y el Nasdaq son series diarias de FRED, servidas por /v1/macro.
| Parámetro | Tipo | Por defecto | Descripción |
|---|---|---|---|
series | string | obligatorio | El series que devuelve /v1/macro/intraday/series (p. ej., PAXGUSDT). La columna instrument_code del catálogo NO se acepta. |
timeframe | string | obligatorio | 1m, 5m, 15m, 1h, 4h, 1d — obligatorio. Cada serie sirve las temporalidades indicadas en su entrada del catálogo; otra devuelve un 422 timeframe_not_served. La temporalidad 30m no existe en esta familia. |
limit | integer | 100 | Número de velas, de 1 a 1000. |
curl -H "X-API-KEY: $BYTNODE_API_KEY" \
"https://api.bytnode.com/v1/macro/intraday/history?series=PAXGUSDT&timeframe=1h&limit=200"Pedir una temporalidad que una serie no sirve devuelve 422 timeframe_not_served con la lista de las que sí sirve, en lugar de una lista vacía, que haría pensar en un hueco en los datos. data es la lista de velas, de la más reciente a la más antigua; series y timeframe se repiten en el sobre.