Securities
Get Market Status
This page also covers these implemented raw JSON/object overloads:
value QuoteClient::get_quote_stock_trade(const value &symbols)
value QuoteClient::get_quote_real_time_value(const value &symbols)
value QuoteClient::get_quote_delay(const value &symbols)
value QuoteClient::get_quote_shortable_stocks(const value &symbols)Each requires a JSON string array named symbols and returns web::json::value. See get_quote_real_time on this page for the typed overload. Permissions, batch limits, and frequency follow the corresponding stock quote endpoint.
auto trades = quote_client.get_quote_stock_trade(symbols);
auto raw_quotes = quote_client.get_quote_real_time_value(symbols);
auto delayed = quote_client.get_quote_delay(symbols);
auto shortable = quote_client.get_quote_shortable_stocks(symbols);Response provenance: these raw JSON overloads have no fixed SDK response model or verified fixture. Runtime server fields are authoritative.
value QuoteClient::get_market_state(utility::string_t market)
Description
Returns the market name, current status (such as pre-market, trading, or closed), and most recent trading time for a specified market.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| market | utility::string_t | Yes | Market, e.g., U("US"), U("HK"), U("CN") |
Return
web::json::value JSON object
Example
#include "tigerapi/quote_client.h"
#include "tigerapi/client_config.h"
using namespace TIGER_API;
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value result = quote_client.get_market_state(U("US"));
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"market": "US",
"marketStatus": "Pre-Mkt",
"status": "PRE_HOUR_TRADING",
"openTime": "08-03 09:30:00 EDT"
}
]
}Get a Trading Calendar
value QuoteClient::get_trading_calendar(Market market, utility::string_t begin_date, utility::string_t end_date)
Description
Returns the trading calendar for a specified market.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| market | Market or utility::string_t | Yes | Market, e.g., Market::US or U("US") |
| begin_date | utility::string_t | Yes | Start date, format "yyyy-MM-dd", e.g., U("2024-01-01") |
| end_date | utility::string_t | Yes | End date, format "yyyy-MM-dd", e.g., U("2024-12-31") |
Return
web::json::value JSON object
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value result = quote_client.get_trading_calendar(Market::US, U("2024-01-01"), U("2024-06-30"));
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{"date": "2025-07-28", "type": "TRADING"},
{"date": "2025-07-29", "type": "TRADING"}
]
}Get Symbols
value QuoteClient::get_symbols(Market market = Market::ALL, bool include_otc = false)
Description
Returns all symbols for a specified market.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| market | Market | No | Market enum, Market::US / Market::HK / Market::ALL, default Market::ALL |
| include_otc | bool | No | Include OTC symbols; default false |
Return
A web::json::value JSON array containing symbols.
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value result = quote_client.get_symbols(Market::US);
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": ["A", "AA", "AAL", "AAPL", "ABBV", "ABC", "ABNB"]
}Get Symbol Names
value QuoteClient::get_all_symbol_names(Market market = Market::ALL, bool include_otc = false)
Description
Returns all symbols and names for a specified market.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| market | Market | No | Market enum, Market::US / Market::HK / Market::ALL, default Market::ALL |
| include_otc | bool | No | Include OTC symbols; default false |
Return
web::json::value JSON array
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value result = quote_client.get_all_symbol_names(Market::HK);
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{"symbol": "00001", "name": "CKH Holdings"},
{"symbol": "00700", "name": "TENCENT"}
]
}Get Stock Quote Snapshots
value QuoteClient::get_brief(const value &symbols, bool include_hour_trading, bool include_ask_bid, QuoteRight right)
Description
Returns real-time stock quote snapshots, including the latest, opening, high, and low prices.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Array of up to 100 symbols, for example value::array({value::string(U("AAPL"))}) |
| include_hour_trading | bool | No | Include pre-market and after-hours data; default false |
| include_ask_bid | bool | No | Include bid and ask data; default false |
| right | QuoteRight | No | Adjustment type, QuoteRight::br (forward adjusted) or QuoteRight::nr (unadjusted), default br |
Return
web::json::value JSON object
Example
#include "tigerapi/quote_client.h"
#include "tigerapi/client_config.h"
using namespace TIGER_API;
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value symbols = value::array();
symbols[0] = value::string(U("AAPL"));
symbols[1] = value::string(U("TSLA"));
value result = quote_client.get_brief(symbols);
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"symbol": "AAPL",
"open": 304.81,
"high": 310.69,
"low": 300.0,
"close": 308.91,
"preClose": 333.43,
"latestPrice": 308.91,
"latestTime": 1785528000000,
"askPrice": 310.97,
"askSize": 400,
"bidPrice": 310.89,
"bidSize": 80,
"volume": 176739024,
"status": "NORMAL"
}
]
}Get Intraday Data
value QuoteClient::get_timeline(const value &symbols, bool include_hour_trading, time_t begin_time)
Description
Returns intraday data for the current day.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Array of up to 50 symbols |
| include_hour_trading | bool | No | Include pre-market and after-hours data; default false |
| begin_time | time_t | No | Start timestamp (milliseconds), default -1 |
Return
web::json::value JSON object
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value symbols = value::array();
symbols[0] = value::string(U("AAPL"));
value result = quote_client.get_timeline(symbols);
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"symbol": "AAPL",
"period": "day",
"preClose": 333.43,
"intraday": {
"items": [
{"time": 1785441000000, "price": 304.81, "avgPrice": 304.81, "volume": 1523400},
{"time": 1785441060000, "price": 305.12, "avgPrice": 304.96, "volume": 892100}
]
}
}
]
}Get Historical Intraday Data
value QuoteClient::get_history_timeline(const value &symbols, utility::string_t date, QuoteRight right)
Description
Returns historical intraday data for a specified date.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Array of up to 50 symbols |
| date | utility::string_t | Yes | Date, format "yyyy-MM-dd", e.g., U("2024-01-15") |
| right | QuoteRight | No | Adjustment type, default QuoteRight::br |
Return
web::json::value JSON object
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"symbol": "AAPL",
"items": [
{"time": 1785355800000, "price": 310.50, "avgPrice": 310.50, "volume": 1245600},
{"time": 1785355860000, "price": 310.80, "avgPrice": 310.65, "volume": 534200}
]
}
]
}Get Stock Bars
value QuoteClient::get_kline(const value &symbols, BarPeriod period, time_t begin_time, time_t end_time, QuoteRight right, int limit, utility::string_t page_token)
Description
Returns daily, weekly, monthly, or minute-level candlestick bars (K-line data) for stocks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Array of up to 50 symbols |
| period | BarPeriod or utility::string_t | No | Bar period, for example BarPeriod::DAY or U("day"); default DAY. Available values: day/week/month/year/1min/3min/5min/10min/15min/30min/45min/60min/2hour/3hours/4hour/6hour |
| begin_time | time_t | No | Start Unix timestamp in milliseconds, default -1 |
| end_time | time_t | No | End Unix timestamp in milliseconds, default -1 |
| right | QuoteRight or utility::string_t | No | Adjustment type, default QuoteRight::br or U("br") |
| limit | int | No | Maximum number of records to return, default 251 |
| page_token | utility::string_t | No | Pagination token, default empty |
Return
A web::json::value JSON object or a vector<Kline> list of bar objects, depending on the overload.
Kline Object Properties
| Property | Type | Description |
|---|---|---|
| symbol | utility::string_t | Symbol |
| period | utility::string_t | Bar period |
| items | vector<KlineItem> | Bars |
KlineItem Object Properties
| Property | Type | Description |
|---|---|---|
| open | double | Open price |
| high | double | High price |
| low | double | Low price |
| close | double | Close price |
| volume | long long | Volume |
| time | time_t | Timestamp |
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value symbols = value::array();
symbols[0] = value::string(U("AAPL"));
// Get daily K-line (returns JSON)
value result = quote_client.get_kline(symbols, BarPeriod::DAY);
ucout << result.serialize() << std::endl;
// Get daily K-line (returns Kline object list)
vector<Kline> klines = quote_client.get_kline(symbols, U("day"));
for (auto& kline : klines) {
for (auto& item : kline.items) {
std::cout << "Time: " << item.time << " Close: " << item.close << std::endl;
}
}Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"symbol": "AAPL",
"period": "day",
"nextPageToken": null,
"items": [
{"time": 1785355200000, "open": 310.50, "high": 315.20, "low": 308.00, "close": 312.45, "volume": 58234100, "amount": 18156789012.50},
{"time": 1785441600000, "open": 312.00, "high": 314.80, "low": 300.00, "close": 308.91, "volume": 176739024, "amount": 53821456789.00}
]
}
]
}Get Real-Time Stock Quotes
vector<RealtimeQuote> QuoteClient::get_quote_real_time(const value &symbols)Description
Returns real-time stock quotes as a list of RealtimeQuote objects.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Array of up to 50 symbols |
Return
A vector<RealtimeQuote> list of real-time quote objects.
RealtimeQuote Object Properties
| Property | Type | Description |
|---|---|---|
| symbol | utility::string_t | Symbol |
| open | double | Open price |
| high | double | High price |
| low | double | Low price |
| close | double | Close price |
| pre_close | double | Previous close price |
| latest_price | double | Latest price |
| latest_time | time_t | Latest trade time |
| volume | long long | Volume |
| ask_price | double | Ask price |
| ask_size | double | Ask size |
| bid_price | double | Bid price |
| bid_size | double | Bid size |
| status | utility::string_t | Market status |
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value symbols = value::array();
symbols[0] = value::string(U("AAPL"));
symbols[1] = value::string(U("TSLA"));
vector<RealtimeQuote> quotes = quote_client.get_quote_real_time(symbols);
for (auto& q : quotes) {
ucout << q.symbol << U(" latest_price: ") << q.latest_price << std::endl;
}Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"symbol": "AAPL",
"open": 304.81,
"high": 310.69,
"low": 300.0,
"close": 308.91,
"preClose": 333.43,
"latestPrice": 308.91,
"latestTime": 1785528000000,
"askPrice": 310.97,
"askSize": 400,
"bidPrice": 310.89,
"bidSize": 80,
"volume": 176739024,
"status": "NORMAL"
}
]
}Get Stock Trade Ticks
value QuoteClient::get_trade_tick(const value &symbols, TradingSession trade_session, long begin_index, long end_index, int limit)
Description
Returns tick-by-tick trades for stocks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Array of up to 50 symbols |
| trade_session | TradingSession or utility::string_t | No | Trading session, default TradingSession::Regular |
| begin_index | long | No | Start index, default -1 |
| end_index | long | No | End index, default -1 |
| limit | int | No | Maximum number of records, default 100 |
Return
web::json::value JSON object
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value symbols = value::array();
symbols[0] = value::string(U("AAPL"));
value result = quote_client.get_trade_tick(symbols);
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"symbol": "AAPL",
"beginIndex": 523400,
"endIndex": 523402,
"items": [
{"time": 1785527980000, "price": 308.90, "volume": 150, "type": "+"},
{"time": 1785527980005, "price": 308.91, "volume": 200, "type": "-"}
]
}
]
}Get Stock Market Depth
value QuoteClient::get_quote_depth(const value &symbols, Market market)
Description
Returns the stock order book.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Array of up to 50 symbols |
| market | Market | No | Market, default Market::US |
Return
web::json::value JSON object
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value symbols = value::array();
symbols[0] = value::string(U("AAPL"));
value result = quote_client.get_quote_depth(symbols, Market::US);
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"symbol": "AAPL",
"asks": [
{"price": 310.97, "volume": 400, "count": 0},
{"price": 310.98, "volume": 200, "count": 0}
],
"bids": [
{"price": 310.89, "volume": 80, "count": 0},
{"price": 310.88, "volume": 300, "count": 0}
]
}
]
}Get Hong Kong Broker Queues
value QuoteClient::get_stock_broker(utility::string_t symbol, int limit, utility::string_t lang, utility::string_t sec_type)
Description
Returns broker queue data for a Hong Kong stock.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | utility::string_t | Yes | Hong Kong stock symbol, for example U("00700") |
| limit | int | No | Number of records to return, default 40 |
| lang | utility::string_t | No | Language, default empty |
| sec_type | utility::string_t | No | Security type, default empty |
Return
web::json::value JSON object
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"symbol": "00700",
"bidBroker": [
{"id": "8137", "name": "法巴证券", "position": [{"price": 388.60, "volume": 500}]}
],
"askBroker": [
{"id": "4374", "name": "汇丰证券", "position": [{"price": 389.00, "volume": 200}]}
]
}
}Get Capital Distribution
value QuoteClient::get_capital_distribution(utility::string_t symbol, Market market, utility::string_t lang)
Description
Returns capital-distribution data for a stock.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | utility::string_t | Yes | Symbol |
| market | Market | No | Market, default Market::US |
| lang | utility::string_t | No | Language, default empty |
Return
web::json::value JSON object
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"symbol": "AAPL",
"netInflow": -125000000.0,
"superIn": 850000000.0,
"superOut": 920000000.0,
"bigIn": 320000000.0,
"bigOut": 280000000.0,
"midIn": 150000000.0,
"midOut": 145000000.0,
"smallIn": 80000000.0,
"smallOut": 80000000.0
}
}Get Capital Flow
value QuoteClient::get_capital_flow(utility::string_t symbol, Market market, CapitalPeriod period, time_t begin_time, time_t end_time, int limit)
Description
Returns capital-flow data for a stock.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | utility::string_t | Yes | Symbol |
| market | Market or utility::string_t | No | Market, default Market::US |
| period | CapitalPeriod or utility::string_t | No | Period; default CapitalPeriod::DAY. Available values: intraday/day/week/month/year/quarter/6month |
| begin_time | time_t | No | Start timestamp, default -1 |
| end_time | time_t | No | End timestamp, default -1 |
| limit | int | No | Number of records, default 200 |
Return
web::json::value JSON object
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value result = quote_client.get_capital_flow(U("AAPL"), Market::US, CapitalPeriod::DAY);
ucout << result.serialize() << std::endl;Get Trading Rankings
value QuoteClient::get_trade_rank(utility::string_t market = U(""), utility::string_t lang = U(""))
Description
Returns trading rankings for a market.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| market | utility::string_t | No | Market code; SDK default is empty |
| lang | utility::string_t | No | Language; SDK default is empty |
Return
web::json::value with server-defined ranking fields.
Example
auto result = quote_client.get_trade_rank(U("US"), U("en_US"));Response provenance: the server defines ranking fields; the SDK repository has no fixed model or fixture.
Permissions and Limits
The target market-data entitlement is required. Ranking scope and update frequency are server-controlled.
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"symbol": "AAPL",
"items": [
{"time": 1785441600000, "netInflow": -125000000.0, "superIn": 850000000.0, "superOut": 920000000.0}
]
}
}Get Broker Holdings
value QuoteClient::get_broker_hold(utility::string_t market = U("HK"), utility::string_t order_by = U(""), utility::string_t direction = U(""), int limit = 0, int page = 0, utility::string_t lang = U(""))
Description
Returns paginated Hong Kong broker holdings.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| market | utility::string_t | No | SDK default U("HK") |
| order_by | utility::string_t | No | Sort field; SDK default is empty |
| direction | utility::string_t | No | Sort direction; SDK default is empty |
| limit | int | No | SDK default 0; sent only when positive |
| page | int | No | SDK default 0; sent only when positive |
| lang | utility::string_t | No | Language; SDK default is empty |
Return
web::json::value; pagination and item fields are server-defined.
Example
auto result = quote_client.get_broker_hold(
U("HK"), U("market_value"), U("desc"), 50, 1, U("en_US"));Response provenance: the SDK returns unmodeled web::json::value; pagination and item fields follow the runtime server response.
Permissions and Limits
HK is the SDK default. The server validates sort values and pagination; Hong Kong data permission is required.
Updated 7 days ago
