November 20, 2025

Does CoinAPI Provide Depth, Spreads, Volume, Prices, and Trade Distributions for Spot & Perpetual Markets?

featured image

Yes, CoinAPI provides all five data points (market depth, top-of-book spreads, daily trading volume, sampled/averaged prices, and trade frequency/size distributions) for both spot and perpetual markets across every covered exchange and pair. Depth and spreads come from order books and quotes, prices and daily volumes come from normalized OHLCV built from raw trades, and trade frequency/size metrics come from tick-level trade events. Historical workloads use T+1 Flat Files, while delayed or occasional access is available via REST or WebSocket streams.

Yes. Depth exists for every spot and perpetual instrument with order book coverage. You compute depth within ten, twenty five, fifty, one hundred, one hundred fifty or two hundred basis points around mid price by summing size at relevant price levels.

The historical start date varies by exchange and symbol. There is no universal “start date” for all markets - it depends on when each instrument became active and when CoinAPI began ingesting that venue’s order book. You can check symbol-specific availability using the v1/symbols endpoint.

If you need full-depth historical order book reconstruction, use the Flat Files API (T+1).

For recent or real-time depth, use the Market Data API via REST (20×20 snapshot) or WebSocket (streaming L2).

There are two main approaches.

  • Full limit order book files for historical depth with complete price levels and update events
  • Level two book snapshots via REST and real time books via WebSocket

Full order book files contain time stamps, bid or ask flags, price levels, size values and update types. Some venues include order identifiers which enables true order level reconstruction.

REST and WebSocket order books expose the top levels for live or delayed analytics.

You take one reconstructed snapshot then apply a simple process.

  1. Compute mid price from best bid and best ask.
  2. Derive upper and lower price bounds using the basis point threshold.
  3. Sum bid sizes above the bid bound.
  4. Sum ask sizes below the ask bound.

For wider bands or thin instruments full order book files offer complete visibility.

CoinAPI provides per-exchange, per-pair order book depth through three delivery mechanisms:

  1. Real-time L2 order books (WebSocket/FIX) • Best for live analytics, execution engines, and liquidity monitoring. • Depth is provided at the top levels, and you compute depth-at-bps on your side. • L2 events include price level + aggregated size (not order-by-order).
  2. Current L2 snapshot via REST • Fast way to fetch the latest 20×20 depth (REST returns up to 20 bids/asks). • Good for dashboards and periodic polling. • Not full-depth - this is expected by design.
  3. Historical full-depth via Flat Files (T+1) • These files contain every order book update, with full depth across all prices. • Recommended when computing depth at 100-200bps bands or for illiquid symbols. • You reconstruct the book deterministically from update events.

CoinAPI does not natively bucket depth by basis points.

Instead, you derive bps buckets client-side using the formula:

mid = (best_bid + best_ask)/2
tau = bps/10000.0
depth_bid_bps = sum(q for (p,q) in bids if (mid - p)/mid <= tau)
depth_ask_bps = sum(q for (p,q) in asks if (p - mid)/mid <= tau)

This provides full control and exchange-consistent logic.

Further reading:

Yes. Spread is derived directly from quote records. A quote includes best bid price, best ask price and corresponding sizes. You can compute absolute spreads and basis point spreads from these values.

For each quote you take

  • Mid price which equals best bid plus best ask divided by two
  • Absolute spread which equals best ask minus best bid
  • Spread in basis points which equals absolute spread divided by mid price multiplied by ten thousand

This series drives execution logic, venue comparison and slippage models.

CoinAPI’s top-of-book data comes from normalized quote updates. A quote contains:

  • best_bid_px
  • best_bid_size
  • best_ask_px
  • best_ask_size

Spread is not provided as a separate field because it is trivial and more reliable when computed client-side.

  • Real-time: via WebSocket or FIX (L1 / L2 streams).
  • Current: via REST snapshot endpoints.
  • Historical: via Quote Flat Files or REST historical quote snapshots.

Note: Historical REST snapshots are limited to the top 20 levels.

For perfect reproduction (e.g., slippage research), use Flat Files.

Further reading:

Yes. Daily volume is present in OHLCV data which is derived from raw trades. Each candle contains open, high, low, close and total base volume for the defined period.

Request OHLCV data with period set to one day for the specific symbol and exchange. The volume field in that candle gives the full daily traded base amount.

When you need exact control over filtering or custom rules you can sum trade sizes directly from trade level data.

CoinAPI’s OHLCV data is built from raw trades and normalized using:

  • Unified UTC timestamps
  • Deduplication
  • Late-trade reconciliation

