According to the binance docs [1] every rest api request contains a X-MBX-USED-WEIGHT header which has the current used weight for the IP for the current minute. How do we access the header(s) via python-binance?
[1] https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#LIMITS
class MyClient(Client):
def _handle_response(self,response):
self.last_weight = response.headers.get('X-MBX-USED-WEIGHT',self.last_weight)
return super()._handle_response(response)
Hi @ep7aePei if you install v0.7.4 you now have access to the requests response object after a request.
Simple example
client = Client()
client.get_exchange_info()
print(client.response.headers)
Most helpful comment
Hi @ep7aePei if you install v0.7.4 you now have access to the requests response object after a request.
Simple example