API de datos de mercado cripto
Precios y volúmenes cripto en tiempo real en una sola API: velas OHLCV de un minuto a una semana, variación de precio, operaciones individuales, velas de operaciones y órdenes grandes. Todos los mercados ya están fusionados y normalizados: no hace falta conectar cada exchange ni conciliar sus formatos.
De la vela al tick: lo que imprimió el mercado, antes de cualquier interpretación. Volúmenes, operaciones y ticks se agregan sobre todos los mercados.
#Datos de mercado cripto para agentes de IA y LLM
Pregunta a un agente de IA conectado a BytNode «¿Cómo se ha movido BTC en las últimas 24 horas?», «¿Hubo grandes órdenes en ETH esta mañana?» o «Muéstrame las velas horarias de SOL esta semana»: responde con esta familia, mediante la herramienta MCP get_pair_data, sin construir ninguna URL.
{
"name": "get_pair_data",
"arguments": {
"symbol": "BTCUSDT",
"fields": ["klines", "price_change"],
"timeframe": "1h",
"limit": 24
}
}- Para el LLM: una vela se fecha por el inicio de su ventana (
time, UTC) — la vela horaria de las 14:00 cubre de 14:00 a 15:00 — y las filas llegan de la más reciente a la más antigua. - Para desarrolladores: ¿construyes tu propio agente de IA? Expón
/v1/klines/historycomo herramienta (tool calling) y el modelo busca las velas por sí solo, o carga las herramientas MCP y evita el adaptador. - 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.
#Velas OHLCV
Los 18 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 | quote currency (USDT for BTCUSDT) | Opening price of the candle. |
high | quote currency (USDT for BTCUSDT) | Highest price of the candle. |
low | quote currency (USDT for BTCUSDT) | Lowest price of the candle. |
close | quote currency (USDT for BTCUSDT) | Closing price of the candle (last price for the open candle). |
volume | base asset quantity (BTC for BTCUSDT) | Traded volume over the row, base asset units (BTC for BTCUSDT, NOT dollars), aggregated across venues, over the market(s) the route covers: spot + perpetual futures on `/v1/klines` and `/v1/trades-kline`, the path's market alone on a `/spot` or `/futures` route (a name without a market suffix covers every market of its route; `volume_spot` / `volume_futures` restrict). `null` when a market is not available (never a partial sum). |
buy_volume | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) buy volume, base asset units, aggregated across venues. |
sell_volume | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) sell volume, base asset units, aggregated across venues. |
is_volume_estimated | `true` when some base-asset quantities of this row were ESTIMATED from USD amounts (history where a source reported amounts but not quantities): a buy or sell amount is converted at that source's own average price when its total quantity is known, otherwise at the candle's typical price (high + low + close) / 3. Every quantity a source measured is kept as is. `false` = all measured. `null` when the volume itself is `null` (not available). | |
volume_spot | base asset quantity (BTC for BTCUSDT) | Volume traded on the SPOT market, summed across venues, base asset units. `null` while not available yet (never a partial sum). |
buy_volume_spot | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) buy volume on the SPOT market, across venues. |
sell_volume_spot | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) sell volume on the SPOT market, across venues. |
is_volume_spot_estimated | `true` when the spot quantities of this candle were ESTIMATED from USD amounts and the candle's typical price (high + low + close) / 3 (data written before quantities were recorded; mean error 0.04 % in 1m, 0.37 % in 1d); `false` = measured. `null` when the volume itself is `null` (not available). | |
volume_futures | base asset quantity (BTC for BTCUSDT) | Volume traded on PERPETUAL FUTURES, summed across venues, in base asset units. `null` when not available yet (never a partial sum). |
buy_volume_futures | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) buy volume on PERPETUAL FUTURES, across venues. |
sell_volume_futures | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) sell volume on PERPETUAL FUTURES, across venues. |
is_volume_futures_estimated | `true` when `volume_futures` was ESTIMATED from USD amounts and the candle's typical price; `false` = measured. `null` when the volume itself is `null` (not available). | |
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. |
Dos rutas: /v1/klines devuelve la última vela CERRADA (un objeto; ?live=1 para la vela en curso, is_closed: false), /v1/klines/history las velas, de la más reciente a la más antigua (los parámetros de abajo). El tamaño de la vela va en timeframe, obligatorio: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w. Ausente o fuera de la lista: 422.
| Parámetro | Tipo | Por defecto | Descripción |
|---|---|---|---|
symbol | string | obligatorio | El activo. |
timeframe | string | obligatorio | Tamaño de vela: 1m, 5m, 15m, 30m, 1h, 4h, 1d o 1w. |
limit | integer | 100 | Número de velas, de 1 a 1000. |
since_ms / until_ms | integer | — | Ventana fechada, en milisegundos, aplicada antes de limit. |
curl -H "X-API-KEY: $BYTNODE_API_KEY" \
"https://api.bytnode.com/v1/klines/history?symbol=BTCUSDT&timeframe=1h&limit=100"| Campo | Tipo | Descripción |
|---|---|---|
time | string | Inicio de la vela, ISO 8601. |
open, high, low, close | float | Los cuatro precios. |
volume | float | Volumen de TODOS los mercados: spot más futuros perpetuos, sumado en todas las plataformas, en unidades del activo base (un nombre sin sufijo de mercado cubre todos los mercados). null si una de las partes es desconocida; en una stablecoin, el volumen spot. |
buy_volume / sell_volume | float | Volumen comprado y vendido a mercado, todos los mercados (spot + futuros), en unidades del activo base. null si una de las partes es desconocida. |
is_volume_estimated | boolean | true cuando el volumen agregado de la vela se ha reconstruido (historial antiguo), false cuando se ha medido. |
volume_spot | float | Volumen del mercado spot, sumado en todas las plataformas, en unidades del activo base: buy_volume_spot + sell_volume_spot. null mientras no es definitivo o si es desconocido. |
buy_volume_spot | float | Volumen ejecutado como compra a mercado en el mercado spot, todas las plataformas, en unidades del activo base. |
sell_volume_spot | float | Volumen ejecutado como venta a mercado en el mercado spot, todas las plataformas, en unidades del activo base. |
is_volume_spot_estimated | boolean | true cuando el volumen agregado de la vela se ha reconstruido (historial antiguo), false cuando se ha medido. |
volume_futures | float | Volumen de los futuros perpetuos de la vela, sumado entre mercados, en unidades del activo base (null si es desconocido; null en una stablecoin, que no tiene mercado de futuros). |
buy_volume_futures / sell_volume_futures | float | Volumen comprado y vendido a mercado en futuros perpetuos, todas las plataformas, en unidades del activo base. |
is_closed | boolean | Solo se sirven velas cerradas (nunca la vela en curso). true en cuanto los volúmenes de la vela son definitivos, unos segundos después de su cierre; hasta entonces pueden valer null. |
#Variación de precio
Los 11 campos de esta ruta (según el contrato)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Instant of the latest trade of the reference spot market (`price` is that trade's price, the close of `/v1/klines?live=1`); if it has not traded since the latest closed one-minute candle, the end of that candle (`price` = its close). Exception: USDTUSDC, which no spot candle source lists, gives the instant of its latest trade, `price` being the volume-weighted price of its last 90 seconds. |
price | quote currency (USDT for BTCUSDT) | Price. |
changes_pct | Price change over each window, keyed by window (`1m` … `1w`), in percent. | |
changes_pct.1m | percent | Price change over the last 1m, in percent. |
changes_pct.5m | percent | Price change over the last 5m, in percent. |
changes_pct.15m | percent | Price change over the last 15m, in percent. |
changes_pct.30m | percent | Price change over the last 30m, in percent. |
changes_pct.1h | percent | Price change over the last 1h, in percent. |
changes_pct.4h | percent | Price change over the last 4h, in percent. |
changes_pct.1d | percent | Price change over the last 1d, in percent. |
changes_pct.1w | percent | Price change over the last 1w, in percent. |
La variación porcentual en las ocho temporalidades, calculada bajo demanda frente al precio de hace un minuto, cinco minutos, una hora, una semana. Una temporalidad sin historial es null, nunca un error.
{
"status": "ok",
"server_time": "2026-10-10T08:51:08.454Z",
"data_type": "price_change",
"symbol": "BTCUSDT",
"data": {
"time": "2026-10-10T08:50:00.000Z",
"price": 82818.72,
"changes_pct": {
"1m": 0.0201927489674, "5m": 0.0452759586592, "15m": -0.0102140384352,
"30m": -0.0437873393277, "1h": 0.0500741326695, "4h": 0.18183489701,
"1d": 0.240522875817, "1w": -2.15235074281
}
}
}Es una de las pocas rutas servidas para las stablecoins: en ese caso recurre a los ticks spot.
#Operaciones agregadas por segundo
Los 10 campos de esta ruta (según el contrato)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Start of the second the row covers. |
volume | base asset quantity (BTC for BTCUSDT) | Traded volume over the row, base asset units (BTC for BTCUSDT, NOT dollars), aggregated across venues, over the market(s) the route covers: spot + perpetual futures on `/v1/klines` and `/v1/trades-kline`, the path's market alone on a `/spot` or `/futures` route (a name without a market suffix covers every market of its route; `volume_spot` / `volume_futures` restrict). `null` when a market is not available (never a partial sum). |
trade_count | count | Number of trades. `null` when the number is not known: history imported from an outside source carries the buy and sell volumes, not the trade count. |
buy_volume | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) buy volume, base asset units, aggregated across venues. |
sell_volume | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) sell volume, base asset units, aggregated across venues. |
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. | |
net_volume | base asset quantity (BTC for BTCUSDT) | buy_volume - sell_volume over the row, base asset units. Positive = net buying. |
avg_trade_size | base asset quantity (BTC for BTCUSDT) | Average trade size, base asset units (NOT dollars: multiply by the price for a notional). |
trade_rate | trades per second | Average number of trades per second over the bucket. `null` when `trade_count` is. |
is_volume_estimated | `true` when some base-asset quantities of this row were ESTIMATED from USD amounts (history where a source reported amounts but not quantities): a buy or sell amount is converted at that source's own average price when its total quantity is known, otherwise at the candle's typical price (high + low + close) / 3. Every quantity a source measured is kept as is. `false` = all measured. `null` when the volume itself is `null` (not available). |
Una fila por segundo, sumada sobre todos los mercados. El parámetro limit cuenta por tanto segundos, no operaciones.
| Campo | Tipo | Descripción |
|---|---|---|
time | string | El segundo en cuestión. |
volume | float | Volumen total, sumado entre mercados. |
trade_count | integer | Número de operaciones, sumado entre mercados. |
buy_volume | float | Volumen de compra a mercado. |
sell_volume | float | Volumen de venta a mercado. |
El mismo reparto compra/venta por minuto o por bucket, para los futuros perpetuos, es el buy_volume / sell_volume de /v1/cvd/futures/history.
#Operaciones individuales y grandes órdenes
Los 6 campos de esta ruta (según el contrato)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Execution instant of the trade, as stated by the venue (milliseconds). |
id | Opaque, stable identifier of the trade (16 hex characters): the same trade always has the same `id`, so it can be used to deduplicate or resume. It reveals nothing about the venue. | |
side | Trades: `buy` or `sell` (aggressor side). Liquidations: `long` or `short` (the position liquidated). | |
price | quote currency (USDT for BTCUSDT) | Price. |
quantity | base asset quantity (BTC for BTCUSDT) | Quantity traded or liquidated, in base asset units. |
value_usd | USD | Notional value: price × quantity, in the pair's quote currency (USDT for BTCUSDT), taken as USD. |
Los 6 campos de esta ruta (según el contrato)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Execution instant of the trade, as stated by the venue (milliseconds). |
id | Opaque, stable identifier of the trade (16 hex characters): the same trade always has the same `id`, so it can be used to deduplicate or resume. It reveals nothing about the venue. | |
side | Trades: `buy` or `sell` (aggressor side). Liquidations: `long` or `short` (the position liquidated). | |
price | quote currency (USDT for BTCUSDT) | Price. |
quantity | base asset quantity (BTC for BTCUSDT) | Quantity traded or liquidated, in base asset units. |
value_usd | USD | Notional value: price × quantity, in the pair's quote currency (USDT for BTCUSDT), taken as USD. |
Las operaciones individuales (ejecuciones), una por fila, de todos los mercados y sin etiqueta de fuente: las mismas, con el mismo id, que los canales WebSocket trades.spot y trades.futures. limit va de 1 a 10 000. Sin otros parámetros obtienes las últimas operaciones. Para leer un intervalo de tiempo, añade since_ms, until_ms y/o order (asc o desc): una página cubre como máximo 15 minutos, y la respuesta incluye next, la URL de la página siguiente, lista para llamar (null cuando el intervalo está leído). Siguiendo next, cada operación se devuelve una sola vez y en orden. Lo mismo vale para /v1/trades/large, y para /v1/trades-kline/futures/seconds por páginas de limit segundos.
| Campo | Tipo | Descripción |
|---|---|---|
time | string | Marca de tiempo de la operación. |
side | string | buy o sell: el lado del tomador de liquidez. |
price | float | Precio de ejecución. |
quantity | float | Tamaño, en unidades del activo base. |
value_usd | float | Valor en dólares (precio × cantidad). |
Los 6 campos de esta ruta (según el contrato)
time | ISO 8601 UTC, milliseconds (2026-09-28T14:00:00.000Z) | Execution instant of the trade, as stated by the venue (milliseconds). |
id | Opaque, stable identifier of the trade (16 hex characters): the same trade always has the same `id`, so it can be used to deduplicate or resume. It reveals nothing about the venue. | |
side | Trades: `buy` or `sell` (aggressor side). Liquidations: `long` or `short` (the position liquidated). | |
price | quote currency (USDT for BTCUSDT) | Price. |
quantity | base asset quantity (BTC for BTCUSDT) | Quantity traded or liquidated, in base asset units. |
value_usd | USD | Notional value: price × quantity, in the pair's quote currency (USDT for BTCUSDT), taken as USD. |
El mismo flujo de futuros, filtrado por tamaño: la lectura de la cinta, para detectar las órdenes que importan.
| Parámetro | Tipo | Por defecto | Descripción |
|---|---|---|---|
symbol | string | obligatorio | El activo. |
min_usd | float | 100000 | Importe mínimo en dólares. Suelo de 1000. |
limit | integer | 100 | Número de eventos, de 1 a 10 000. |
# The last fifty orders above $250,000
curl -H "X-API-KEY: $BYTNODE_API_KEY" \
"https://api.bytnode.com/v1/trades/large?symbol=BTCUSDT&min_usd=250000&limit=50"#Velas de operaciones (trades kline)
Los 11 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. |
trade_count | count | Number of trades. `null` when the number is not known: history imported from an outside source carries the buy and sell volumes, not the trade count. |
avg_trade_size | base asset quantity (BTC for BTCUSDT) | Average trade size, base asset units (NOT dollars: multiply by the price for a notional). |
volume | base asset quantity (BTC for BTCUSDT) | Traded volume over the row, base asset units (BTC for BTCUSDT, NOT dollars), aggregated across venues, over the market(s) the route covers: spot + perpetual futures on `/v1/klines` and `/v1/trades-kline`, the path's market alone on a `/spot` or `/futures` route (a name without a market suffix covers every market of its route; `volume_spot` / `volume_futures` restrict). `null` when a market is not available (never a partial sum). |
buy_volume | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) buy volume, base asset units, aggregated across venues. |
sell_volume | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) sell volume, base asset units, aggregated across venues. |
net_volume | base asset quantity (BTC for BTCUSDT) | buy_volume - sell_volume over the row, base asset units. Positive = net buying. |
buy_sell_coverage_ratio | fraction (0.585 = 58.5 %) | Share of the volume (in USD) whose buy/sell split is known. 1 = every trade is split. Below 1 on part of the history, where some sources did not report the aggressor side: `buy_volume` and `sell_volume` then cover that share only, so `buy_volume + sell_volume` < `volume`; `buy_ratio` and the CVD describe the covered share. `null` when the bucket has no volume. |
trade_rate | trades per second | Average number of trades per second over the bucket. `null` when `trade_count` is. |
is_volume_estimated | `true` when some base-asset quantities of this row were ESTIMATED from USD amounts (history where a source reported amounts but not quantities): a buy or sell amount is converted at that source's own average price when its total quantity is known, otherwise at the candle's typical price (high + low + close) / 3. Every quantity a source measured is kept as is. `false` = all measured. `null` when the volume itself is `null` (not available). | |
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. |
Los 11 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. |
trade_count | count | Number of trades. `null` when the number is not known: history imported from an outside source carries the buy and sell volumes, not the trade count. |
avg_trade_size | base asset quantity (BTC for BTCUSDT) | Average trade size, base asset units (NOT dollars: multiply by the price for a notional). |
volume | base asset quantity (BTC for BTCUSDT) | Traded volume over the row, base asset units (BTC for BTCUSDT, NOT dollars), aggregated across venues, over the market(s) the route covers: spot + perpetual futures on `/v1/klines` and `/v1/trades-kline`, the path's market alone on a `/spot` or `/futures` route (a name without a market suffix covers every market of its route; `volume_spot` / `volume_futures` restrict). `null` when a market is not available (never a partial sum). |
buy_volume | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) buy volume, base asset units, aggregated across venues. |
sell_volume | base asset quantity (BTC for BTCUSDT) | Aggressive (taker) sell volume, base asset units, aggregated across venues. |
net_volume | base asset quantity (BTC for BTCUSDT) | buy_volume - sell_volume over the row, base asset units. Positive = net buying. |
buy_sell_coverage_ratio | fraction (0.585 = 58.5 %) | Share of the volume (in USD) whose buy/sell split is known. 1 = every trade is split. Below 1 on part of the history, where some sources did not report the aggressor side: `buy_volume` and `sell_volume` then cover that share only, so `buy_volume + sell_volume` < `volume`; `buy_ratio` and the CVD describe the covered share. `null` when the bucket has no volume. |
trade_rate | trades per second | Average number of trades per second over the bucket. `null` when `trade_count` is. |
is_volume_estimated | `true` when some base-asset quantities of this row were ESTIMATED from USD amounts (history where a source reported amounts but not quantities): a buy or sell amount is converted at that source's own average price when its total quantity is known, otherwise at the candle's typical price (high + low + close) / 3. Every quantity a source measured is kept as is. `false` = all measured. `null` when the volume itself is `null` (not available). | |
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. |
Velas construidas sobre las operaciones en lugar del precio — una «trades kline»: cuántas órdenes pasaron, en qué dirección y por qué importe, siempre agregadas sobre todos los mercados. Las operaciones individuales son /v1/trades/spot y /v1/trades/futures.
Cada ruta tiene su historial: /v1/trades-kline/history, /v1/trades-kline/spot/history, /v1/trades-kline/futures/history.
| Parámetro | Tipo | Por defecto | Descripción |
|---|---|---|---|
symbol | string | obligatorio | El activo. |
timeframe | string | obligatorio | 1m, 5m, 15m, 30m, 1h, 4h, 1d. Ausente o no válido: 422. |
live | boolean | false | Solo en las rutas de último valor: expone la vela en formación. |
limit | integer | 100 | En las rutas /history, de 1 a 1000. Allí solo se sirven velas cerradas. |
since_ms / until_ms | integer | — | En las rutas /history: ventana fechada, en milisegundos, aplicada antes de limit. |
# The 5-minute trade candle in progress
curl -H "X-API-KEY: $BYTNODE_API_KEY" \
"https://api.bytnode.com/v1/trades-kline?symbol=BTCUSDT&timeframe=5m&live=1"| Campo | Tipo | Descripción |
|---|---|---|
time | string | El instante de la fila (sustituye a la clave de origen, como bucket): un cliente genérico lee una sola clave. |
trade_count | integer | Número de operaciones en la ventana. |
avg_trade_size | float | null | Tamaño medio por operación, en unidades del activo base (BTC para BTCUSDT), no en dólares: multiplica por el precio para obtener un nocional. |
volume | float | Volumen total, en unidades del activo base (BTC para BTCUSDT) — no en dólares. |
buy_volume / sell_volume | float | Volumen comprador y vendedor, en unidades del activo base. |
net_volume | float | Volumen comprador menos volumen vendedor, en unidades del activo base. Positivo = compra neta. |
trade_rate | float | Operaciones por segundo: el número dividido por la duración de la temporalidad, también en una vela en formación, para que la definición sea la misma. |
is_volume_estimated | boolean | true cuando el volumen agregado de la vela se ha reconstruido (historial antiguo), false cuando se ha medido. |
is_closed | boolean | Falso solo en una vela en formación. |
En una stablecoin
/v1/trades-kline y /v1/trades-kline/spot siguen recibiendo datos, ya que una stablecoin tiene mercado spot. /v1/trades-kline/futures devuelve data: null con unavailable: "not_applicable": una stablecoin no tiene mercado de futuros.