Options
Other Current Option Methods
value QuoteClient::get_option_kline_value(value identifiers, time_t begin_time, time_t end_time = 4070880000000)
value QuoteClient::get_option_symbols(utility::string_t market = U("HK"), utility::string_t lang = U(""))
value QuoteClient::get_option_analysis(const value &symbols, utility::string_t market = U("US"), utility::string_t lang = U(""))get_option_kline_value requires option identifiers and a start time, returns raw JSON, and defaults end time to 4070880000000. get_option_symbols defaults to HK. get_option_analysis requires symbols and defaults to US. All return web::json::value and require the corresponding option quote permission.
auto raw_bars = quote_client.get_option_kline_value(identifiers, 1704067200000);
auto hk_symbols = quote_client.get_option_symbols();
auto analysis = quote_client.get_option_analysis(symbols);Response provenance: these endpoints return unmodeled JSON and the SDK repository has no verified option-analysis fixture, so no synthetic Greeks are shown.
Get Option Expiration Dates
value QuoteClient::get_option_expiration(const value &symbols)
Description
Returns all option expiration dates for the specified underlying symbols.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Array of up to 30 underlying symbols, for example value::array({value::string(U("AAPL"))}) |
Return
web::json::value JSON object containing expiration date list
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"));
value result = quote_client.get_option_expiration(symbols);
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"symbol": "AAPL",
"dates": ["2025-08-08", "2025-08-15", "2025-08-22"],
"timestamps": [1754625600000, 1755230400000, 1755835200000],
"count": 3
}
]
}Special option symbols for indices
- S&P 500 (
.SPX): monthly options useSPX; weekly and quarterly options useSPXW. - Nasdaq-100: monthly options use
NDX; weekly options useNDXP. - VIX: monthly options use
VIX; weekly options useVIXW.
Get an Option Chain
value QuoteClient::get_option_chain(const utility::string_t symbol, utility::string_t expiry, value option_filter)
Description
Returns the option chain for an underlying symbol and expiration date.
Option-chain Greeks are deprecated
Greek-related option-chain request flags, filters/models, and response fields
delta,gamma,theta,vega, andrhoare Deprecated. Their values are updated daily and are not timely enough for intraday use. Do not use them for real-time trading decisions. Use Option Pricing Tools with current market inputs instead.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | utility::string_t | Yes | Underlying symbol, e.g., U("AAPL") |
| expiry | time_t or utility::string_t | Yes | Expiration date, timestamp (milliseconds) or date string e.g., U("2024-06-21") |
| option_filter | value | No | Filter conditions JSON object, default value::null() |
option_filter Filter Conditions
| Field | Type | Description |
|---|---|---|
| implied_volatility_min | double | Minimum implied volatility |
| implied_volatility_max | double | Maximum implied volatility |
| delta_min | double | Deprecated. Minimum daily-updated Delta; not suitable for intraday use |
| delta_max | double | Deprecated. Maximum daily-updated Delta; not suitable for intraday use |
| open_interest_min | int | Minimum open interest |
| open_interest_max | int | Maximum open interest |
| in_the_money | bool | Include only in-the-money options |
Return
web::json::value JSON object
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
// Without filter conditions
value result = quote_client.get_option_chain(U("AAPL"), U("2024-06-21"));
ucout << result.serialize() << std::endl;
// With filter conditions
value filter = value::object();
filter[U("in_the_money")] = value::boolean(true);
value result2 = quote_client.get_option_chain(U("AAPL"), U("2024-06-21"), filter);Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"symbol": "AAPL",
"expiry": 1754625600000,
"items": [
{"identifier": "AAPL 250808C00230000", "strike": 230.0, "right": "CALL", "latestPrice": 80.50, "volume": 1200, "openInterest": 5600},
{"identifier": "AAPL 250808P00230000", "strike": 230.0, "right": "PUT", "latestPrice": 1.25, "volume": 800, "openInterest": 3200}
]
}
]
}Get Option Quote Snapshots
value QuoteClient::get_option_brief(value identifiers)
Description
Returns real-time option quote snapshots.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| identifiers | value or utility::string_t | Yes | Option identifier, supports single string or array, up to 30. e.g., U("AAPL 240621C00190000") |
Return
web::json::value JSON object
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value result = quote_client.get_option_brief(U("AAPL 240621C00190000"));
ucout << result.serialize() << std::endl;Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"identifier": "AAPL 250808C00230000",
"symbol": "AAPL",
"strike": 230.0,
"right": "CALL",
"multiplier": 100,
"expiry": 1754625600000,
"latestPrice": 80.50,
"volume": 1200,
"openInterest": 5600,
"impliedVol": 0.3702,
"delta": 0.92,
"gamma": 0.008,
"theta": -0.15,
"vega": 0.12
}
]
}Get Option Bars
vector<Kline> QuoteClient::get_option_kline(
value identifiers, time_t begin_time, time_t end_time = 4070880000000)Description
Returns candlestick bars (K-line data) for option contracts.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| identifiers | value | Yes | Option identifier array, up to 30 |
| begin_time | time_t | Yes | Start timestamp (milliseconds) |
| end_time | time_t | No | End timestamp (milliseconds), default 4070880000000 |
Return
A web::json::value JSON object or a vector<Kline> list of bar objects.
Example
ClientConfig config(false, U("your_config_directory_path"));
QuoteClient quote_client(config);
value identifiers = value::array();
identifiers[0] = value::string(U("AAPL 240621C00190000"));
vector<Kline> klines = quote_client.get_option_kline(identifiers, 1700000000000);Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"identifier": "AAPL 250808C00230000",
"period": "day",
"items": [
{"time": 1785355200000, "open": 78.00, "high": 82.00, "low": 77.50, "close": 80.50, "volume": 1200},
{"time": 1785441600000, "open": 80.50, "high": 83.00, "low": 79.00, "close": 81.25, "volume": 950}
]
}
]
}Get Option Trade Ticks
value QuoteClient::get_option_trade_tick(value identifiers)
Description
Returns tick-by-tick trades for option contracts.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| identifiers | value | Yes | Option identifier array, up to 30 |
Return
web::json::value JSON object
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"identifier": "AAPL 250808C00230000",
"items": [
{"time": 1785527900000, "price": 80.50, "volume": 5, "type": "+"},
{"time": 1785527920000, "price": 80.45, "volume": 3, "type": "-"}
]
}
]
}Get Option Market Depth
value QuoteClient::get_option_depth(const value &symbols, utility::string_t market)
Description
Returns market depth for options.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Option identifier array, up to 30 |
| market | utility::string_t | No | Market, default U("US") |
Return
web::json::value JSON object
Response Example
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"identifier": "AAPL 250808C00230000",
"asks": [
{"price": 80.80, "volume": 20, "count": 0},
{"price": 80.90, "volume": 15, "count": 0}
],
"bids": [
{"price": 80.50, "volume": 10, "count": 0},
{"price": 80.40, "volume": 25, "count": 0}
]
}
]
}Get Option Intraday Data
value QuoteClient::get_option_timeline(const value &symbols, utility::string_t market, time_t begin_time)
Description
Returns intraday data for options.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Option identifier array, up to 30 |
| market | utility::string_t | No | Market, default U("US") |
| begin_time | time_t | No | Start timestamp, default -1 |
Return
web::json::value JSON object
Updated 7 days ago
