|
kalshi-cpp 0.6.2
C++23 client for Kalshi's Predictions API
|
Defaults match Kalshi's Basic tier. More...
#include <kalshi/rate_limit.hpp>
Public Attributes | |
| TokenBucket::Config | read {.capacity = 600.0, .refill_per_second = 200.0, .initial_tokens = {}} |
| TokenBucket::Config | write {.capacity = 100.0, .refill_per_second = 100.0, .initial_tokens = {}} |
| double | default_cost {10.0} |
| Cost of requests without a matching rule. Kalshi's default is 10. | |
| std::vector< EndpointCostRule > | costs |
| std::chrono::milliseconds | max_wait {std::chrono::seconds{5}} |
| Longest wait for tokens before failing with ErrorCode::RateLimited. | |
Defaults match Kalshi's Basic tier.
Use rate_limit_config() for your account's actual budgets.
| TokenBucket::Config kalshi::RateLimitConfig::read {.capacity = 600.0, .refill_per_second = 200.0, .initial_tokens = {}} |
| TokenBucket::Config kalshi::RateLimitConfig::write {.capacity = 100.0, .refill_per_second = 100.0, .initial_tokens = {}} |
| double kalshi::RateLimitConfig::default_cost {10.0} |
Cost of requests without a matching rule. Kalshi's default is 10.
| std::vector<EndpointCostRule> kalshi::RateLimitConfig::costs |
| std::chrono::milliseconds kalshi::RateLimitConfig::max_wait {std::chrono::seconds{5}} |
Longest wait for tokens before failing with ErrorCode::RateLimited.
A request that costs more than its bucket holds fails with InvalidRequest, because Kalshi rejects it too; split large batches.