Binance Data Connector
Want Bitcoin, Ethereum, or altcoin charts with live prices and no API key? The Binance connector talks to Binance public endpoints — history over REST, updates over WebSocket.
Use the controls above to change symbol and timeframe. This is the same integration you will copy into your app.
Full-page version with sample code: Binance live demo.
What you get
| Feature | Details |
|---|---|
| No API key | Public Binance market data |
| History | Up to 1,000 candles per request |
| Live ticks | WebSocket stream, auto-reconnect |
| Pairs | 100+ symbols (BTCUSDT, ETHUSDT, …) |
| Timeframes | 1m through monthly |
Perfect for crypto dashboards, DEX frontends, and prototypes.
Install
npm install @efixdata/exeria-chart @efixdata/connector-binance
Minimal example
import { createChart } from "@efixdata/exeria-chart";
import { BinanceAdapter } from "@efixdata/connector-binance";
const connector = new BinanceAdapter();
const chart = createChart({
container,
dataAdapter: connector,
});
chart.init();
await chart.loadData("BTCUSDT", {
interval: "1d",
limit: 1000,
});
chart.subscribeToUpdates("BTCUSDT", (tick) => {
console.log("Last price:", tick.price ?? tick.c);
});
Step by step
1 — Create the connector
const connector = new BinanceAdapter();
Uses Binance public URLs by default. Optional tuning below.
2 — Attach to the chart
const chart = createChart({ container, dataAdapter: connector });
chart.init();
The chart delegates loadData and subscribeToUpdates to the connector.
3 — Load history
await chart.loadData("BTCUSDT", {
interval: "1h",
limit: 500,
});
| Option | Meaning |
|---|---|
interval | Candle size — "1m", "1h", "1d", "1w", "1M" |
limit | How many recent bars (max 1,000) |
from / to | Optional date range instead of “latest N” |
4 — Go live
chart.subscribeToUpdates("BTCUSDT");
// or with a callback:
chart.subscribeToUpdates("BTCUSDT", (tick) => { /* update UI */ });
5 — Clean up
chart.unsubscribeFromUpdates();
await connector.disconnect();
Popular symbols
| Symbol | Market |
|---|---|
BTCUSDT | Bitcoin / USDT |
ETHUSDT | Ethereum / USDT |
BNBUSDT | BNB / USDT |
SOLUSDT | Solana / USDT |
XRPUSDT | XRP / USDT |
Symbol format is always BASE + QUOTE with no separator (BTCUSDT, not BTC/USDT).
Switch cryptocurrency
async function switchSymbol(newSymbol: string) {
chart.unsubscribeFromUpdates();
await chart.loadData(newSymbol, {
interval: "1d",
limit: 500,
});
chart.subscribeToUpdates(newSymbol);
}
Always unsubscribe before loading a new symbol on the same chart instance.
Custom configuration (optional)
Defaults work for most apps. For retries or alternate REST host:
const connector = new BinanceAdapter({
baseUrl: "https://data-api.binance.vision",
requestTimeout: 10000,
maxRetries: 5,
retryDelay: 2000,
});
Error handling
try {
await chart.loadData("BTCUSDT", { interval: "1d", limit: 1000 });
} catch (error) {
if (error instanceof Error && error.message.includes("404")) {
console.error("Symbol not found on Binance");
} else {
console.error("Load failed:", error);
}
}
Show a retry button or message in your UI — users on bad networks will thank you.
Limits to know
| Topic | Limit |
|---|---|
| Candles per request | 1,000 max |
| REST rate | ~1,200 requests/minute (Binance policy) |
| Browser | Needs WebSocket support (all modern browsers) |
For heavy traffic: cache history server-side or use Binance's data API mirror.
What is next?
- Bybit — same connector pattern on Bybit spot data
- OKX — OKX spot with
BTC-USDTsymbols - Kraken — USD spot with
BTC/USDsymbols - KuCoin — USDT spot with
BTC-USDTsymbols - Coinbase — USD / USDC spot with
BTC-USDproduct ids - CoinGecko — broad catalog via coin ids (
bitcoin,ethereum) - Overview — lifecycle and custom connectors
- Loading data — all
loadDataoptions - Live data stream — what happens under the hood
- Crypto terminal demo — full product example