DATA · BINANCE PERP OHLCV

Binance Perpetual OHLCV: Null vs Zero - Handle Missing Fields Correctly

Binance USD-M klines are 12-element arrays of strings. Gaps, ignored positions and zero-volume bars each mean something different.

Short answer

Binance USD-M kline endpoints return arrays with open time, OHLC, volume, close time, quote volume, trade count, taker-buy base and quote volume, and an ignored final field. A bar with volume "0" and trade count 0 is a measured quiet bar; a missing open time between two returned bars is a gap you did not receive, not a zero. Mark-price, index-price and premium-index klines reuse the same 12 slots but mark several as 'Ignore' and show them as "0" — those zeros are placeholders, not measured volume. Parse by endpoint, not by position alone.

Fields and what missing values mean

FieldNull / absent meansZero / empty means
Volume (trade klines)—"0": no trades in bar
Trade count—0: no trades
Missing open timeBar not received: gap—
Volume slot (mark/index klines)—"0" placeholder: ignore
Last field—Ignored by spec
Binance Perp Ohlcv: how to read each fieldBinance Perp Ohlcv: how to read each field: Volume (trade klines) — "0": no trades in bar; Trade count — 0: no trades; Missing open time — Bar not received: gap; Volume slot (mark/index klines) — "0" placeholder: ignore; Last field — Ignored by spec.Volume (trade klines)"0": no trades in barTrade count0: no tradesMissing open timeBar not received: gapVolume slot (mark/index klines)"0" placeholder: ignoreLast fieldIgnored by spec
Binance Perp Ohlcv: missing vs zero, field by field. Original ChartsPod editorial graphic.

Put Binance Perpetual OHLCV next to price, flow and positioning in one workspace.

Open a ChartsPod workspace

Handling policy

Policy for this sourcePolicy for this source: Key bars by open time; Check expected count per range; Never sum mark/index 'volume'; Convert strings to decimals once; Log gaps separately from zero bars.POLICY FOR THIS SOURCEKey bars by open timeCheck expected count per rangeNever sum mark/index 'volume'Convert strings to decimals onceLog gaps separately from zero bars
Apply this policy to every binance perp ohlcv request. Original ChartsPod editorial graphic.

Illustrative: a script that sums volume across mark-price klines reports 0 BTC traded all day. The endpoint was right; the parser treated 'Ignore' placeholders as data.

Conclusion

Related: Crypto Mark-Price Data: Null vs Zero - Handle Missing Fields Correctly, Crypto Index-Price Data: Null vs Zero - Handle Missing Fields Correctly.

Parse by endpoint, not by position alone.

Review Binance Perpetual OHLCV with bar replay before using it live.

Open ChartsPod replay

Questions readers ask

Is a zero-volume kline a gap?

No; it's a measured quiet bar. A missing open time is a gap.

Why do mark-price klines show volume 0?

Those slots are ignored placeholders.

What identifies a kline?

Its open time.

Sources and methodology

Field definitions come from DEX Screener's API reference, CoinGecko's onchain API documentation and Binance's Spot API documentation, read 17 October 2026. Where a schema was not visible in the documentation, this guide says so and describes defensive handling rather than asserting field behaviour.

  1. Binance: USD-M Futures market data API — trades, depth, funding and open interest.
  2. Binance Spot API: market data endpoints (klines) — 12-field klines, open-time identity, timeZone parameter.

This article explains research tools and workflows. It is not financial advice, does not recommend buying or selling any asset and does not predict prices. Crypto derivatives carry a risk of rapid and total loss of margin.

CHARTSPOD EDITORIAL EDITION · RESEARCH AND EDUCATION ONLY · NOT FINANCIAL ADVICE.