I can`t understand binance API limits about request weight

Hi,

I am programming using python-binance. In the meantime, I’m asking because I don’t understand binance’s api regulation. Please help me.
The functions I will mainly use are as follows, and I concluded as follows by referring to the doc of Binance and doc of Python-binance.

====================================================================================

  1. weight : 2 | client.get_historical_klines_generator() | GET /api/v3/klines

  2. weight : 1 | client.futures_get_open_orders() | GET /fapi/v1/openOrders

  3. weight : 5 | client.futures_account_balance() | GET /fapi/v2/balance

  4. weight : 5 | client.futures_position_information() | GET /fapi/v2/positionRisk

  5. weight : 1 | client.futures_change_leverage() | POST /fapi/v1/leverage

  6. weight : 1 | client.futures_symbol_ticker() | GET /fapi/v1/ticker/price

  7. weight : 0 | client.futures_create_order() | POST /fapi/v1/order

  8. weight : 1 | client.futures_cancel_all_open_orders() | DELETE /fapi/v1/allOpenOrders

====================================================================================

[endpoint IP limits]

  • Each endpoint with IP limits has an independent weight of 12,000 per minute limit.

[binance hard-limits]

  • 6,000 request weight per minute (keep in mind that this is not necessarily the same as 6,000 requests)
  • 50 orders per 10 seconds
  • 160,000 orders per 24 hours

====================================================================================

my question is,

  1. Can I get the following results when I execute each command(1~8) once?
    => requests = 8, but weights = 16

  2. If question 1 is correct, do I have to calculate all requests by thinking that they are 16 instead of 8?

  3. Is the “6,000 request weight per minute limit of binance hard-limits” corresponding to the UID(accounts limit), and is the “12,000 per minute limit” corresponding to the IP limit?

  4. [50 orders per 10 seconds, 160,000 orders per 24 hours] these limits only apply when i execute above command 7? Doesn’t the other command apply?

====================================================================================

Thank you for reading the long text. Due to an API issue, I can’t proceed to the next step. I would really appreciate it if you could help me.

Futures has the IP request limits of 2400 per minute. You can get the details from endpoint /fapi/v1/exchangeInfo.

Every request will contain X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter) in the response headers which has the current used weight for the IP for all request rate limiters defined.

The response header is helpful to identify the usage. Please feel free to check the details from API

https://binance-docs.github.io/apidocs/futures/en/#general-api-information

Thank you for your answer.

There are two types of ‘rateLimitType’ (‘REQUEST_WEIGHT’ AND ‘ORDERS’)
If i use endpoint /fapi/v2/positionRisk, According to the document, I am assigned a weight of 5.
So is this weight 5 assigned to both(‘REQUEST_WEIGHT’ AND ‘ORDERS’) or just one (‘REQUEST_WEIGHT’)