Binance API

Beginner's Pick Cryptocurrency / API Key Intermediate HTTPS
77 B
Measured Score 0 50 100 Speed 25/30 Consistency 13/20 Security 20/20 Browser access 15/15 Transparency 4/15 TESTED 2026-08-10

Overview

Binance Spot API provides real-time and historical market data for thousands of cryptocurrency trading pairs on the world's largest crypto exchange by volume. Public endpoints — including order book depth, recent trades, and candlestick (kline) data — require no authentication, while account endpoints for placing orders require an API key and HMAC-SHA256 request signing. Developers use it to build trading bots, charting tools, and portfolio management apps.

Beginner Tip

Public market data endpoints like `/api/v3/ticker/price` need no API key at all — great for learning. Only trading and account endpoints need authentication. The WebSocket streams (wss://stream.binance.com:9443) are often easier than polling the REST API for real-time prices.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT
Result
HTTP 200 · application/json · 45 bytes
Response time
44 ms (median of 3) · fastest 37 ms
Transport
TLSv1.3 · TLS_AES_128_GCM_SHA256 · certificate issued by DigiCert Inc
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
nginx
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
symbol string BTCUSDT
price string 64019.45000000

Captured Response

Captured from a real request to https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "symbol": "BTCUSDT",
  "price": "64019.45000000"
}

Field Reference

symbol Trading pair identifier (e.g., "BTCUSDT" means Bitcoin priced in USDT).
price Current last traded price as a decimal string — parse to float for arithmetic.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist unknown

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

HTTP 400 Sending an invalid value for "symbol" application/json
{
  "code": -1100,
  "msg": "Illegal characters found in parameter 'symbol'; legal range is '^[\\w\\-._&&[^a-z]]{1,50}$'."
}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

-1100 Illegal characters in parameter The symbol parameter uses lowercase or incorrect formatting (e.g., "btcusdt" instead of "BTCUSDT").
All trading pair symbols must be uppercase: use "BTCUSDT", "ETHUSDT", etc.
-1121 Invalid symbol The requested trading pair does not exist on Binance Spot.
Query `GET /api/v3/exchangeInfo` to get the full list of valid symbols and confirm the pair you want is listed.
-1022 Signature for this request is not valid The HMAC-SHA256 signature is calculated incorrectly when using authenticated endpoints.
Ensure you sign the full query string (including `timestamp`) with your secret key before appending `&signature=...`. Use a library like `crypto` in Node.js to generate the HMAC correctly.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 25/30
Consistency 13/20
Security 20/20
Browser access 15/15
Transparency 4/15
Endpoint Response Time 44ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Cryptocurrency
Difficulty Intermediate
Endpoint last called: 2026-08-10

Alternatives to Binance

Technical alternatives for different use cases.

US-regulated exchange API with fiat on/off ramps

Better For

US-based applications needing regulatory compliance

Trade-off

Advanced trading features and lower fees

Advanced trading API with lower fees than Coinbase

Better For

Professional trading bots with limit orders

Trade-off

Global market access and altcoin variety

Established exchange with strong security track record

Better For

Security-focused trading with staking support

Trade-off

Number of trading pairs and liquidity depth

Similar APIs

View All →