# Crypto price API: live, historical and OHLCV data

URL: https://fincodelabs.com/en/blog/crypto-price-api · Publisher: Fincode (Fincode Yazılım ve Teknoloji A.Ş.), Istanbul, Turkey · Category: Exchange APIs · Published: 2026-11-05 · Updated: 2026-11-05

Crypto price API guide: exchange endpoints, aggregators and tick vendors, pricing checked in November 2026, tested Python for OHLCV candles, gaps and licenses.

**Short answer:** A **crypto price API** returns live or historical prices and OHLCV candles from one of three kinds of source: an exchange's own public endpoints, an aggregator that blends many markets, or a vendor of tick-level history. Exchange candles are usually free and need no key, but free access does not grant the right to redistribute them. Check candle boundaries, gaps, delisted symbols and the license before you build on any feed.

Fetching a price takes one line of code. Getting a series you can trust, and are allowed to use in your product, takes more work. This guide compares the three kinds of source, says what "free" really includes, and shows tested Python that fetches public candles with no key and checks them for gaps. Calls ran on 4 November 2026, and pricing is as published that day. Stock data is covered separately in the [stock market data API guide](https://fincodelabs.com/en/blog/stock-market-data-api).

Names appear only to describe their official documents. This is not a ranking or a recommendation of any exchange, vendor or asset, and there are no referral links. Rules depend on your jurisdiction and each platform's terms. In Turkey, Article 99/A of Capital Markets Law No. 6362 treats activity aimed at Turkish residents by foreign platforms as unlicensed, and this guide is not aimed at them.

## Three kinds of crypto price API

Choose by what your rules actually need: one venue's candles, one blended price, or full trade and order book history.

**Sources of crypto market data**

| Source | What you get | Common use | Watch for |
| --- | --- | --- | --- |
| Exchange public endpoints | That venue's candles, trades and book | Bots and backtests tied to one venue | Symbol formats, retention limits, terms |
| Aggregators such as CoinGecko and CoinAPI | Many coins or markets through one API | Portfolio apps and price displays | Blending method, credits, attribution |
| Tick vendors such as Tardis.dev and Kaiko | Trade and order book history | Research that depends on the book | Cost, data volume, license |

An aggregated price is a calculation, not a price you can trade at: [CoinGecko's methodology](https://www.coingecko.com/en/methodology) describes a volume-weighted average after outliers are removed. A build based on candles usually needs no paid vendor for the data itself, since exchange endpoints or a library such as [CCXT](https://fincodelabs.com/en/blog/ccxt-python-trading-bot) can fetch it, though the license section below still applies. Paid tick data matters when your own rules depend on order book history. Live book streaming is a separate job, covered in the [order book guide](https://fincodelabs.com/en/blog/websocket-order-book).

## Crypto price API free: what free really includes

Free access is real, but each option is limited by rate, history or license, as of 4 November 2026.

- **Exchange public endpoints.** No key and no fee. You get IP rate limits, per-request caps and the exchange's terms.
- **CoinGecko Demo.** $0, 10,000 call credits a month, 100 calls a minute and one year of daily and hourly history, with attribution required.
- **CoinAPI pay-as-you-go.** $25 of free credit, then metered use.
- **Binance bulk files.** Free daily and monthly archives at `data.binance.vision`, under a non-commercial license explained below.

So free is often enough for evaluation and personal research. It may not be enough for a product, which is usually where the license decides the matter.

## Exchange OHLCV endpoints compared

OHLCV endpoints look alike but differ in page size, retention, ordering and timestamps, so pagination code does not transfer between them.

**Public candle endpoints, called without a key on 4 November 2026 (alphabetical)**

| Venue | Endpoint | Maximum per request | Order returned | Note |
| --- | --- | --- | --- | --- |
| Binance | `GET /api/v3/klines` | 1,000 (default 500) | Oldest first | Weight 2; identified by open time in milliseconds |
| Coinbase | `GET /api/v3/brokerage/market/products/{id}/candles` | 350 | Newest first | `start` in seconds; a 500-minute window was rejected |
| Kraken | `GET /0/public/OHLC` | 720 most recent | Oldest first | Older data cannot be retrieved here, even with `since`; the test returned 721 rows, counting the open candle |
| OKX | `GET /api/v5/market/history-candles` | 300 (default 100) | Newest first | Daily bars open at UTC+8 unless you ask for `1Dutc` |

> **Hypothetical example.** One year of 1-minute candles is 365 x 24 x 60 = 525,600 rows. At 1,000 per request that is 526 requests, or 1,052 weight on Binance's scale, where the listed limit was 6,000 a minute on 4 November 2026. At 350 per request it is 1,502 requests. At a venue that keeps only the latest 720 rows, it cannot be done at all.

## Crypto price API Python example: candles and a gap check

This script pages through public candles with `requests`, drops the unfinished candle, and counts missing and zero-volume minutes. It needs no key, and the symbol is only an example.

```python
import time
from datetime import datetime, timezone
import requests

BASE = "https://data-api.binance.vision"   # public market data, no key
MINUTE = 60_000

def to_ms(text):
    dt = datetime.fromisoformat(text).replace(tzinfo=timezone.utc)
    return int(dt.timestamp() * 1000)

def candles(symbol, interval, start_ms, end_ms):
    rows, cursor = [], start_ms
    while cursor < end_ms:
        r = requests.get(BASE + "/api/v3/klines", timeout=10, params={
            "symbol": symbol, "interval": interval, "limit": 1000,
            "startTime": cursor, "endTime": end_ms - 1})
        if r.status_code == 429:               # told to back off
            time.sleep(int(r.headers.get("Retry-After", 60)))
            continue
        r.raise_for_status()
        page = r.json()
        if not page:
            break
        rows += page
        cursor = page[-1][6] + 1               # 1 ms after the last close
    now = time.time() * 1000
    return [c for c in rows if c[6] < now]     # drop the unfinished candle

start, end = to_ms("2023-03-24T12:00:00"), to_ms("2023-03-24T15:00:00")
rows = candles("BTCUSDT", "1m", start, end)
opens = {c[0] for c in rows}
missing = [t for t in range(start, end, MINUTE) if t not in opens]
zero_volume = [c[0] for c in rows if float(c[5]) == 0]
print("expected", (end - start) // MINUTE, "returned", len(rows))
print("missing", len(missing), "zero volume", len(zero_volume))
```

Output on 4 November 2026:

```
expected 180 returned 100
missing 80 zero volume 40
```

The window was chosen because the series breaks there. Of 180 expected minutes, 40 came back with zero volume (12:00 to 12:39 UTC) and 80 did not come back at all (12:40 to 13:59 UTC). A loop that only counts rows, or a chart library that joins the points, would hide both. Keep the two cases apart, and mark gaps rather than inventing prices to fill them. The `data-api.binance.vision` host serves public market data only, and it lists the 13 REST endpoints it supports. Libraries that backtest on such data are compared in [backtesting Python libraries](https://fincodelabs.com/en/blog/backtesting-python-libraries).

## Candle alignment, gaps and delisted symbols

Two correct feeds can disagree on the same day's candle, because they define the candle differently.

- **Day boundaries.** In testing on 4 November 2026, Binance's daily candle opened at 00:00 UTC, or at 16:00 UTC the day before with `timeZone=8`. OKX's `1D` opened at 16:00 UTC and its `1Dutc` at 00:00 UTC.
- **Timestamps.** Binance and OKX stamp the open. CoinGecko's OHLC documentation says its timestamp marks the close. Binance's bulk files use [microseconds for spot data from 1 January 2025](https://github.com/binance/binance-public-data).
- **Automatic granularity.** CoinGecko's OHLC documentation sets candle size by range: 30 minutes for 1 to 2 days, 4 hours for 3 to 30 days and 4 days beyond that. The `days` parameter takes only listed values, though. Without a key, 1 gave 30-minute candles, 7, 14 and 30 gave 4-hour candles, 90, 180 and 365 gave 4-day candles, and 2, 3 and 31 returned HTTP 400. A 30-day request returned 180 candles.
- **Unfinished candles.** Binance's close time is in the future, Kraken's docs say its last entry is not yet committed, and OKX sets `confirm` to 0. Exclude them from anything that drives a decision.
- **Delisted symbols.** On 4 November 2026 Binance's `exchangeInfo` listed 2,370 of its 3,742 symbols as `BREAK` rather than `TRADING`. `BCCUSDT` was one, with daily candles ending on 20 November 2018. Building a test universe from today's `TRADING` list quietly removes such markets, which is [survivorship bias](https://fincodelabs.com/en/blog/backtesting-trading-strategy-pitfalls). Save a dated symbol list.

## Crypto market data API pricing, November 2026

Published prices range from $0 to thousands of dollars a month, and some vendors publish none.

**USD prices as shown on each vendor's page, 4 November 2026 (alphabetical, not a ranking)**

| Vendor | Published plans per month | Quoted allowance |
| --- | --- | --- |
| CoinAPI Market Data API | Pay-as-you-go ($25 free credit); Startup $79; Streamer $249; Pro $599; Enterprise custom. Annual billing: $69, $199, $499 a month | 1,000, 10,000 and 100,000 REST credits a day on the fixed plans; its FAQ lists order book data over WebSocket on Pro |
| CoinGecko API | Demo $0; Basic $35; Analyst $129; Lite $499; Pro $999; up to $2,997. Annual billing from $29 a month | 10,000; 100,000; 500,000; 2M; 5M; up to 15M credits a month |
| Kaiko | Quote only | Custom plans by assets, data type, granularity and usage |
| Tardis.dev | Perpetuals or Options: $350, $700, $1,000, $3,000. Spot or Derivatives: $450, $900, $1,350, $3,500. All Exchanges: $650, $1,200, $2,200, $6,000, by Academic, Solo, Professional and Business tier. Academic is quarterly or yearly billing only; minimum order $300 | 20 TB of transfer a month (Business 60 TB) |

Compare what each plan permits as well as its price: history depth, data type, transfer limits and commercial terms. Taxes and contract terms can change the final figure, so recheck the vendor's page before budgeting. If you are scoping a data pipeline for a product, the drivers are covered on the [exchange API integration](https://fincodelabs.com/en/services/exchange-api-integration) page.

## Data licenses and redistribution rights

Being able to fetch data does not give you the right to show it to others or build a product on it.

- **OKX API Agreement, Section 9.4** (updated 28 July 2026). Market data is for personal, non-commercial trading and account management. Resale, redistribution, publishing or display to third parties needs written consent, and the limits apply equally to public endpoints.
- **Binance Vision Dataset Terms** (updated 26 August 2026). Files are under CC BY-NC-SA 4.0. The terms bar live proprietary trading execution, automated commercial order generation and use in commercial trading bot platforms, and commercial use needs a separate written license. Permitted uses include academic research and purely personal, non-production backtesting. They cover `data.binance.vision` and "associated endpoints" without saying whether the market data API host is one, so ask Binance if that matters to you.
- **CoinGecko API Terms** (5 September 2025). You must display attribution. You may not resell, redistribute or syndicate access. Storage is discouraged, and any cache should refresh at least every 24 hours. Its pricing page says paid plans may feed products you charge for, with attribution, while redistribution or resale needs a custom license.
- **Kaiko.** Subscriptions come with a standard data licensing agreement that sets how products may be used.

Before launch, write down each feed, what your product does with it (display, storage, derived figures, automated decisions) and the clause that allows it. A public price widget, a paid dashboard and an internal research notebook can be very different cases. Get written permission where the terms ask for it, and have a lawyer read the result if the product is commercial.

## Frequently asked questions

### Is there a free crypto price API?

Yes. Exchange public endpoints need no key, and CoinGecko's Demo plan was $0 on 4 November 2026 with 10,000 call credits a month and attribution required. Free access has rate, history and license limits.

### How do I get crypto OHLCV data in Python?

Call a public candle endpoint with requests, page through the results using the last candle's time, drop the unfinished candle and check for gaps. The script in this guide does this with no key.

### Can I get crypto historical data for free?

Often for candles, within each venue's retention limits. Kraken's OHLC endpoint returns only the latest 720 entries, while Binance's klines and bulk files reach further back. Bulk files are licensed for non-commercial use under Binance's dataset terms.

### Can I show exchange prices in my own app?

Not automatically. OKX's agreement, for example, requires written consent to display market data to third parties, even from public endpoints. Read each source's terms and get permission where required.

### Why do two APIs show different prices for the same coin?

They may measure different markets, quote currencies or moments. An aggregator's price is a calculated average, an exchange's price comes from one order book, and USDT and USD pairs are different markets.

### Do I need paid tick data?

Only if your rules depend on trades or order book history that candles cannot show. Paid history does not make a strategy profitable, and any backtest result still says nothing certain about the future.

## Sources

- [Binance Spot API: Market data endpoints (klines)](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market)
- [Binance Spot API: Market data only URLs](https://developers.binance.com/en/docs/products/spot/faqs/market_data_only)
- [Binance Vision Dataset Terms, updated 26 August 2026](https://github.com/binance/binance-public-data/blob/master/TERMS_AND_CONDITIONS.md)
- [Coinbase Advanced Trade API: Get public product candles](https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-public-product-candles)
- [Kraken API: Get OHLC data](https://docs.kraken.com/api-reference/market-data/get-ohlc-data)
- [OKX API v5 documentation (candlesticks)](https://www.okx.com/docs-v5/en/)
- [OKX API Agreement, Section 9.4, last updated 28 July 2026](https://www.okx.com/help/okx-api-agreement)
- [CoinGecko API pricing, read 4 November 2026](https://www.coingecko.com/en/api/pricing)
- [CoinGecko API docs: Coin OHLC chart by ID](https://docs.coingecko.com/reference/coins-id-ohlc)
- [CoinGecko API Terms, latest version 5 September 2025](https://www.coingecko.com/en/api_terms)
- [CoinGecko: Methodology](https://www.coingecko.com/en/methodology)
- [CoinAPI: Market Data API pricing, read 4 November 2026](https://www.coinapi.io/products/market-data-api/pricing)
- [Tardis.dev: Pricing, read 4 November 2026](https://tardis.dev/#pricing)
- [Kaiko: Pricing and contracts](https://www.kaiko.com/about-kaiko/pricing-and-contracts)
- [Capital Markets Law No. 6362, consolidated text, Article 99/A (Turkish)](https://www.mevzuat.gov.tr/mevzuatmetin/1.5.6362.pdf)

> This guide is general information about software and markets, not investment, legal or tax advice. Automated trading can lose money, past or backtested performance does not guarantee future results, and the rules that apply depend on your jurisdiction and your exchange's terms. Sources, checks and corrections: see the [editorial policy](https://fincodelabs.com/en/editorial-policy).

---

Published by Fincode (Fincode Yazılım ve Teknoloji A.Ş.), a software company in Istanbul, Turkey: https://fincodelabs.com/en/blog/crypto-price-api

Cite as: Fincode, "Crypto price API: live, historical and OHLCV data", updated November 5, 2026, https://fincodelabs.com/en/blog/crypto-price-api
