Binance API
Binance API
REST and WebSocket APIs for spot, futures, and margin trading on Binance. No authentication required for market data. Subject to weight-based rate limits.
Binance provides REST and WebSocket APIs for cryptocurrency trading and market data.
⚠️ Location-restricted: Binance's API returns HTTP 451 'restricted location' to requests from restricted regions, including the US (we confirmed this from a US server on Oct 17, 2026). Binance.US is a separate service with its own terms, and it isn't available in every US state (supported states: https://support.binance.us/en/articles/9842798-list-of-supported-and-unsupported-states-and-regions).
Coverage
Spot market: 1,300+ trading pairs (1,380 with status TRADING in exchangeInfo, Oct 17, 2026); real-time and historical prices, order books, trades and klines via REST and WebSocket; public market data needs no API key. Not available from restricted locations, including the US.
Good for
- Real-time crypto market data streaming
- Building crypto trading bots
- Historical price analysis
Verdict
Developing crypto trading bots that execute strategies based on order book depth and recent trade volume. Not available from restricted locations, including the US (HTTP 451); Binance.US is a separate service with its own terms.
Get the free weekly email
Free weekly email of newly verified free data. Unsubscribe by emailing us.
By entering your email and clicking Subscribe, you agree to receive the Signal Lab weekly email from Quantum Data Technologies Ltd., 3200-650 West Georgia Street, Vancouver, BC V6B 4P7, Canada (signal-lab@qdt.ai). You can unsubscribe at any time: reply "unsubscribe" to any email or write to signal-lab@qdt.ai. See our Privacy Policy.
Use in your agent
Analyze Binance spot klines in memory. Checked against the provider's documentation on Oct 29, 2026.
Access
- No account or API key for public market-data endpoints.
- Access varies by location. Binance states that its services may be restricted or blocked in some countries, and the global API refuses US locations with HTTP 451 (see the catalog entry). U.S. users should use Binance.US and its own API documentation. Observed 2026-10-29: api.binance.com returned HTTP 200 from our test environment.
Request
curl 'https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1d&limit=5'Format
JSON array of 12-item arrays: open time, OHLC, volume, close time, quote volume, trade count, taker-buy base and quote volume, then an unused field. Prices and volumes arrive as strings; timestamps are Unix milliseconds.
Load into pandas (in memory)
Needs Python 3 with requests and pandas. The provider's terms limit storage or leave it unclear, so this snippet does not write a file.
"""Binance spot daily klines -> pandas in memory. The data is not persisted."""
import requests
import pandas as pd
URL = "https://api.binance.com/api/v3/klines"
params = {"symbol": "BTCUSDT", "interval": "1d", "limit": 5}
r = requests.get(URL, params=params, timeout=30)
r.raise_for_status()
columns = ["open_time", "open", "high", "low", "close", "volume", "close_time",
"quote_volume", "trades", "taker_buy_volume", "taker_buy_quote_volume", "ignore"]
df = pd.DataFrame(r.json(), columns=columns)
df["open_time"] = pd.to_datetime(df["open_time"], unit="ms", utc=True)
df["close_time"] = pd.to_datetime(df["close_time"], unit="ms", utc=True)
for column in ("open", "high", "low", "close", "volume", "quote_volume",
"taker_buy_volume", "taker_buy_quote_volume"):
df[column] = pd.to_numeric(df[column])
print(len(df), "rows", df["open_time"].min().date(), "to", df["open_time"].max().date(),
"; last close", df["close"].iloc[-1])
del df # this example keeps no Binance market data after the process endsRun by us on 2026-10-29 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 5 rows 2026-10-26 to 2026-10-30 ; last close 77078.56
Limits
- The current exchangeInfo response states 6,000 REQUEST_WEIGHT per minute. Limits are per IP, and each klines request has weight 2.
- Klines default to 500 rows and allow at most 1,000 rows per request.
Quirks
- The snippet intentionally writes no file because the terms pages checked do not state permission to store or redistribute market data.
- The newest daily candle can still be open; close_time identifies when it is scheduled to finish.
- Access varies by location. Do not bypass a location block. Observed 2026-10-29 from our test environment: the global endpoint and the same request to api.binance.us both returned HTTP 200.
Terms and attribution
- Binance states that its services may be wholly or partly restricted in some countries and that access may be blocked. Do not circumvent the restriction.
- The terms grant use of Binance intellectual property, excluding trademarks, only as needed to receive the services for non-commercial personal or internal business use.
- The terms list Binance APIs as one way to access a Binance Account, subject to separate API terms and Binance's approval. The pages checked do not state permission to persist, redistribute or commercially publish market data, so this snippet keeps the response only in memory.
Sources
- https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md: “If unspecified, the security type is `NONE`.”
- https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md: “Public market data”
- https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md: “limit | INT | NO | Default: 500; Maximum: 1000.”
- https://api.binance.com/api/v3/exchangeInfo?symbol=BTCUSDT: “"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000”
- https://docs.binance.us/: “GET /api/v3/klines Use this endpoint to get Kline/candlestick bars for a token symbol. Klines are uniquely identified by their open time. Please note the maximum limit is 1,000 bars.”
- https://bin.bnbstatic.com/static/cms/cg08ou2ak0tn7mcplvfg/file/f7c3c8a8fbda48eaa272ff503b8c2e54c6c98ad4f0f2a1e5da3667af5962c7de.pdf: “Binance Services may be wholly or partially restricted in some countries”
- https://bin.bnbstatic.com/static/cms/cg08ou2ak0tn7mcplvfg/file/f7c3c8a8fbda48eaa272ff503b8c2e54c6c98ad4f0f2a1e5da3667af5962c7de.pdf: “excluding the Trade Marks, solely as necessary to allow you to receive the Binance Services for non-commercial personal or internal business use”
- https://bin.bnbstatic.com/static/cms/cg08ou2ak0tn7mcplvfg/file/f7c3c8a8fbda48eaa272ff503b8c2e54c6c98ad4f0f2a1e5da3667af5962c7de.pdf: “Binance APIs, subject to separate API terms and our approval”
Information and education only. Not financial, investment, legal or tax advice. Listings can be inaccurate, incomplete or out of date and are provided "as is". Free tiers, limits and licenses belong to each provider and can change, so check the provider's own terms before you rely on them. Terms & Disclaimer