Skip to content

Binance API rate limits in the SDK ​

Binance limits REST traffic by request weight per IP address and order placement per account. This page shows how the SDK reads those limits and your current usage, so you can slow down before you hit HTTP 429.

A short summary also lives on production usage.

How limits are counted ​

Binance limits REST traffic by request weight per IP address and order placement per account. Read the current limits from getExchangeInfo() rather than hard-coding them. On 27 November 2026 the values were:

MarketRequest weightOrders
Spot (MainClient)6000 per minute100 per 10 seconds, 200000 per day
USDⓈ-M futures (USDMClient)2400 per minute300 per 10 seconds, 1200 per minute

Each REST client keeps its own cache of Binance's usage headers. Each counter reflects the last valid header it saw, not necessarily the last response. Call getRateLimitStates() to read those values, such as x-mbx-used-weight-1m and x-mbx-order-count-10s, and slow down before you hit the limit rather than waiting for an HTTP 429.

The cache is only as fresh as those last valid headers, so the figures can be stale. Until a response arrives, the counters sit at 0 and lastUpdated is unset, which does not mean the IP is unused. To refresh the cache, make the cheapest call available: getServerTime(). It exists on every REST client (MainClient, USDMClient and CoinMClient) and updates the cached state when the reply comes in.

Do not use getExchangeInfo() to refresh the usage cache. Its responses can be served from an edge cache, and the usage headers may not reflect your IP address. Keep using getExchangeInfo() for the limit values themselves.

Aim to stay comfortably below the limit, for example around 80% of the request-weight budget, rather than running right up to it.

ts
import { MainClient } from 'binance';

async function main() {
  const client = new MainClient();
  const info = await client.getExchangeInfo({ symbol: 'BTCUSDT' });
  const weightLimit = info.rateLimits.find(
    (limit) => limit.rateLimitType === 'REQUEST_WEIGHT',
  );

  await client.getServerTime();
  const states = client.getRateLimitStates();
  console.log('Weight limit per minute:', weightLimit?.limit);
  console.log('Weight used this minute:', states['x-mbx-used-weight-1m']);
}
main().catch((error) => {
  console.error(error instanceof Error ? error.message : 'Request failed. See the troubleshooting guide.');
  process.exitCode = 1;
});

When backfilling at speed, call getServerTime() before the first kline request so the weight counter is fresh, then read x-mbx-used-weight-1m from getRateLimitStates() and sleep when usage crosses that safety threshold:

ts
import { MainClient } from 'binance';

const PAGE_SIZE = 1000;
const SAFETY_FRACTION = 0.8;

function sleep(ms: number) {
  return new Promise((resolve) => setTimeout(resolve, ms));
}

async function main() {
  const client = new MainClient();
  const info = await client.getExchangeInfo({ symbol: 'BTCUSDT' });
  const weightLimit = info.rateLimits.find(
    (limit) =>
      limit.rateLimitType === 'REQUEST_WEIGHT' &&
      limit.interval === 'MINUTE' &&
      limit.intervalNum === 1,
  )?.limit;
  if (!weightLimit) {
    throw new Error('REQUEST_WEIGHT limit missing from exchange info.');
  }

  await client.getServerTime();

  const candles: Awaited<ReturnType<MainClient['getKlines']>> = [];
  let startTime = Date.now() - 3 * 24 * 60 * 60 * 1000;

  while (candles.length < 3000) {
    const used = client.getRateLimitStates()['x-mbx-used-weight-1m'];
    if (used >= weightLimit * SAFETY_FRACTION) {
      await sleep(2000);
      await client.getServerTime();
      continue;
    }

    const page = await client.getKlines({
      symbol: 'BTCUSDT',
      interval: '1m',
      startTime,
      limit: PAGE_SIZE,
    });
    if (!page.length) break;
    candles.push(...page);
    if (page.length < PAGE_SIZE) break;
    startTime = page[page.length - 1][0] + 60_000;
  }

  console.log('Fetched candles:', candles.length);
  console.log('Weight used this minute:', client.getRateLimitStates()['x-mbx-used-weight-1m']);
}
main().catch((error) => {
  console.error(error instanceof Error ? error.message : 'Request failed. See the troubleshooting guide.');
  process.exitCode = 1;
});

All processes on one IP address share the weight budget, so the value can be higher than your own client's requests. An HTTP 429 means a limit was hit. Repeatedly ignoring 429 responses leads to HTTP 418 and an automatic IP ban. Back off for the Retry-After period, and use WebSocket streams for data that changes continuously.

Production usage · WebSocket streams · Troubleshooting

Built by Siebly. Open source SDKs for exchange APIs.