What are the IP weights?

Q: In the Binance API docs, what does the weight field means?

A: The weight is used at Binance to prevent from API abuse.

Binance provides 200+ API endpoints to clients for free. However we have to deploy a mechanism to encourage clients sending properly request, but not abuse them by sending too many unnecessary requests.

In the document, each API endpoint has its weight, e.g.

image

This means if you sending one request from IP(e.g. 1.2.3.4)

GET /api/v3/depth?symbol=BNBUSDT&limit=5

Sever will make a record in the back and says 1.2.3.4 has used weight of 1

If you send an endpoint that has a higher weight, say for example:

GET /api/v3/depth?symbol=BNBUSDT&limit=5000
then in the backend, Sever will says IP 1.2.3.4 used weight of 50

If you check the response header of each request, you will find a customised headers:

X-MBX-USED-WEIGHT-1M and X-MBX-USED-WEIGHT

These data help users to understand their current weight usage.

What are the IP weight limits?

In the endpoint of https://api.binance.com/api/v3/exchangeInfo, we returns the current allowance for http requests.


{
        "rateLimitType": "REQUEST_WEIGHT",
        "interval": "MINUTE",
        "intervalNum": 1,
        "limit": 1200
}

So it means every IP is allowed to send 1200 Weight every minute.

1 Like

I do not agree. Binance’s API are not really well designed. For example: Try to load your trade history like it is shown at: https://www.binance.com/en/my/orders/convert/history

For the website it is easy. For the API it is simply not possible and people need to hack or use brute force.