Canonical T+1 bars are finalized after the UTC day closes and uploaded to Flat Files.

Research teams prefer this view because:

  • All late trades are included
  • No drift from real-time updates
  • Bars are guaranteed reproducible

If you need today’s in-progress volume, either stream trades or use the latest OHLCV bar (knowing it’s still accumulating).

Further reading:

Yes. OHLCV data provides consistent venue specific prices across flexible time windows such as one minute, five minutes, one hour and one day. The data is normalized in unified time and symbol structure.

You can select the close values for direct sampling or average multiple candles for smoother signals. Some users construct custom mid or VWAP values from trade level data.

This works identically for spot pairs and perpetual contracts.

If you need aggregated prices across multiple exchanges, use CoinAPI’s Exchange Rates API (VWAP24 methodology).

This provides:

  • Rolling 24-hour VWAP
  • High-legitimacy source selection
  • Quote and trade-weighted midpoint aggregation

Ideal for:

  • Portfolio valuation
  • Cross-venue pricing
  • Benchmarking strategies across fragmented markets

For per-exchange sampling, continue using OHLCV.

Yes. Trade level data is available in bulk files, REST endpoints and live streams.

Each record contains time, price, size and side from the taker perspective.

You aggregate by bucket such as one second or one minute.

  • Trade count
  • Total size
  • Average size
  • Median size
  • Percentile sizes for larger prints

These metrics support order flow models, market impact studies and liquidity analysis.

For heavy research workloads, CoinAPI provides Trade Flat Files:

  • One file per day per exchange per symbol
  • Includes: timestamps, price, base_amount, taker_side, and optional L3 fields (order IDs)

These files are ideal for:

  • Large-scale statistical distributions
  • Intraday liquidity modeling
  • Latency-sensitive microstructure research (using time_coinapi vs time_exchange)

Further reading:

Bulk Flat Files delivered via an S3-compatible interface contain complete historical trades, quotes, and full order book updates, organized by exchange and date.

Because files are downloaded only when needed and contain entire days of data in a single pull, Flat Files are the most efficient option for teams that need historical data occasionally rather than continuously.

They eliminate the need to maintain a long-running data pipeline and provide canonical, T+1-quality datasets for backtests, research, and model training.

The REST API is ideal when you want to retrieve specific symbols and time windows, without downloading full archives.

It works well for:

  • research notebooks
  • ad-hoc investigations
  • dashboards or validation scripts

Since REST usage scales with the number of data points returned, it’s a practical choice for occasional or lightweight queries.

If you occasionally need real-time activity, WebSocket connections stream trades, quotes, and order book updates as they happen.

Teams often use WebSocket during active research or execution phases, then disconnect when the session ends, making it suitable for non-continuous workflows.

Further reading:

Use full order book bulk files for accuracy

Use REST or WebSocket books for operational monitoring

Best for market making and liquidity research

Use quote streams for real time

Use quote history or bulk quote files for longitudinal analysis

Best for execution quality and routing models

Use one day OHLCV data

Use trade data when filtering or custom calculations are needed

Best for liquidity screens and risk limits

Use OHLCV across multiple periods

Best for backtesting and valuation

Use trade level tick data

Best for microstructure analytics and model features

Yes. All four primitives trades, OHLCV, quotes and order books exist for both markets.

Yes. You can compute blended volumes or weighted averages by combining venue level data.

No. Level two books, quotes, OHLCV data and trades are sufficient.

Yes. Many quant and academic teams rely only on bulk files and REST.

Use OHLCV for broad analysis and pull tick data only for narrow windows where tick precision influences results.

Yes, via Flat Files (T+1) which contain every update, allowing precise reconstruction.

Order books are event-driven, not time-bucketed. Aggregating them into artificial intervals discards important information.

Not exactly.

Real-time data is minimally processed; T+1 files are fully reconciled and deduplicated for canonical quality.

Further reading:

Teams typically combine OHLCV for broad analysis, tick-level data for precision models, L2/L3 for liquidity, and Flat Files for research-grade reproducibility. CoinAPI unifies all four primitives - quotes, trades, books, and bars, so you never need to handle exchange-specific quirks again.

Suppose you want to explore these datasets or evaluate them for your workflow. In that case, you can start by reviewing the CoinAPI Market Data documentation or testing a few endpoints against your target symbols.

background

Stay up-to-date with the latest CoinApi News.

By subscribing to our newsletter, you accept our website terms and privacy policy.

Recent Articles