Query the chain · OHLC API
Bitcoin OHLC API for OHLCV candles and price history
OHLC data, the open, high, low and close of each time bucket, plus volume, is how almost every chart and backtest reads price. The Bitcoin OHLC API serves those candles at daily and intraday intervals across the full history, so you can backfill a model, draw a chart, or line price up against what was happening on-chain, without stitching together a market feed and a separate blockchain source yourself.
REST API · SQL · dashboards · indexed from genesis
Hit Run to query the fully-indexed Bitcoin blockchain.
BTC
30-day trend
informational on-chain data · not financial advice
The difference here is that the candles live in the same schema as the indexed chain. Pull OHLCV over REST for a dashboard, or run SQL to join a day's close to that day's exchange inflows, active addresses or realized price in a single query. Because price and on-chain data sit together, you answer questions a pure price API cannot, like what moved on-chain on the days a candle gapped. This is informational market and on-chain data, not a trading signal or investment advice.
Indexed from genesis queryable in seconds
On-chain data not financial advice
Why it works
What you get with OHLC API
OHLCV at every interval
Get open, high, low, close and volume candles at daily and intraday resolutions across the full price history, so you can backfill a backtest, render a chart or resample to your own timeframe from one clean series.
Joined to the chain
Because candles and the indexed chain share one schema, you can join a day close to that day exchange flows, active addresses, realized price or supply in profit in a single SQL query, instead of reconciling two separate feeds.
Backfill and keep current
Pull years of history in one pass to seed a model, then read the latest candles over REST as new blocks and market data land, so your charts and jobs stay current without you maintaining a price pipeline.
Side by side
Which Bitcoin daily candle endpoints do not use a UTC day, tested 1 September 2026
We called 18 public daily-candle endpoints from one machine on 1 September 2026 and read the raw start timestamp of every candle rather than trusting its date label. Four of them do not return a UTC day at all: they start at 16:00 UTC, which is midnight in UTC+8. Every one of those four returns HTTP 200 and a column named close. Rows are the close for the UTC day of 30 August 2026, a fully closed day.
| Endpoint and parameter | Candle starts | Close for 30 Aug 2026 | Same date vs Binance 1d | UTC-day option |
|---|---|---|---|---|
| Bitstamp btcusd, step=86400 | 00:00 UTC | 77,701.70 | top of band | default |
| MEXC BTCUSDT, interval=1d | 00:00 UTC | 77,699.42 | inside | default |
| Gemini btcusd, 1day | 00:00 UTC | 77,698.53 | inside | default |
| KuCoin BTC-USDT, type=1day | 00:00 UTC | 77,687.50 | inside | default |
| Bitfinex tBTCUSD, trade:1D | 00:00 UTC | 77,684.00 | inside | default |
| Gate.io BTC_USDT, interval=1d | 00:00 UTC | 77,683.40 | inside | default |
| Binance BTCUSDT, interval=1d | 00:00 UTC | 77,682.00 | reference row | default |
| Kraken XBTUSD, interval=1440 | 00:00 UTC | 77,681.60 | inside | default |
| Bitget BTCUSDT, granularity=1Dutc | 00:00 UTC | 77,681.00 | inside | this is the fix |
| OKX BTC-USDT, bar=1Dutc | 00:00 UTC | 77,677.70 | inside | this is the fix |
| Crypto.com BTC_USD, timeframe=1D | 00:00 UTC | 77,677.62 | inside | default |
| Bybit BTCUSDT, interval=D | 00:00 UTC | 77,676.70 | inside | default |
| Coinbase BTC-USD, granularity=86400 | 00:00 UTC | 77,665.14 | bottom of band | default |
| HTX btcusdt, period=1dayutc | 00:00 UTC | 77,631.18 | 33.96 below the band | this is the fix |
| OKX BTC-USDT, bar=1D | 16:00 UTC | 78,588.50 | 906.50 above (1.167%) | yes, bar=1Dutc |
| BingX BTC-USDT, interval=1d | 16:00 UTC | 78,580.42 | 898.42 above (1.157%) | none exists |
| Bitget BTCUSDT, granularity=1day | 16:00 UTC | 78,575.00 | 893.00 above (1.150%) | yes, granularity=1Dutc |
| HTX btcusdt, period=1day | 16:00 UTC | 78,506.71 | 824.71 above (1.062%) | yes, period=1dayutc |
Thirteen of the fourteen UTC-aligned rows sit inside a band 36.56 USD wide, a spread of 4.7 basis points on a roughly 77,700 USD asset. So the four shifted rows are wrong by roughly 25 times the entire disagreement between every independent order book we could reach. The error also does not calibrate away, because it is a 16-hour phase shift rather than a level shift: on 31 August the same four rows flipped sign and sat 661.86 to 739.95 USD BELOW Binance. The spelling of the fix is inconsistent across venues, and Bitget rejects granularity=1dutc with HTTP 400 while accepting granularity=1Dutc. BingX has no UTC-day option at all: its error response enumerates 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w and 1M. HTX runs about 0.05 percent below the pack on both of its endpoints, which is a genuine venue difference rather than a boundary artifact.
What it handles
The indexed Bitcoin chain, queryable your way
Look up an address, a transaction, a UTXO, the rich list or an on-chain metric, by REST API, SQL or dashboard. The same authoritative data, reconciled block-by-block against the canonical chain, without running a node.
- Fetch OHLCV candles at daily and intraday intervals
- Backfill full price history for a backtest or model
- Join a day close to on-chain metrics in one SQL query
- Resample candles to any timeframe you need
- Read the latest candles over REST for live charts
{
"address": "bc1qxy2k…l0wdv8",
"balance_btc": 68432.10,
"balance_usd": 4612165420,
"tx_count": 1284,
"unspent_outputs": 37,
"first_seen": "2014-02-09"
}
Why BitcoinDatabase
One platform, queryable three ways
Not a raw node to sync, not an indexer to build, and not five vendors to stitch together. The fully-indexed Bitcoin blockchain, available as a REST API, as SQL, and as dashboards, on one authoritative dataset.
REST API
Typed JSON for addresses, transactions, balances, UTXOs and metrics. Drop it into apps, wallets, explorers and agents with curl, Python or any HTTP client.
SQL access
Run SQL directly against the indexed Bitcoin dataset for ad-hoc analysis, cohorts and exports, the same data the API and dashboards read from.
Compliance-first
Informational on-chain data and analytics only. Entity labels and flow tracing are framed as tooling to support a regulated team's own review, not accusations.
Good questions
Questions about OHLC API
Explore more
More ways to query Bitcoin with BitcoinDatabase
Bitcoin historical data API
Full-depth history: every block, transaction and metric back to 2009.
Learn moreBitcoin transaction volume
Raw, change-adjusted and entity-adjusted on-chain volume series from the indexed chain.
Learn moreBitcoin active addresses
Daily active address counts, historical series and entity-adjusted numbers from the indexed chain.
Learn moreBTC address balance API
Get exact balances and UTXOs for any address, in batches.
Learn moreBitcoin address balance history API
What an address held on any past date, not just what it holds now.
Learn moreOn-chain metrics
Active addresses, realized cap, SOPR, HODL waves and exchange flows.
Learn moreStop running a node. Just query Bitcoin.
Run your first query now and get on-chain data back by REST API, SQL or dashboard, indexed from the genesis block. Informational on-chain data only, not financial advice.
Indexed from genesis · REST · SQL · dashboards · addresses, transactions, UTXOs, metrics