Futures
get_future_exchanges Get a List of Future Exchanges
QuoteClient::get_future_exchange(SecType sec_type=SecType::FUT)
Description
Get a List of Supported Future Exchanges
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
sec_type | SecType | No | You can use the enums defined in include/tigerapi/enums.h SecType default: SecType::FUT |
Response
The Exchanges contains the following fields:
Field | Type | Description |
---|---|---|
code | str | Code of the exchange |
name | str | Name of the exchange |
zoneId | str | Time zone of the location of the exchange |
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_future_exchanges();
cout << result << endl;
return 0;
}
ResponseExample
[{"code":"CME","name":"CME","zoneId":"America/Chicago"},{"code":"NYMEX","name":"NYMEX","zoneId":"America/New_York"},
{"code":"COMEX","name":"COMEX","zoneId":"America/New_York"},{"code":"SGX","name":"SGX","zoneId":"Singapore"},
{"code":"HKEX","name":"HKEX","zoneId":"Asia/Hong_Kong"},{"code":"CBOT","name":"CBOT","zoneId":"America/Chicago"},
{"code":"CBOE","name":"CBOE","zoneId":"America/Chicago"},{"code":"OSE","name":"OSE","zoneId":"Asia/Tokyo"},
{"code":"CMEBTC","name":"CMEBTC","zoneId":"America/Chicago"},{"code":"TEST","name":"Test_Exchange","zoneId":"America/Chicago"},
{"code":"TEST2","name":"Test_Exchange_2","zoneId":"America/Chicago"},{"code":"TEST3","name":"Test_Exchange_3","zoneId":"America/Chicago"},
{"code":"CBOEXBT","name":"CBOEXBT","zoneId":"America/Chicago"},{"code":"EUREX","name":"EUREX","zoneId":"Europe/Berlin"},
{"code":"ICEUS","name":"ICE FUTURES US","zoneId":"American/Chicago"},{"code":"ICEEU","name":"ICE FUTURES EUROPE","zoneId":"American/NewYork"}]
get_future_contracts Get Contracts Available for Trade
QuoteClient::get_future_contracts(utility::string_t type)
Description
Get all contracts of a given future type, like 'CL'
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
type | utility::string_t | Yes | The contract code of the future contract, excluding month code. Example: CL, ES |
Response
The Contracts contains the following fields:
Field | Type | Description |
---|---|---|
continuous | bool | If the contract is continuous |
contractCode | string | Full contract code. e.g. VIX2208 |
contractMonth | string | Month of delivery, in month code. Example: 202208 - 2022/08 |
currency | string | Currency of the contract |
displayMultiplier | Display multiplier for price representation | |
exchange | string | Name of the exchange where the contract is traded. Example: NYMEX |
exchangeCode | string | Exchange code. Example: NYMEX |
firstNoticeDate | string | First notice date, the contract cannot be longed after the FND. Existing long positions will be closed out before the FND |
ibCode | string | ib symbol of the contract |
lastBiddingCloseTime | int | Last bidding time |
lastTradingDate | string | Last trading date |
minTick | float | Tick size |
multiplier | int | Multiplier of the contract |
name | string | name of the contract |
trade | bool | If the contract is still open for trading |
type | string | Contract code. Example: CL |
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
/**
* Use QuoteClient
*/
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_future_contracts("CL");
cout << result << endl;
return 0;
}
Response
[{"continuous":false,"contractCode":"CL2504","contractMonth":"202504","currency":"USD","displayMultiplier":1,"exchange":"NYMEX","exchangeCode":"NYMEX","firstNoticeDate":"20250324","ibCode":"CL","lastBiddingCloseTime":0,"lastTradingDate":"20250320","minTick":0.01,"multiplier":1000,"name":"WTI Crude Oil - Apr 2025","trade":true,"type":"CL"},
{"continuous":false,"contractCode":"CL2505","contractMonth":"202505","currency":"USD","displayMultiplier":1,"exchange":"NYMEX","exchangeCode":"NYMEX","firstNoticeDate":"20250424","ibCode":"CL","lastBiddingCloseTime":0,"lastTradingDate":"20250422","minTick":0.01,"multiplier":1000,"name":"WTI Crude Oil - May 2025","trade":true,"type":"CL"},
{"continuous":false,"contractCode":"CL2506","contractMonth":"202506","currency":"USD","displayMultiplier":1,"exchange":"NYMEX","exchangeCode":"NYMEX","firstNoticeDate":"20250522","ibCode":"CL","lastBiddingCloseTime":0,"lastTradingDate":"20250520","minTick":0.01,"multiplier":1000,"name":"WTI Crude Oil - Jun 2025","trade":true,"type":"CL"},
{"continuous":false,"contractCode":"CL2507","contractMonth":"202507","currency":"USD","displayMultiplier":1,"exchange":"NYMEX","exchangeCode":"NYMEX","firstNoticeDate":"20250624","ibCode":"CL","lastBiddingCloseTime":0,"lastTradingDate":"20250620","minTick":0.01,"multiplier":1000,"name":"WTI Crude Oil - Jul 2025","trade":true,"type":"CL"},
{"continuous":false,"contractCode":"CL2508","contractMonth":"202508","currency":"USD","displayMultiplier":1,"exchange":"NYMEX","exchangeCode":"NYMEX","firstNoticeDate":"20250724","ibCode":"CL","lastBiddingCloseTime":0,"lastTradingDate":"20250722","minTick":0.01,"multiplier":1000,"name":"WTI Crude Oil - Aug 2025","trade":true,"type":"CL"}]
get_future_contract_by_contract_code Get future contract by code
QuoteClient::get_future_contract_by_contract_code(utility::string_t contract_code)
Description
Get future contract by code
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
contract_code | string_t | Yes | future contract code, e.g. CL2206 |
Response
Parameter | Type | Description |
---|---|---|
continuous | bool | If the contract is continuous |
contractCode | string | Full contract code. e.g. VIX2208 |
contractMonth | string | Month of delivery, in month code. Example: 202208 - 2022/08 |
currency | string | Currency of the contract |
displayMultiplier | Display multiplier for price representation | |
exchange | string | Name of the exchange where the contract is traded. Example: NYMEX |
exchangeCode | string | Exchange code. Example: NYMEX |
firstNoticeDate | string | First notice date, the contract cannot be longed after the FND. Existing long positions will be closed out before the FND |
ibCode | string | ib symbol of the contract |
lastBiddingCloseTime | int | Last bidding time |
lastTradingDate | string | Last trading date |
minTick | float | Tick size |
multiplier | int | Multiplier of the contract |
name | string | name of the contract |
trade | bool | If the contract is still open for trading |
type | string | Contract code. Example: CL |
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
/**
* Use QuoteClient
*/
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_future_contract_by_contract_code("CL2504");
cout << result << endl;
return 0;
}
ResponseExample
{"continuous":false,"contractCode":"CL2504","contractMonth":"202504","currency":"USD","displayMultiplier":1,"exchange":"NYMEX",
"exchangeCode":"NYMEX","firstNoticeDate":"20250324","ibCode":"CL","lastBiddingCloseTime":0,"lastTradingDate":"20250320",
"minTick":0.01,"multiplier":1000,"name":"WTI Crude Oil - Apr 2025","trade":true,"type":"CL"}
get_future_contract_by_exchange_code Get future contract by exchange code
QuoteClient::get_future_contract_by_exchange_code(utility::string_t exchange_code)
Description
Get Contracts Available for Trade Listed in Certain Exchange
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
exchange_code | string_t | Yes | code of an exchange,e.g. 'NYMEX' |
Response
List of contracts
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_future_contract_by_exchange_code(U("NYMEX"));
cout << result << endl;
return 0;
}
ResponseExample
[{"continuous":false,"contractCode":"RB2509","contractMonth":"202509","currency":"USD","displayMultiplier":1,"exchange":"NYMEX","exchangeCode":"NYMEX","firstNoticeDate":"20250903","ibCode":"RB","lastBiddingCloseTime":0,"lastTradingDate":"20250829","minTick":0.0001,"multiplier":42000,"name":"RBOB Gasoline - Sep 2025","trade":true,"type":"RB"},
{"continuous":false,"contractCode":"RB2507","contractMonth":"202507","currency":"USD","displayMultiplier":1,"exchange":"NYMEX","exchangeCode":"NYMEX","firstNoticeDate":"20250702","ibCode":"RB","lastBiddingCloseTime":0,"lastTradingDate":"20250630","minTick":0.0001,"multiplier":42000,"name":"RBOB Gasoline - Jul 2025","trade":true,"type":"RB"},
{"continuous":false,"contractCode":"RB2505","contractMonth":"202505","currency":"USD","displayMultiplier":1,"exchange":"NYMEX","exchangeCode":"NYMEX","firstNoticeDate":"20250502","ibCode":"RB","lastBiddingCloseTime":0,"lastTradingDate":"20250430","minTick":0.0001,"multiplier":42000,"name":"RBOB Gasoline - May 2025","trade":true,"type":"RB"},
...]
get_current_future_contract Identify Front Month Contract
QuoteClient::get_future_current_contract(utility::string_t type)
Description
Identify the Front month contract of a given futures product
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
type | string_t | Yes | The trading variety corresponding to the futures contract, such as CL. |
Response
Structured as follows:
Column | Type | Description |
---|---|---|
continuous | bool | If the contract is continuous |
contractCode | string | Full contract code. e.g. VIX2208 |
contractMonth | string | Month of delivery, in month code. Example: 202208 - 2022/08 |
currency | string | Currency of the contract |
displayMultiplier | Display multiplier for price representation | |
exchange | string | Name of the exchange where the contract is traded. Example: NYMEX |
exchangeCode | string | Exchange code. Example: NYMEX |
firstNoticeDate | string | First notice date, the contract cannot be longed after the FND. Existing long positions will be closed out before the FND |
ibCode | string | ib symbol of the contract |
lastBiddingCloseTime | int | Last bidding time |
lastTradingDate | string | Last trading date |
minTick | float | Tick size |
multiplier | int | Multiplier of the contract |
name | string | name of the contract |
trade | bool | If the contract is still open for trading |
type | string | Contract code. Example: CL |
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
/**
* Use QuoteClient
*/
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_future_current_contract("CL");
cout << result << endl;
return 0;
}
ResponseExample
{"continuous":false,"contractCode":"CL2504","contractMonth":"202504","currency":"USD","displayMultiplier":1,"exchange":"NYMEX","exchangeCode":"NYMEX",
"firstNoticeDate":"20250324","ibCode":"CL","lastBiddingCloseTime":0,"lastTradingDate":"20250320","minTick":0.01,
"multiplier":1000,"name":"WTI Crude Oil - Apr 2025","trade":true,"type":"CL"}
get_future_continuous_contracts Get Future Continuous Contracts
QuoteClient::get_future_continuous_contracts(utility::string_t type)
Description
Get Future Continuous Contracts
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
type | string_t | Yes | Full contract trading type, Example: CL |
Response
The DataFrame contains the following fields:
Column | Type | Description |
---|---|---|
continuous | bool | If the contract is continuous |
contractCode | string | Full contract code. e.g. VIX2208 |
contractMonth | string | Month of delivery, in month code. Example: 202208 - 2022/08 |
currency | string | Currency of the contract |
displayMultiplier | Display multiplier for price representation | |
exchange | string | Name of the exchange where the contract is traded. Example: NYMEX |
exchangeCode | string | Exchange code. Example: NYMEX |
firstNoticeDate | string | First notice date, the contract cannot be longed after the FND. Existing long positions will be closed out before the FND |
ibCode | string | ib symbol of the contract |
lastBiddingCloseTime | int | Last bidding time |
lastTradingDate | string | Last trading date |
minTick | float | Tick size |
multiplier | int | Multiplier of the contract |
name | string | name of the contract |
trade | bool | If the contract is still open for trading |
type | string | Contract code. Example: CL |
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
/**
* Use QuoteClient
*/
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_future_continuous_contract("CL");
cout << result << endl;
return 0;
}
ResponseExample
{"continuous":false,"contractCode":"CLmain","contractMonth":"","currency":"USD","displayMultiplier":1,"exchange":"NYMEX",
"exchangeCode":"NYMEX","firstNoticeDate":"","ibCode":"CL","lastBiddingCloseTime":0,"lastTradingDate":"","minTick":0.01,
"multiplier":1000,"name":"WTI Crude Oil - main","trade":true,"type":"CL"}
get_future_trading_date Get Trading Times of a Future Contract
QuoteClient::get_future_trading_date(utility::string_t contract_code, utility::string_t trading_date)
Description
Get Trading Times of a Future Contract
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
contract_code | string_t | Yes | Contract code. Example CL1901 |
trading_date | string_t | Yes | Trading date. Example '2023-02-03' |
Response
Structured as follows:
Column | Type | Description |
---|---|---|
biddingTimes | int | end and start bidding times |
timeSection | utility::string_t | Time Zone |
tradingTimes | int | end and start trading times |
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
/**
* Use QuoteClient
*/
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_future_trading_date("CL2303", "2023-01-12");
cout << result << endl;
return 0;
}
ResponseExample
{
"biddingTimes":[
{
"end":1673391600000,
"start":1673390700000
}
],
"timeSection":"America/New_York",
"tradingTimes":[
{
"end":1673474400000,
"start":1673391600000
}
]
}
get_future_kline Get Futures Bars
value get_future_kline(value contract_codes, utility::string_t period=U("day"), time_t begin_time=-1, time_t end_time=-1,
int limit=251, utility::string_t page_token=U(""))
vector<Kline> get_future_kline(value contract_codes, BarPeriod period=BarPeriod::DAY, time_t begin_time=-1, time_t end_time=-1,
int limit=251, utility::string_t page_token=U(""));
Description
Get Futures Bars
It provides daily K-line data of popular contracts in the past 10 years, as well as minute-level data of all contracts from August 2017 to the present.
The Response result is a collection of data in reverse chronological order starting from endTime.
For the 1-minute K-line, if there is no transaction within this 1 minute, the K-line data of this minute will be blank; the interface can only pull the K-line data of this 1 minute after there is a transaction within the latest minute. The first transaction is generated at 50 seconds, and the latest data cannot be pulled before 50 seconds.
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameters | Type | Required | Description |
---|---|---|---|
contract_codes | list<string_t> | Yes | futures code name list |
period | string_t | No | The obtained K-line period. default: U("day") |
begin_time | time_t | No | Start time, query results include this time point default: -1 |
end_time | time_t | No | End time, the query result does not include this time point default: -1 |
limit | int | No | Request number limit, max:1000 default: 251 |
page_token | string_t | No | Paging token, which records the location of the paging. The next_page_token of the last request for Response can be passed in as the start flag of the next request. When using pageToken to pull data by paging, other query conditions cannot be changed default: U("") |
When begin_time and end_time both equals -1,Will return according to the number of items set by limit
Response
column | type | description |
---|---|---|
contract_code | utility::string_t | futures code name list |
close | float | close price |
high | float | high price |
last_time | int | Bar was last updated |
low | float | low price |
open | float | open price |
open_interest | int | open interest |
settlement | float | Settlement price at the last update time of Bar, Response 0 when no settlement price is generated |
time | int | The timestamp corresponding to the Bar, that is, the end time of the Bar. The cutting method of the bar is consistent with that of the exchange. Taking CN1901 as an example, the data from 17:00 on T day to 16:30 on T+1 day will be synthesized into a daily bar. |
volume | int | volume |
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
/**
* Use QuoteClient
*/
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value symbols = value::array();
symbols[0] = value::string("CL2303");
cout << "symbols " << symbols << endl;
value result = quote_client->get_future_kline(symbols);
cout << result << endl;
return 0;
}
** ResponseExample **
{
"contractCode": "CL2303"
"items": [
{
"close": 76.049999999999997
"high": 77.510000000000005,
"lastTime": 1677007775000,
"low": 75.689999999999998,
"open": 76.530000000000001,
"openInterest": 2638,
"settlement": 76.159999999999997,
"time": 1677016800000,
"volume": 8733
},
{
"close": 76.329999999999998
"high": 78.25,
"lastTime": 1676671155000,
"low": 75.060000000000002,
"open": 78.069999999999993,
"openInterest": 29064,
"settlement": 76.340000000000003,
"time": 1676671200000,
"volume": 32840
}
]
}
get_future_tick Get Futures Trade Ticks
QuoteClient::get_future_tick(utility::string_t contract_code, long begin_index=0, long end_index=100, int limit=1000)
Description
Get Futures Trade ticks
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameters | Type | Required | Description |
---|---|---|---|
contract_code | string_t | Yes | future code name |
begin_index | int | No | start index default: 0 |
end_index | int | No | end index default: 100 |
limit | int | No | Response limit count,max support is : 1000 default: 1000 |
Response
Parameters | Type | Description |
---|---|---|
contractCode | utility::string_t | future code name |
index | int | tick index |
price | float | tick price |
time | int | timestamp tick time |
volume | int | tick volume |
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
/**
* Use QuoteClient
*/
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_future_tick("CL2504");
cout << result << endl;
return 0;
}
** ResponseExample **
{
"contractCode": "CL2504"
"items": [
{
"index": 0,
"price": 66.780000000000001,
"time": 1741903200000,
"volume": 3
},
{
"index": 1,
"price": 66.819999999999993,
"time": 1741903200000,
"volume": 1
},
{
"index": 2,
"price": 66.780000000000001,
"time": 1741903200000,
"volume": 1
},
{
"index": 3,
"price": 66.769999999999996,
"time": 1741903200000,
"volume": 1
},
{
"index": 4,
"price": 66.780000000000001,
"time": 1741903200000,
"volume": 1
}
]
}
get_future_real_time_quote_value Get The Latest Futures Quotes
QuoteClient::get_future_real_time_quote_value(value contract_codes)
Description
Get the latest futures quotes, Including ask-bid data, latest transaction data, etc.
Frequency Limit
Please see:Rate Limit for details
Parameters
Parameters | Type | Required | Description |
---|---|---|---|
contract_codes | list<str> | Yes | future codes,such as ['CL2201'] |
Response
column | type | description |
---|---|---|
ask_price | float | ask price |
bid_price | float | bid price |
bid_size | int | bid size |
contractCode | string | futures code name |
high | float | high |
latest_price | float | latest price |
latest_size | int | latest size |
latest_time | int | latest time |
limit_down | float | limit down price |
limit_up | float | limit up price |
low | float | low |
open | float | open |
open_interest | int | open interest |
settlement | float | settlement amount |
volume | int | accumulated volume |
Example
#include "tigerapi/quote_client.h"
using namespace std;
using namespace web;
using namespace web::json;
using namespace TIGER_API;
int main(int argc, char *args[]) {
/************************** set config **********************/
ClientConfig config = ClientConfig(true);
config.private_key = "-----BEGIN RSA PRIVATE KEY-----\n"
"xxxxxx private key xxxxxxxx"
"-----END RSA PRIVATE KEY-----";
config.tiger_id = "Tiger ID";
config.account = "Account ID";
/**
* Use QuoteClient
*/
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_future_real_time_quote_value(symbols); //result is value
// auto result = quote_client->get_future_real_time_quote(symbols); //result is vector<RealtimeQuote>
cout << result << endl;
return 0;
}
Response
{
"askPrice":67.049999999999997,
"askSize":6,
"bidPrice":67.040000000000006,
"bidSize":4,
"contractCode":"CL2504",
"high":67.140000000000001,
"latestPrice":67.040000000000006,
"latestSize":1,
"latestTime":1741922888000,
"limitDown":0,
"limitUp":0,
"low":66.670000000000002,
"open":66.780000000000001,
"openInterest":134432,
"settlement":66.549999999999997,
"volume":8652
}