Binance: Fix Request Rate Limits (#483)

Request types / variations contribute different weights towards the limit
 Binance enforces. These can be considerably more than 1 per request,
 which results in the server side limits being hit, producing 429 and 418
 responses and bans
This commit is contained in:
David Ackroyd
2020-04-20 22:57:28 +10:00
committed by GitHub
parent c0d2ac5e51
commit 342b2680d1
5 changed files with 179 additions and 32 deletions

View File

@@ -160,7 +160,7 @@ func (r *Requester) doRequest(req *http.Request, p *Item) error {
if resp.StatusCode < http.StatusOK ||
resp.StatusCode > http.StatusAccepted {
return fmt.Errorf("%s unsuccessful HTTP status code: %d raw response: %s",
return fmt.Errorf("%s unsuccessful HTTP status code: %d raw response: %s",
r.Name,
resp.StatusCode,
string(contents))