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
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
symbol | string | required | The asset. |
timeframe | string | required | 1m, 5m, 15m, 30m, 1h, 4h, 1d. |
live | boolean | false | Exposes the window in progress. |
since_ms / until_ms | integer | — | On the history only. |
limit | integer | 100 | On the history, from 1 to 1000. |
curl -H "X-API-KEY: $BYTNODE_KEY" \
"https://api.bytnode.com/v1/cvd?symbol=BTCUSDT&timeframe=1h"| Field | Type | Description |
|---|---|---|
bucket | string | Start of the window. |
cvd_series | float[] | The cumulative series inside the window, one point per internal step, from oldest to newest. It is its slope that carries the information. |
net_delta | float | Buy minus sell over the whole window. |
taker_buy_volume / taker_sell_volume | float | The two volumes that make up the delta. |
points_count | integer | Number of points in the series. |
is_closed | boolean | False only with live=1. |
#Order book
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.
| Field | Type | Description |
|---|---|---|
timestamp | string | The most recent of the states retained. |
bid_total | float | Bid volume, all venues. |
ask_total | float | Ask volume, all venues. |
imbalance | float | null | (bid − ask) / (bid + ask), computed on the aggregated totals and not averaged per venue. Positive: buyers dominate. |
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.
| Field | Type | Description |
|---|---|---|
bucket | string | Start of the window. |
bid_total_avg / _min / _max | float | Cumulative bid volume, on average and at the extremes. |
ask_total_avg / _min / _max | float | The same on the ask side. |
imbalance_avg / _min / _max | float | The imbalance over the window. |
imbalance_std | float | null | Its standard deviation: a measure of the stability of the balance of power. |
samples_count | integer | Number of samples in the window. |
is_closed | boolean | False 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.
# 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| Field | Type | Description |
|---|---|---|
vwap | float | null | Volume-weighted average price since midnight UTC. |
cumulative_volume | float | Cumulative volume, which serves as the weight. |
timestamp | string | Timestamp of the last computation. |
This route does not carry is_closed: it is not a candle but a running value.
| Field | Type | Description |
|---|---|---|
bucket | string | Start of the window. |
vwap | float | null | Volume-weighted average price over the window. |
total_volume | float | Volume of the window. |
trade_count | integer | Number of trades in the window. |
is_closed | boolean | False only with live=1. |
#Directional pressure
| Field | Type | Description |
|---|---|---|
timestamp | string | Timestamp of the computation. |
buy_volume | float | Buy volume over the 5-minute window. |
sell_volume | float | Sell volume. |
buy_ratio | float | buy / (buy + sell), from 0 to 1. Above 0.5, buyers dominate. |
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.
| Field | Type | Description |
|---|---|---|
avg_size | float | null | Average size, weighted by the number of trades of each venue. |
total_volume | float | Total aggregated volume. |
trade_count | integer | Aggregated number of trades. |
timestamp | string | Timestamp of the computation. |
#Liquidation heatmap
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.
| Field | Type | Description |
|---|---|---|
timestamp | string | Timestamp of the computation. |
density_up / density_down | float | Density of the most attractive cluster above and below the price. |
dist_up / dist_down | float | Fractional distance of the cluster: 0.01 means 1%. |
attraction_up / attraction_down | float | density / 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.