When calling the
/sapi/v1/accountSnapshot endpoint more than 5 times in a minute I get a 429 response. I am using a library that will automatically back off for the number of seconds that the “Retry-After” header specifies. However, the header that arrives with the 429 response contains “0”, so the library waits zero seconds before trying again. I’ve worked around this by telling the library to ignore the header and back off by a hard coded number of seconds. I’ve also manually implemented rate limiting of 5 calls a minute for this endpoint.
The documentation at https://binance-docs.github.io/apidocs/spot/en/#limits says
A Retry-After header is sent with a 418 or 429 responses and will give the number of seconds required to wait, in the case of a 429, to prevent a ban, or, in the case of a 418, until the ban is over.
Does anyone know if these 0s are intended behaviour? It makes the “Retry-After” header pretty useless.
Additionally the documentation for this endpoint at https://binance-docs.github.io/apidocs/spot/en/#daily-account-snapshot-user_data specifies the weight as 1, but only 5 calls per minute appear to be allowed. A header called “X-SAPI-USED-IP-WEIGHT-1M” appears in the response which increases by 2400 every time I make the call, but I cannot find any mention of this header in the documentation or what limits there might be on it. Can anyone point me towards documentation for this limit?
Thanks in advance