Closed sheungon closed 1 year ago
I think this PR is confusing the two Bybit rate limits.
X-Bapi-Limit-Reset-Timestamp
.This PR seems to want to detect 403, and then parse for X-Bapi-Limit-Reset-Timestamp
, although that is not possible.
Let me know if I am misunderstanding something...
Let me know if I am misunderstanding something...
Correct. That's what I'm trying to do.
From Bybit document,
X-Bapi-Limit-Reset-Timestamp - the timestamp indicating when your request limit resets if you have exceeded your rate_limit. Otherwise, this is just the current timestamp.
Ref, https://bybit-exchange.github.io/docs/v5/rate-limit
From this, I thought the "reset timestamp" will be a meaningful value only when rate limit exceeded. And for "rate limit exceeded", I thought that was 403 error. Looks like I misunderstood again ;D
So, "Rate Limit exceeded" != "IP banned"
In this case, all I need will be the response headers (for rate limit reached) then. Let me create another PR for this.
Return "rate_limit_reset_timestamp" on 403 breached IP rate limit. Return response headers on FailedRequestError.