Hey, I’m implementing the way to handle API request limits to respect current limits and found quite strange behavior. As stated in docs:
The limits on the API are based on the IPs, not the API keys.
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.
Later I tried 2 different accounts on exchange and repeat the experiment. And the X-Mbx-Used-Weight header definitely send data per API key base. As a result for 4 request looks like:
Proxy #1 Api Key #1
X-Mbx-Used-Weight [10]
Proxy #2 Api Key #2
X-Mbx-Used-Weight [10]
Proxy #2 Api Key #1
X-Mbx-Used-Weight [20]
Proxy #1 Api Key #2
X-Mbx-Used-Weight [20]
I tried the other way. Using my local machine and server to start requesting same api key at same time. The X-Mbx-Used-Weight grow together. Something misleading in API docs or broken.