General

C++ HTTP methods return the response data value. JSON that includes code, message, timestamp, and data illustrates the complete wire response; serializing the returned value does not include that envelope.

Get Market Data Permissions

value QuoteClient::get_quote_permission()

Description

Returns the current account's market data permission entries.

Return

A web::json::value JSON object containing market data permission entries.

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_quote_permission();
ucout << result.serialize() << std::endl;

Response Example

{
  "code": 0,
  "message": "success",
  "timestamp": 1785528000000,
  "data": [
    {"name": "usStockQuote", "expireAt": 1788120000000},
    {"name": "hkStockQuoteLv2", "expireAt": 1788120000000}
  ]
}

Rate Limit


Claim Market Data Device Access

value QuoteClient::grab_quote_permission()

Takes no parameters. Claims market data device access for the current device and removes that device access from another device on the account. This operation does not purchase or grant new market data access. Returns web::json::value.

auto result = quote_client.grab_quote_permission();
utility::ucout << result.serialize() << std::endl;

Existing market data access is required. The current constructor implementation invokes this method without reading is_grab_permission.

Response Example

{
  "code": 0,
  "message": "success",
  "timestamp": 1785528000000,
  "data": {
    "name": "usStockQuote",
    "expireAt": 1788120000000
  }
}

Rate Limit


Get Bar-Query Quota

value QuoteClient::get_kline_quota(bool with_details = false)

Description

Returns quota information for candlestick bar (K-line) queries.

Parameters

ParameterTypeRequiredDescription
with_detailsboolNoReturn detailed quota information; default false

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_kline_quota(true);
ucout << result.serialize() << std::endl;

Response Example

{
  "code": 0,
  "message": "success",
  "timestamp": 1785528000000,
  "data": {
    "remain": 500,
    "used": 120
  }
}

Rate Limit


Get Add-On Entitlements

value QuoteClient::get_addon_entitlements()

Description

Returns add-on market-data plans and entitlements visible to the account.

Parameters

None.

Return

web::json::value object with these fields:

FieldTypeDescription
userLevelintegerUser plan level
activePlanobjectActive plan with planType, expireTime, and remainingDays
addonsarrayAdd-on plans with planType, active, startTime, and expireTime
effectiveEntitlementobjectEffective historical, subscription, depth, and high/medium/low-frequency quotas

Example

auto result = quote_client.get_addon_entitlements();

Response Example

{
  "userLevel": 3,
  "activePlan": {"planType": "PREMIUM", "expireTime": 1788120000000, "remainingDays": 30},
  "addons": [],
  "effectiveEntitlement": {"historyStockLimit": 10000, "historyStockRemaining": 9800, "subscribeLimit": 500, "subscribeRemaining": 480}
}

Permissions and Limits

Only plans visible to the current developer account are returned.

Return, Permissions, and Limits

All methods return web::json::value. Relevant market data access and company-data entitlements are required. See API Rate Limits.

See the public C++ SDK repository for API definitions and release updates.


What’s Next

Did this page help you?