algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::network::RateLimitBudget Struct Reference

The request rate a connection may use. More...

#include <algotradelib/src/network/rate_limit.hpp>

Public Attributes

int burst_ {8}
 How many requests may be sent back to back after an idle period; at least 1.
int per_second_ {8}
 The sustained rate, in requests per second; at least 1.
int trading_reserve_ {2}
 The part of burst_ only AUTH and TRADING requests may use, so polling cannot use up the capacity an order needs (a request already on the wire still goes first); zero disables the reservation.

Detailed Description

The request rate a connection may use.

The defaults are a starting point, not a safe figure: a broker's real limit may be lower. KIS states no per-key figure; on one account, eight a second was too many for its holiday calendar, and a demo account refused reads less than about a second apart. The examples pace KIS at one a second.

Definition at line 119 of file rate_limit.hpp.

Member Data Documentation

◆ burst_

int algotradelib::network::RateLimitBudget::burst_ {8}

How many requests may be sent back to back after an idle period; at least 1.

Definition at line 121 of file rate_limit.hpp.

◆ per_second_

int algotradelib::network::RateLimitBudget::per_second_ {8}

The sustained rate, in requests per second; at least 1.

Definition at line 123 of file rate_limit.hpp.

◆ trading_reserve_

int algotradelib::network::RateLimitBudget::trading_reserve_ {2}

The part of burst_ only AUTH and TRADING requests may use, so polling cannot use up the capacity an order needs (a request already on the wire still goes first); zero disables the reservation.

Definition at line 129 of file rate_limit.hpp.


The documentation for this struct was generated from the following file: