Binance
Binance public API — Candles down to one minute for every spot pair on the largest exchange — no key for market data
When you need exchange-level detail — candles at any interval, the order book, trades, funding rates on futures — from one venue, with history to 2017 and monthly CSV dumps at data.binance.vision for bulk.
Reach for it when…
When you need exchange-level detail — candles at any interval, the order book, trades, funding rates on futures — from one venue, with history to 2017 and monthly CSV dumps at data.binance.vision for bulk.
Not for: A market-wide price (CoinGecko aggregates), fiat on-ramps, anything where one exchange's outage matters, use from a restricted jurisdiction.
Units, revisions, traps
Units. Prices in the quote asset (USDT for BTCUSDT — a stablecoin, not dollars); klines are arrays: [open time, open, high, low, close, volume, close time, quote volume, trades, …].
Revisions. Not revised.
- USDT pairs are not USD pairs; the stablecoin has traded off par.
- Klines return at most 1,000 rows per call; walk startTime for history.
- Timestamps are milliseconds; the close time is inclusive.
Classic mistake: Reading BTCUSDT as 'bitcoin in dollars' during a stablecoin depeg.
Three recipes
- Recipe 1 · Daily candles for BTCUSDT
- Recipe 2 · One-minute candles for the last day
- Recipe 3 · Bulk history from the data dumps
Each recipe: Python · Excel · Sheets, with how to read the result. Python recipes run under pandas; recipe 1 is re-run by the weekly check where the source allows it.
How to use it in your own work
Copy the snippet, change the series id, read the result the way the footer says. Replace YOUR_…_KEY with your own key where one is needed.
Recipe 1Daily candles for BTCUSDT
import requests, pandas as pd
u = "https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1d&limit=365"
cols = ["open_time", "open", "high", "low", "close", "volume", "close_time", "quote_vol", "trades", "tb_base", "tb_quote", "ignore"]
df = pd.DataFrame(requests.get(u, timeout=30).json(), columns=cols)
df["date"] = pd.to_datetime(df.open_time, unit="ms")
print(df.set_index("date")[["open", "high", "low", "close", "volume"]].astype(float).tail())- Data → From Web → the same URL; the result is a list of lists — expand and rename columns.
- No native JSON import — use the Python recipe or the monthly CSV dumps at data.binance.vision.
Recipe 2One-minute candles for the last day
import requests, pandas as pd
u = "https://api.binance.com/api/v3/klines?symbol=ETHUSDT&interval=1m&limit=1000"
df = pd.DataFrame(requests.get(u, timeout=30).json()).iloc[:, :6]
df.columns = ["open_time", "open", "high", "low", "close", "volume"]
df["time"] = pd.to_datetime(df.open_time, unit="ms")
print(df.set_index("time")[["close", "volume"]].astype(float).tail())- From Web with the same URL.
- Use the Python recipe.
Recipe 3Bulk history from the data dumps
# monthly zipped CSVs: https://data.binance.vision/?prefix=data/spot/monthly/klines/BTCUSDT/1d/
import pandas as pd
u = "https://data.binance.vision/data/spot/monthly/klines/BTCUSDT/1d/BTCUSDT-1d-2025-12.zip"
df = pd.read_csv(u, compression="zip", header=None).iloc[:, :6]
df.columns = ["open_time", "open", "high", "low", "close", "volume"]
print(df.head())- Download the zip from data.binance.vision and open the CSV.
- Import the CSV.
Series → question map
The ids we use from Binance public API, each with the question it answers. The catalog's compare view reads the concept tags behind these rows.
| Series | Answers | Region | Concept |
|---|---|---|---|
| klines · BTCUSDT 1d | Bitcoin daily candles on one exchange | global | crypto_spot |
| klines · 1m | Crypto intraday candles | global | crypto_intraday |
| depth | The order book right now | global | orderbook |
Compare with
Same question, different source: CoinGecko API, Twelve Data, Polygon.io. The compare view lines up coverage, frequency, history and access side by side and lists what the combination makes possible.
Open compare: Binance public API · CoinGecko API · Twelve Data →
Questions readers ask
Do I need an account?
Not for market data. Trading endpoints need a key and are outside this catalog.
Why does api.binance.com refuse me?
Geo-restriction: some jurisdictions (the US) are blocked; binance.us has a separate API and thinner markets.
Where is bulk history?
data.binance.vision — daily and monthly zipped CSVs per pair and interval, back to 2017.
Educational only — we explain, we never advise · snippet licence: public domain · corrections to [email protected], fixed within a day and logged in the changelog.