REST API

Flow and microstructure

What the order book and the order flow say about the balance of power. Five families: cumulative volume delta, aggregated depth, weighted average prices, directional pressure and liquidation zones.

#CVD

GET/v1/cvddata_type · cvd_<tf>
GET/v1/cvd/historydata_type · cvd_<tf>_history

The cumulative volume delta: the running sum of market buy volume minus market sell volume. It measures who, of the buyers or the sellers, had to cross the order book, hence who is really pushing the price.

ParameterTypeDefaultDescription
symbolstringrequiredThe asset.
timeframestringrequired1m, 5m, 15m, 30m, 1h, 4h, 1d.
livebooleanfalseExposes the window in progress.
since_ms / until_msinteger—On the history only.
limitinteger100On the history, from 1 to 1000.
curl -H "X-API-KEY: $BYTNODE_KEY" \
  "https://api.bytnode.com/v1/cvd?symbol=BTCUSDT&timeframe=1h"
FieldTypeDescription
bucketstringStart of the window.
cvd_seriesfloat[]The cumulative series inside the window, one point per internal step, from oldest to newest. It is its slope that carries the information.
net_deltafloatBuy minus sell over the whole window.
taker_buy_volume / taker_sell_volumefloatThe two volumes that make up the delta.
points_countintegerNumber of points in the series.
is_closedbooleanFalse only with live=1.

#Order book

GET/v1/raw/orderbookdata_type · raw_orderbook

The last known state, aggregated: the latest snapshot of each venue, then the sum of the depths. No limit: the route returns a single object.

FieldTypeDescription
timestampstringThe most recent of the states retained.
bid_totalfloatBid volume, all venues.
ask_totalfloatAsk volume, all venues.
imbalancefloat | null(bid − ask) / (bid + ask), computed on the aggregated totals and not averaged per venue. Positive: buyers dominate.
GET/v1/orderbook/aggregateddata_type · orderbook_aggregated_<tf>
GET/v1/orderbook/aggregated/historydata_type · orderbook_aggregated_<tf>_history

The same depth, but summarised by window: mean, extremes and dispersion. This is the useful form for a chart or a regime detection, since an instantaneous order-book state is too noisy for that.

FieldTypeDescription
bucketstringStart of the window.
bid_total_avg / _min / _maxfloatCumulative bid volume, on average and at the extremes.
ask_total_avg / _min / _maxfloatThe same on the ask side.
imbalance_avg / _min / _maxfloatThe imbalance over the window.
imbalance_stdfloat | nullIts standard deviation: a measure of the stability of the balance of power.
samples_countintegerNumber of samples in the window.
is_closedbooleanFalse only with live=1.

#VWAP

Two VWAPs, not to be confused. The first is cumulative since midnight UTC: it is the average price of the day. The second is that of a window: one value per candle. Both are weighted by volume and aggregated across venues.

curl
# The VWAP of the day, since midnight UTC
GET /v1/vwap?symbol=BTCUSDT

# The VWAP of the last closed hour, one value per window
GET /v1/vwap/window?symbol=BTCUSDT&timeframe=1h
GET/v1/vwapdata_type · vwap
GET/v1/vwap/historydata_type · vwap_history
FieldTypeDescription
vwapfloat | nullVolume-weighted average price since midnight UTC.
cumulative_volumefloatCumulative volume, which serves as the weight.
timestampstringTimestamp of the last computation.

This route does not carry is_closed: it is not a candle but a running value.

GET/v1/vwap/windowdata_type · vwap_window_<tf>
GET/v1/vwap/window/historydata_type · vwap_window_<tf>_history
FieldTypeDescription
bucketstringStart of the window.
vwapfloat | nullVolume-weighted average price over the window.
total_volumefloatVolume of the window.
trade_countintegerNumber of trades in the window.
is_closedbooleanFalse only with live=1.

#Directional pressure

GET/v1/buysell/ratiodata_type · buysell_ratio
GET/v1/buysell/ratio/historydata_type · buysell_ratio_history
FieldTypeDescription
timestampstringTimestamp of the computation.
buy_volumefloatBuy volume over the 5-minute window.
sell_volumefloatSell volume.
buy_ratiofloatbuy / (buy + sell), from 0 to 1. Above 0.5, buyers dominate.
GET/v1/trades/avg-sizedata_type · trade_size_avg
GET/v1/trades/avg-size/historydata_type · trade_size_avg_history

The average size of a trade profiles the participants: it rises when institutional players come in, it collapses when the flow becomes a dust of retail orders.

FieldTypeDescription
avg_sizefloat | nullAverage size, weighted by the number of trades of each venue.
total_volumefloatTotal aggregated volume.
trade_countintegerAggregated number of trades.
timestampstringTimestamp of the computation.

#Liquidation heatmap

GET/v1/heatmap/clustersdata_type · heatmap_clusters
GET/v1/heatmap/clusters/historydata_type · heatmap_clusters_history

The zones where potential liquidations concentrate, above and below the price. They are zones of attraction: the price goes there to find the liquidity they represent.

FieldTypeDescription
timestampstringTimestamp of the computation.
density_up / density_downfloatDensity of the most attractive cluster above and below the price.
dist_up / dist_downfloatFractional distance of the cluster: 0.01 means 1%.
attraction_up / attraction_downfloatdensity / distance². The square makes the near weigh far more than the far.

How to read it

If attraction_down clearly exceeds attraction_up, the price is pulled downwards: liquidations of long positions are near. The reading is symmetrical in the other direction. It is an indicator of where the price has a mechanical reason to go, not a prediction.