#include <kalshi/retry.hpp>
◆ initial_delay
| std::chrono::milliseconds kalshi::RetryPolicy::initial_delay {100} |
◆ max_delay
| std::chrono::milliseconds kalshi::RetryPolicy::max_delay {std::chrono::seconds{10}} |
◆ backoff_multiplier
| double kalshi::RetryPolicy::backoff_multiplier {2.0} |
◆ jitter_factor
| double kalshi::RetryPolicy::jitter_factor {0.1} |
Random spread applied to each delay, as a fraction of it. 0 disables jitter.
◆ max_attempts
| std::uint8_t kalshi::RetryPolicy::max_attempts {3} |
Total attempts, including the first.
◆ retry_on_network_error
| bool kalshi::RetryPolicy::retry_on_network_error {true} |
◆ retry_on_rate_limit
| bool kalshi::RetryPolicy::retry_on_rate_limit {true} |
◆ retry_on_server_error
| bool kalshi::RetryPolicy::retry_on_server_error {true} |
◆ retry_writes
| bool kalshi::RetryPolicy::retry_writes {false} |
Also retry POST, PUT, and DELETE after network errors and 5xx responses.
Off by default: the first attempt may have taken effect (an order placed, a quote accepted, an order canceled), and a repeat would then double it or fail misleadingly. A 429 always retries because the server rejected the request without acting on it.
The documentation for this struct was generated from the following file: