![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
A Kiwoom REST access token (au10001's token) and its expiry (expires_dt). More...
#include <algotradelib/src/brokers/kiwoom/config.hpp>
Public Member Functions | |
| void | from_json_impl (const json::object &doc) |
| Reads the expiry (expires_dt, the only one Kiwoom states) and token_type; called by from_json. A response with no readable expiry makes from_json throw. | |
| Public Member Functions inherited from algotradelib::network::AuthBody< KiwoomRest > | |
| void | from_json (const json::object &document) |
| Reads a token response. | |
| bool | valid (std::chrono::seconds margin=std::chrono::minutes(5)) const noexcept |
| Tests whether the token is set and stays valid for at least a margin. | |
Static Public Member Functions | |
| static constexpr std::string_view | token_field () noexcept |
| The field Kiwoom returns the bearer token under. | |
Public Attributes | |
| std::string | token_type_ |
| Kiwoom's token_type (bearer in its example). | |
| Public Attributes inherited from algotradelib::network::AuthBody< KiwoomRest > | |
| std::string | access_token_ |
| The bearer token; do not log it. | |
| std::chrono::system_clock::time_point | expires_at_ |
| When the token expires. | |
A Kiwoom REST access token (au10001's token) and its expiry (expires_dt).
Definition at line 354 of file config.hpp.
|
inline |
Reads the expiry (expires_dt, the only one Kiwoom states) and token_type; called by from_json. A response with no readable expiry makes from_json throw.
| doc | The response. |
Definition at line 369 of file config.hpp.
|
inlinestaticconstexprnoexcept |
The field Kiwoom returns the bearer token under.
Definition at line 362 of file config.hpp.
| std::string algotradelib::kiwoom::KiwoomRest::token_type_ |
Kiwoom's token_type (bearer in its example).
Definition at line 356 of file config.hpp.
Referenced by from_json_impl().