Why CoinAPI OHLCV Data Looks Different from Exchanges

When you pull OHLCV (Open, High, Low, Close, Volume) data from CoinAPI, the numbers may not match exactly what you see on Binance, Coinbase, or TradingView. This can be confusing for beginners, but it’s normal. Here’s why, and how to use the data correctly.

CoinAPI aggregates data from hundreds of crypto exchanges, normalizing and standardizing it into a unified format.

However:

  • Exchanges/TradingView often use internal (native) order book and trade data, sometimes filtered or processed differently.
  • CoinAPI receives data via public APIs or data feeds, sometimes with latency, rate limits, or different sampling resolutions.
  • TradingView often builds candles using server-side aggregation, which may differ in:
    • Time zone (UTC vs exchange time)
    • Precision (e.g. milliseconds vs seconds)
    • Volume filters
  • CoinAPI candles are aggregated by:
    • Trade data timestamps
    • Consistent UTC-based intervals

This leads to slight differences in OHLCV values, especially for fast-moving or low-liquidity markets.

  • CoinAPI applies standardized decimal precision across instruments.
  • Exchanges may expose more (or fewer) decimal places for prices or volumes.
  • CoinAPI simplifies some precision metadata for uniformity across markets.
🔧 You can still access native exchange metadata using CoinAPI's /instruments or /symbols endpoints to get precision values per market.
IssueReason
🔸 Gaps in candlesNo trades occurred in the given time interval.
🔸 Low volume or zero volume candlesIlliquid or new markets with little activity.
🔸 Missing intervalsCoinAPI omits intervals where no trades exist to reduce noise.
🔸 Partial coverageCoinAPI may not cover all historical data, depending on your plan or exchange support.
  • Use the period_id parameter (e.g. 1MIN, 1HRS) carefully when calling /ohlcv/latest or /ohlcv/history.
  • Check your subscription plan for historical data depth.
  • Enable data fallbacks or interpolate gaps in your frontend/charting logic.
1GET /v1/ohlcv/{symbol_id}/history

Example:

1GET /v1/ohlcv/BITSTAMP_SPOT_BTC_USD/history?period_id=1MIN&limit=100
1GET /v1/instruments

Use this to retrieve metadata like:

  • price_precision
  • volume_precision
  • min_trade_size
1import requests
2
3headers = {'X-CoinAPI-Key': 'YOUR_API_KEY'}
4url = '<https://rest.coinapi.io/v1/ohlcv/BINANCE_SPOT_BTC_USDT/history>'
5params = {
6    'period_id': '1MIN',
7    'time_start': '2023-01-01T00:00:00',
8    'limit': 100
9}
10
11response = requests.get(url, headers=headers, params=params)
12ohlcv_data = response.json()
13print(ohlcv_data)
Source of DifferenceExplanation
Aggregation MethodsExchanges and CoinAPI aggregate trades differently.
Time Zones & TimestampsUTC on CoinAPI vs exchange local time.
Missing DataDue to no trades or limited historical coverage.
Rounding/PrecisionCoinAPI standardizes, exchanges may vary.

Always align your application’s timezone, data frequency, and instrument metadata with CoinAPI’s standardized format when comparing against third-party platforms. Use CoinAPI data for consistency and automation, but don’t expect pixel-perfect parity with visual platforms like TradingView.