Missing Crypto API Data: Null, Zero and Empty Arrays Mean Different Things
An API that returns null, 0 or an empty list is telling you three different things. Treating them the same corrupts your analysis.
Short answer
Null usually means 'unknown or not available' (DEX Screener's Pair schema marks fields such as priceUsd, liquidity.usd, fdv and pairCreatedAt as nullable); zero means a measured value of zero (no volume, no transactions); an empty array means the query matched nothing (no pools, no candles in range). Store them distinctly, never convert null to zero, and decide per field how your analysis treats unknowns: exclude, flag or retry.
Three different answers
| Response | Meaning | Example |
|---|---|---|
| null | Unknown / not provided | liquidity.usd null for a pair |
| 0 | Measured zero | txns.h1.buys = 0 |
| [] | No matching records | No pools for that address |
Review Missing Crypto API Data with bar replay before using it live.
Open ChartsPod replayExample
Illustrative: 100 pools, 20 with liquidity.usd = null. Treating null as zero gives average liquidity 20% lower than the true average of known pools and ranks those 20 pools as the thinnest, even if some are deep.
Rules
Related: DEX Screener Pair Data: Null vs Zero - Handle Missing Fields Correctly, Crypto Backtesting With Missing Candles: Reject or Repair the Dataset?, DEX Screener API vs GeckoTerminal API: Pair Snapshots or Candle History?.
Reporting missing values
Include a small table with every analysis: for each field used, how many records were null, zero and valid. Readers can then judge whether conclusions rest on complete data. If null share is high for a field central to the conclusion, say so in the summary rather than in a footnote.
Conclusion
Keep null, zero and empty distinct, and apply an explicit policy for unknown values.
Put Missing Crypto API Data next to price, flow and positioning in one workspace.
Open a ChartsPod workspaceQuestions readers ask
Is null the same as zero?
No; null means unknown, zero means measured zero.
What does an empty array mean?
No matching records for the query.
Which DEX Screener fields can be null?
Per its Pair schema: priceUsd, liquidity (and usd), fdv, marketCap, pairCreatedAt, among others.
Sources and methodology
API behaviour comes from DEX Screener's API reference, CoinGecko's onchain API documentation and Binance's USD-M market data documentation as read on 17 October 2026. Code-level details are described conceptually; check current endpoint versions before building. Examples use illustrative values.
- DEX Screener: API reference — token and pair endpoints, nullable fields, rate limits.
- CoinGecko API: Onchain OHLCV WebSocket — pool candles, base/quote selection, nullable fields.
- Binance: USD-M market data (long/short ratios, OI statistics, klines) — ratio definitions, 30-day retention, kline open/close time.
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.