WarrantCbbc

About 4 min

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

ParameterTypeRequiredDescription
symbolstring_tYesPositive Stock Code
page_sizeintNonumber of items per page
default: 100
pageintNostarting page
default: 0
sort_field_namestring_tNodefault: U("")
sort_dirstring_tNosort order, enum ASC/DESC
default: U("SortDir_Ascend")

WarrantFilterParams | No | filter_params | The fields of filter_params are as follows.

ParametersTypeRequired or notDescription
issuer_namestrNoissuer (refer to the issuerName field of the returned FilterBounds instance), default all
expire_ymstrNoexpiration date in yyyy-MM format
stateintNostate, 0 all, 1 normal, 2 terminated transaction, 3 waiting for listing, default 0
warrant_typeset[int]Notype WarrantType (1: Call, 2: Put, 3: Bull, 4: Bear, 0: All), default All
in_out_priceset[int]No1: in_price (contains flat values), -1: out-of-price
lot_sizeset[int]Noshares per lot
entitlement_ratioset[float]NoConversion ratio
striketuple[float, float]Nostrike price range
effective_leveragetuple[float, float]NoEffective leverage range
effective_leveragetuple[float, float]Noleverage_ratio range
call_pricetuple[float, float]NoRecovery Price Range
volumetuple[int, int]NoVolume Range
premiumtuple[float, float]NoPremium range
outstanding_ratiotuple[float, float]NoStreet Ratio Range
implied_volatilitytuple[float, float]NoImplied Volatility Range
Returns
nametypedescription
pageintpage number
totalPageinttotalPage
totalCountintTotal data
boundstigeropen.quote.domain.filter.WarrantFilterBoundsRequests for settable filters, see below for description
itemspandas.DataFramefields see description below
NameTypeDescription
issuer_namelist[str]issuer_name
expire_datelist[str]expiration date
lot_sizelist[int]shares per lot
entitlement_ratiolist<double>exchange_ratio
leverage_ratiodict
strikedictStrike price range
strikedictstrike price range
outstanding_ratiodictstreet_ratio_range
implied_volatilitydictimplied_volatility_range
effective_leveragedicteffective_leverage_range
effective_leveragedicteffective_leverage range
nametypedescription
symbolstrSubject stock code
namestrSubject name
typewarrant_typetype, 1: call, 2: put, 3: bull, 4: bear
sec_typestrContract type, Warrant: WAR / CBBC: IOPT
marketstrMarket, hk
entitlement_ratiofloatConversion Ratio
entitlement_pricefloatConversion Price
premiumfloatpremium
floatbreak-even_pointfloat
call_pricefloatcall price (CBBCs only)

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

ParameterTypeRequiredDescription
symbolsvalueYesRotating symbols code, limit to 50

**Returns

The structure is as follows:

fieldstypedescription
amountfloatTransaction Amount / Turnover
breakevenPointfloatbreak-even point at expiry
currencystringCurrency
deltafloatHedge Value (Only supported for Warrants)
entitlementPricefloatStock swap price
entitlementRatiofloatStock swap ratio
exchangestringExchange
expirystringExpiration Date (yyyy_mm_dd)
haltedstringSuspension status
highfloatHighest price
impliedVolatilityfloatImplied votlatility (Warrants only)
inOutPricefloatIn the money/Out the money
lastTradingDateintLast trading day timestamp
latestPricefloatLatest price
leverageRatiofloatleverage ratio
listingDateintListing date timestamp
lowfloatLowest price
marketstringMarket
multiplierfloatContract size
namestringUnderlying asset name
openfloatOpening price
outstandingRatiofloatStreet Goods Ratio
preClosefloatPrevious Trading Day Closing Price
premiumfloatPremium
rightstringDirection (put/call)
strikefloatstrike price
symbolstringSymbol
timestampinttimestamp
underlyingSymbolstringUnderlying Asset Code
volumeintVolume

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

{
  "amount":0,
  "breakevenPoint":17.32,
  "currency":"HKD",
  "delta":0.31859999999999999,
  "entitlementPrice":0.44,
  "entitlementRatio":5,
  "exchange":"SEHK",
  "expiry":"2024-05-03",
  "halted":"Suspension",
  "high":0.087999999999999995,
  "impliedVolatility":22.035,
  "inOutPrice":2.178318,
  "lastTradingDate":1714060800000,
  "latestPrice":0.087999999999999995,
  "leverageRatio":121.93181800000001,
  "listingDate":1680710400000,
  "low":0.087999999999999995,
  "market":"HK","minTick":0.001,
  "multiplier":1000,
  "name":"MBXIAMI@EC2405A.C",
  "open":0.087999999999999995,
  "outstandingRatio":0.12529999999999999,
  "preClose":0.087999999999999995,
  "premium":-0.67716699999999996,
  "right":"CALL","secType":"WAR",
  "strike":"16.88",
  "symbol":"15792",
  "timestamp":1714723200018,
  "underlyingSymbol":"01810",
  "volume":0
}
Last update: