-
Notifications
You must be signed in to change notification settings - Fork 13
Implement rate limiting #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
+1 i need this |
+1 same here, a welcome feature to help control API usage. |
Why is this still open? Is the Bitvavo developers team really small? |
foreach ($header as $h) { | ||
if (preg_match('/^bitvavo-ratelimit-(limit|remaining|resetat): +(\d+)$/', $h, $match)) { | ||
list(, $key, $value) = $match; | ||
$this->ratelimit[$key] = (int) $value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very usefull.
One small bugfix for this PR on 32 bit systems.
Casting the resetat key to int will result in a max value of an int32: 2147483647
Casting to a float resolves this problem.
$this->ratelimit[$key] = (float)$value;
Kudos, SonarCloud Quality Gate passed! |
1 similar comment
Kudos, SonarCloud Quality Gate passed! |
Is this still not implemented? |
Nope, sadly not |
$bitvavo
object