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

ParameterTypeRequiredDescription
marketutility::string_tYesMarket, 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

ParameterTypeRequiredDescription
marketMarket or utility::string_tYesMarket, e.g., Market::US or U("US")
begin_dateutility::string_tYesStart date, format "yyyy-MM-dd", e.g., U("2024-01-01")
end_dateutility::string_tYesEnd 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

ParameterTypeRequiredDescription
marketMarketNoMarket enum, Market::US / Market::HK / Market::ALL, default Market::ALL
include_otcboolNoInclude 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

ParameterTypeRequiredDescription
marketMarketNoMarket enum, Market::US / Market::HK / Market::ALL, default Market::ALL
include_otcboolNoInclude 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

ParameterTypeRequiredDescription
symbolsvalueYesArray of up to 100 symbols, for example value::array({value::string(U("AAPL"))})
include_hour_tradingboolNoInclude pre-market and after-hours data; default false
include_ask_bidboolNoInclude bid and ask data; default false
rightQuoteRightNoAdjustment 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

ParameterTypeRequiredDescription
symbolsvalueYesArray of up to 50 symbols
include_hour_tradingboolNoInclude pre-market and after-hours data; default false
begin_timetime_tNoStart 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

ParameterTypeRequiredDescription
symbolsvalueYesArray of up to 50 symbols
dateutility::string_tYesDate, format "yyyy-MM-dd", e.g., U("2024-01-15")
rightQuoteRightNoAdjustment 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

ParameterTypeRequiredDescription
symbolsvalueYesArray of up to 50 symbols
periodBarPeriod or utility::string_tNoBar 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_timetime_tNoStart Unix timestamp in milliseconds, default -1
end_timetime_tNoEnd Unix timestamp in milliseconds, default -1
rightQuoteRight or utility::string_tNoAdjustment type, default QuoteRight::br or U("br")
limitintNoMaximum number of records to return, default 251
page_tokenutility::string_tNoPagination 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

PropertyTypeDescription
symbolutility::string_tSymbol
periodutility::string_tBar period
itemsvector<KlineItem>Bars

KlineItem Object Properties

PropertyTypeDescription
opendoubleOpen price
highdoubleHigh price
lowdoubleLow price
closedoubleClose price
volumelong longVolume
timetime_tTimestamp

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

ParameterTypeRequiredDescription
symbolsvalueYesArray of up to 50 symbols

Return

A vector<RealtimeQuote> list of real-time quote objects.

RealtimeQuote Object Properties

PropertyTypeDescription
symbolutility::string_tSymbol
opendoubleOpen price
highdoubleHigh price
lowdoubleLow price
closedoubleClose price
pre_closedoublePrevious close price
latest_pricedoubleLatest price
latest_timetime_tLatest trade time
volumelong longVolume
ask_pricedoubleAsk price
ask_sizedoubleAsk size
bid_pricedoubleBid price
bid_sizedoubleBid size
statusutility::string_tMarket 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

ParameterTypeRequiredDescription
symbolsvalueYesArray of up to 50 symbols
trade_sessionTradingSession or utility::string_tNoTrading session, default TradingSession::Regular
begin_indexlongNoStart index, default -1
end_indexlongNoEnd index, default -1
limitintNoMaximum 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

ParameterTypeRequiredDescription
symbolsvalueYesArray of up to 50 symbols
marketMarketNoMarket, 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

ParameterTypeRequiredDescription
symbolutility::string_tYesHong Kong stock symbol, for example U("00700")
limitintNoNumber of records to return, default 40
langutility::string_tNoLanguage, default empty
sec_typeutility::string_tNoSecurity 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

ParameterTypeRequiredDescription
symbolutility::string_tYesSymbol
marketMarketNoMarket, default Market::US
langutility::string_tNoLanguage, 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

ParameterTypeRequiredDescription
symbolutility::string_tYesSymbol
marketMarket or utility::string_tNoMarket, default Market::US
periodCapitalPeriod or utility::string_tNoPeriod; default CapitalPeriod::DAY. Available values: intraday/day/week/month/year/quarter/6month
begin_timetime_tNoStart timestamp, default -1
end_timetime_tNoEnd timestamp, default -1
limitintNoNumber 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

ParameterTypeRequiredDescription
marketutility::string_tNoMarket code; SDK default is empty
langutility::string_tNoLanguage; 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

ParameterTypeRequiredDescription
marketutility::string_tNoSDK default U("HK")
order_byutility::string_tNoSort field; SDK default is empty
directionutility::string_tNoSort direction; SDK default is empty
limitintNoSDK default 0; sent only when positive
pageintNoSDK default 0; sent only when positive
langutility::string_tNoLanguage; 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.



What’s Next

Did this page help you?