WarrantCbbc
get_warrant_filter
warrant filter
value get_warrant_filter(const utility::string_t symbol, int page_size = 100, int page = 0, utility::string_t sort_field_name = U(""), utility::string_t sort_dir = U("SortDir_Ascend"));
Description
Get the list of nested CBBC ticker data, support sorting and filtering the rounds by different fields.
Parameters
Parameter | Type | Required or not | Description |
---|---|---|---|
symbol | str | Yes | Positive Stock Code |
| page_size | int | No | number of pages per page, default 50 |
| sort_dir | tigeropen.common.consts.SortDirection | No | sort order, enum ASC/DESC ,default ASC | | filter_params | tigeropen.quote.request.model.WarrantFilterParams | No | Filter parameters |
WarrantFilterParams | No | filter_params | The fields of filter_params are as follows.
Parameters | Type | Required or not | Description |
---|---|---|---|
issuer_name | str | No | issuer (refer to the issuerName field of the returned FilterBounds instance), default all |
expire_ym | str | No | expiration date in yyyy-MM format |
state | int | No | state, 0 all, 1 normal, 2 terminated transaction, 3 waiting for listing, default 0 |
warrant_type | set[int] | No | type WarrantType (1: Call, 2: Put, 3: Bull, 4: Bear, 0: All), default All |
in_out_price | set[int] | No | 1: in_price (contains flat values), -1: out-of-price |
lot_size | set[int] | No | shares per lot |
entitlement_ratio | set[float] | No | Conversion ratio |
strike | tuple[float, float] | No | strike price range |
effective_leverage | tuple[float, float] | No | Effective leverage range |
effective_leverage | tuple[float, float] | No | leverage_ratio range |
call_price | tuple[float, float] | No | Recovery Price Range |
volume | tuple[int, int] | No | Volume Range |
premium | tuple[float, float] | No | Premium range |
outstanding_ratio | tuple[float, float] | No | Street Ratio Range |
implied_volatility | tuple[float, float] | No | Implied Volatility Range |
Returns |
name | type | description |
---|---|---|
page | int | page number |
totalPage | int | totalPage |
totalCount | int | Total data |
bounds | tigeropen.quote.domain.filter.WarrantFilterBounds | Requests for settable filters, see below for description |
items | pandas.DataFrame | fields see description below |
Name | Type | Description |
---|---|---|
issuer_name | list[str] | issuer_name |
expire_date | list[str] | expiration date |
lot_size | list[int] | shares per lot |
entitlement_ratio | list<double> | exchange_ratio |
leverage_ratio | dict | |
strike | dict | Strike price range |
strike | dict | strike price range |
outstanding_ratio | dict | street_ratio_range |
implied_volatility | dict | implied_volatility_range |
effective_leverage | dict | effective_leverage_range |
effective_leverage | dict | effective_leverage range |
name | type | description |
---|---|---|
symbol | str | Subject stock code |
name | str | Subject name |
type | warrant_type | type, 1: call, 2: put, 3: bull, 4: bear |
sec_type | str | Contract type, Warrant: WAR / CBBC: IOPT |
market | str | Market, hk |
entitlement_ratio | float | Conversion Ratio |
entitlement_price | float | Conversion Price |
premium | float | premium |
float | break-even_point | float |
call_price | float | call price (CBBCs only) |
| expire_date | str | expiration date | | last_trading_date | str | Last Trading Date | | state | warrant_state | state, 1_normal, 2_terminated, 3_waiting_for_listing | | change_rate | float | Change | float | change_rate | float | Change | float | Rate | change_rate | float | change_rate | latest_price | float | latest_price | change_rate | float | change_price | latest_price | float | latest_price | change | float | latest_price | float | latest_price | volume | long | volume | outstanding_ratio | float | outstanding_ratio | float | outstanding_ratio | lot_size | lot_size | lot_size | lot_size | lot_size | int | Lot Size | | strike | float | strike_price | in_out_price | in_out_price | in_out_price | in_out_price | float | in_price (>_0)/out_price (<_0) | | lot_size | int | lot_size | int | lot_size | delta | float | hedge_value | effective_leverage | float | leverage_ratio | | effective_leverage | float | Effective Leverage | | implied_volatility | float | implied_volatility |
Example
#include "tigerapi/quote_client.h"
#include "tigerapi/trade_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();
config.private_key = "xxxxxx your private key string xxxxxxxx";
config.tiger_id = "your tiger id";
config.account = "your account";
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_warrant_filter(U("00700"));
ucout << U("result: ") << result << endl;
return 0;
}
Response Example
WarrantFilterItem({
'items':
symbol name type sec_type market entitlement_ratio entitlement_price premium breakeven_point expire_date last_trading_date state change_rate change latest_price volume amount outstanding_ratio lot_size strike in_out_price delta leverage_ratio effective_leverage implied_volatility
0 27062 A.P Put WAR HK 47.483 1.377007 0.605231 148.669993 2023-10-20 2023-10-16 Normal 0.035714 0.001 0.029 0 0.0 0.002 5000 150.047 1.50988 -0.030389 273.491711 -8.311172 69.847,
'page': 0, 'total_page': 1, 'total_count': 1,
'bounds': FilterBounds({
'expire_date': ['2026-01', '2025-12', '2025-09', '2025-08', '2024-12', '2024-07', '2024-06', '2024-04', '2024-03', '2024-02', '2024-01', '2023-12', '2023-11', '2023-10', '2023-09', '2023-08', '2023-07', '2023-06', '2023-05', '2023-04'],
'lot_size': [1000, 5000, 10000, 50000],
'entitlement_ratio': [1.053, 47.483, 50.0, 92.166, 94.967, 100.0, 460.829, 474.834, 485.437, 500.0],
'leverage_ratio': {'min': 1.391437, 'max': 3056.79342},
'strike': {'min': 111.301, 'max': 717.11},
'premium': {'min': -0.314923, 'max': 0.908085},
'outstanding_ratio': {'min': 0.0, 'max': 1.0},
'implied_volatility': {'min': 0.0, 'max': 131.085},
'effective_leverage': {'min': -46.321801, 'max': 20.189945},
'call_price': {'min': 113.96, 'max': 520.0}})})
get_warrant_real_time_quote
value get_warrant_real_time_quote(const utility::string_t symbol);value get_warrant_real_time_quote(const value &symbols);
Description
Get the time quote of a Warrant Bull/Bear Confirmation
**Parameters
Parameter | Type | Required or not | Description |
---|---|---|---|
symbols | value | yes | Rotating symbols code, limit to 50 |
**Returns
The structure is as follows:
fields | type | description |
---|---|---|
symbol | str | labeled code |
name | str | Subject Name |
exchange | str | Exchange |
market | str | market |
name | str | Subject name |
currency | str | Currency |
expiry | str | Expiry_yyyy_mm_dd |
strike | str | Expiry_yyyy_mm_dd |
right | str | Direction (put/call) |
multiplier | float | lot size |
last_trading_date | int | last_trading_date_timestamp |
entitlement_ratio | float | conversion_ratio |
entitlement_price | float | Conversion Price |
entitlement_ratio | float | Entitlement Ratio |
listing_date | int | |
call_price | float | Recovery Price* (CBBCs only)* |
halted | halted_status | * Whether trading is halted. 0: Normal_3: Suspended_4: Delisted* |
underlying_symbol | str | underlying_asset_code |
timestamp | int | time stamp |
latest_price | float | latest_price |
pre_close | float | previous_closing_price |
pre_close | float | previous_close |
pre_close | float | open |
| volume | int | Volume | | amount | float | | high | float | high | high | float | high | low | float | low | volume | int | volume | amount | float | turnover | premium | float | turnover | premium | amount | float | turnover | premium | float | premium | outstanding_ratio | outstanding_ratio | outstanding_ratio | outstanding_ratio | float | street_ratio | implied_volatility | implied_volatility | implied_volatility | implied_volatility | float | implied_volatility (only supported by Wool) | | in_out_price | in_out_price | in_out_price | in_out_price | float | in_out_price | in_out_price | in_out_price | delta | float | hedged_value (wavier support only) | | leverage_ratio | float | Leverage Ratio | | breakeven_point | float | break-even_point_at_expiry |
Example
#include "tigerapi/quote_client.h"
#include "tigerapi/trade_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();
config.private_key = "xxxxxx your private key string xxxxxxxx";
config.tiger_id = "your tiger id";
config.account = "your account";
std::shared_ptr<QuoteClient> quote_client = std::make_shared<QuoteClient>(config);
value result = quote_client->get_warrant_real_time_quote(U("15792"));
ucout << U("result: ") << result << endl;
return 0;
}
Response example
symbol name exchange market sec_type currency expiry strike right multiplier last_trading_date entitlement_ratio entitlement_price min_tick listing_date call_price halted underlying_symbol timestamp latest_price pre_close open high low volume amount premium outstanding_ratio in_out_price leverage_ratio breakeven_point implied_volatility delta
0 58603 R.P SEHK HK IOPT HKD 2025-03-28 16700.0 PUT 10000.0 1743004800000 10000.0 1890.00 0.001 1668009600000 16600.0 Normal HSI 1681200546054 0.189 0.175 0.188 0.189 0.170 444000 83378.0 0.277040 0.0375 0.226661 10.838751 14810.00 NaN NaN
1 15792 A.P SEHK HK WAR HKD 2022-10-31 39.39 PUT 5000.0 1666627200000 10.0 2.28 0.001 1651075200000 NaN Normal 03968 1681200546030 0.228 0.223 0.227 0.228 0.216 21572000 4795879.0 0.058122 0.0011 0.000254 17.280702 37.11 130.577 -0.9844