#include <config.hpp>
|
| Config () |
|
| Config (lb_config_t *config) |
|
| Config (const Config &)=delete |
|
| Config (Config &&other) |
|
| Config (const std::string &app_key, const std::string &app_secret, const std::string &access_token, const std::optional< std::string > &http_url, const std::optional< std::string > "e_ws_url, const std::optional< std::string > &trade_ws_url, const std::optional< Language > &language, bool enable_overnight, const std::optional< PushCandlestickMode > &push_candlestick_mode) |
|
| Config (const std::string &app_key, const std::string &app_secret, const std::string &access_token) |
|
| ~Config () |
|
| operator const lb_config_t * () const |
|
void | refresh_access_token (int64_t expired_at, AsyncCallback< void *, std::string > callback) |
| Gets a new access_token More...
|
|
◆ Config() [1/6]
longport::Config::Config |
( |
| ) |
|
◆ Config() [2/6]
◆ Config() [3/6]
longport::Config::Config |
( |
const Config & |
| ) |
|
|
delete |
◆ Config() [4/6]
longport::Config::Config |
( |
Config && |
other | ) |
|
◆ Config() [5/6]
longport::Config::Config |
( |
const std::string & |
app_key, |
|
|
const std::string & |
app_secret, |
|
|
const std::string & |
access_token, |
|
|
const std::optional< std::string > & |
http_url, |
|
|
const std::optional< std::string > & |
quote_ws_url, |
|
|
const std::optional< std::string > & |
trade_ws_url, |
|
|
const std::optional< Language > & |
language, |
|
|
bool |
enable_overnight, |
|
|
const std::optional< PushCandlestickMode > & |
push_candlestick_mode |
|
) |
| |
Config
- Parameters
-
app_key | App key |
app_secret | App secret |
access_token | Access token |
http_url | HTTP endpoint url (Default: https://openapi.portbridgeapp.com) |
quote_ws_url | Quote websocket endpoint url (Default: wss://openapi-quote.longportapp.com/v2) |
trade_ws_url | Trade websocket endpoint url (Default: wss://openapi-trade.longportapp.com/v2) |
language | Language identifer (Default: Language::EN) |
push_candlestick_mode | Push candlestick mode (Default: PushCandlestickMode::Realtime) |
◆ Config() [6/6]
longport::Config::Config |
( |
const std::string & |
app_key, |
|
|
const std::string & |
app_secret, |
|
|
const std::string & |
access_token |
|
) |
| |
|
inline |
Config
- Parameters
-
app_key | App key |
app_secret | App secret |
access_token | Access token |
◆ ~Config()
longport::Config::~Config |
( |
| ) |
|
◆ from_env()
Create a new Config
from the given environment variables
It first gets the environment variables from the .env
file in the current directory.
Variables
LONGPORT_APP_KEY
- App key
LONGPORT_APP_SECRET
- App secret
LONGPORT_ACCESS_TOKEN
- Access token
LONGPORT_HTTP_URL
- HTTP endpoint url (Default: https://openapi.longportapp.com
)
LONGPORT_QUOTE_WS_URL
- Quote websocket endpoint url (Default: wss://openapi-quote.longportapp.com/v2
)
LONGPORT_TRADE_WS_URL
- Trade websocket endpoint url (Default: wss://openapi-trade.longportapp.com/v2
)
LONGPORT_ENABLE_OVERNIGHT
- Enable overnight quote, true
or false
(Default: false
)
LONGPORT_PUSH_CANDLESTICK_MODE
- realtime
or confirmed
(Default: realtime
)
◆ operator const lb_config_t *()
longport::Config::operator const lb_config_t * |
( |
| ) |
const |
◆ refresh_access_token()
void longport::Config::refresh_access_token |
( |
int64_t |
expired_at, |
|
|
AsyncCallback< void *, std::string > |
callback |
|
) |
| |
The documentation for this class was generated from the following file: