Configuration
Before using OpenAPI, you will need to configure the API interface call. Specific configuration information (tigerId, account, license, privateKey, and other configurations) can be found on the developer information page.
ClientConfig config = ClientConfig(true);
/* Actually at this time sandbox environment is not supported
so ClientConfig config = ClientConfig(false);
you can get configs from our Developer Info Page:
https://developer.tradeup.com/profile
download tiger_openapi_config.properties and copy it to the project directory
then set: ClientConfig config(false, U("tiger_openapi_config.properties"))
instead of declaring "config" locally.
*/
config.private_key = "your private key"
"xxxxxx your private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "tiger id which can be found in Developer Info Page";
config.account = "tiger trading account id which can be found in Developer Info Page";
config.license = "your license";
/**
* Use the encapsulated quotation interface QuoteClient
*/
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_quote_permission();
cout << result << endl;Updated 1 day ago
Did this page help you?