![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
A KIS account: the account number and product code every account request names. More...
#include <algotradelib/src/brokers/kis/client.hpp>
Public Member Functions | |
| void | from_env () |
| Loads the account from the KIS_CANO and (optional, default "01") KIS_ACNT_PRDT_CD environment variables. | |
| void | from_json (const std::string &filename) |
| Loads the account from a credential file's account_number (eight digits) and account_product_code (two digits, "01" if absent), both strings. | |
Public Attributes | |
| std::string | account_number_ |
| The eight-digit account number (KIS's CANO). | |
| std::string | product_code_ |
| The two-digit product code (KIS's ACNT_PRDT_CD); "01" for a cash equity account. | |
A KIS account: the account number and product code every account request names.
Definition at line 29 of file client.hpp.
|
inline |
Loads the account from the KIS_CANO and (optional, default "01") KIS_ACNT_PRDT_CD environment variables.
| std::runtime_error | if KIS_CANO is not set. |
Definition at line 40 of file client.hpp.
Referenced by kis_credentials::load().
|
inline |
Loads the account from a credential file's account_number (eight digits) and account_product_code (two digits, "01" if absent), both strings.
The same file KisConfig::from_json reads. Error messages name the file and field, never a value.
| filename | The file. |
| std::runtime_error | if the file cannot be read or parsed, account_number is missing, or a field is not a string of the right number of digits. |
Definition at line 61 of file client.hpp.
Referenced by kis_credentials::load().
| std::string algotradelib::kis::KisAccount::account_number_ |
The eight-digit account number (KIS's CANO).
Definition at line 31 of file client.hpp.
Referenced by from_env(), and from_json().
| std::string algotradelib::kis::KisAccount::product_code_ |
The two-digit product code (KIS's ACNT_PRDT_CD); "01" for a cash equity account.
Definition at line 33 of file client.hpp.
Referenced by from_env(), and from_json().