LongPort OpenAPI C++ SDK
Public Member Functions | Static Public Member Functions | List of all members
longport::quote::QuoteContext Class Reference

Quote context. More...

#include <quote_context.hpp>

Public Member Functions

 QuoteContext ()
 
 QuoteContext (const lb_quote_context_t *ctx)
 
 QuoteContext (const QuoteContext &ctx)
 
 QuoteContext (QuoteContext &&ctx)
 
 ~QuoteContext ()
 
QuoteContextoperator= (const QuoteContext &ctx)
 
size_t ref_count () const
 
int64_t member_id ()
 Returns the member id. More...
 
std::string quote_level () const
 Returns the quote level. More...
 
void quote_package_details (const std::vector< std::string > &symbols, AsyncCallback< QuoteContext, std::vector< QuotePackageDetail >> callback) const
 Returns the quote package details. More...
 
void subscribe (const std::vector< std::string > &symbols, SubFlags sub_flags, bool is_first_push, AsyncCallback< QuoteContext, void > callback) const
 Subscribe. More...
 
void unsubscribe (const std::vector< std::string > &symbols, SubFlags sub_flags, AsyncCallback< QuoteContext, void > callback) const
 Unsubscribe. More...
 
void subscribe_candlesticks (const std::string &symbol, Period period, AsyncCallback< QuoteContext, void > callback) const
 Subscribe security candlesticks. More...
 
void unsubscribe_candlesticks (const std::string &symbol, Period period, AsyncCallback< QuoteContext, void > callback) const
 Unsubscribe security candlesticks. More...
 
void subscriptions (AsyncCallback< QuoteContext, std::vector< Subscription >> callback) const
 Get subscription information. More...
 
void set_on_quote (PushCallback< QuoteContext, PushQuote > callback) const
 
void set_on_depth (PushCallback< QuoteContext, PushDepth > callback) const
 
void set_on_brokers (PushCallback< QuoteContext, PushBrokers > callback) const
 
void set_on_trades (PushCallback< QuoteContext, PushTrades > callback) const
 
void set_on_candlestick (PushCallback< QuoteContext, PushCandlestick > callback) const
 
void static_info (const std::vector< std::string > &symbols, AsyncCallback< QuoteContext, std::vector< SecurityStaticInfo >> callback) const
 Get basic information of securities. More...
 
void quote (const std::vector< std::string > &symbols, AsyncCallback< QuoteContext, std::vector< SecurityQuote >> callback) const
 Get quote of securities. More...
 
void option_quote (const std::vector< std::string > &symbols, AsyncCallback< QuoteContext, std::vector< OptionQuote >> callback) const
 Get quote of option securities. More...
 
void warrant_quote (const std::vector< std::string > &symbols, AsyncCallback< QuoteContext, std::vector< WarrantQuote >> callback) const
 Get quote of warrant securities. More...
 
void depth (const std::string &symbol, AsyncCallback< QuoteContext, SecurityDepth > callback) const
 Get security depth. More...
 
void brokers (const std::string &symbol, AsyncCallback< QuoteContext, SecurityBrokers > callback) const
 Get security brokers. More...
 
void participants (AsyncCallback< QuoteContext, std::vector< ParticipantInfo >> callback) const
 Get participants. More...
 
void trades (const std::string &symbol, uintptr_t count, AsyncCallback< QuoteContext, std::vector< Trade >> callback) const
 Get security trades. More...
 
void intraday (const std::string &symbol, AsyncCallback< QuoteContext, std::vector< IntradayLine >> callback) const
 Get security intraday lines. More...
 
void candlesticks (const std::string &symbol, Period period, uintptr_t count, AdjustType adjust_type, AsyncCallback< QuoteContext, std::vector< Candlestick >> callback) const
 Get security candlesticks. More...
 
void history_candlesticks_by_offset (const std::string &symbol, Period period, AdjustType adjust_type, bool forward, DateTime datetime, uintptr_t count, AsyncCallback< QuoteContext, std::vector< Candlestick >> callback) const
 Get security history candlesticks by offset. More...
 
void history_candlesticks_by_date (const std::string &symbol, Period period, AdjustType adjust_type, std::optional< Date > start, std::optional< Date > end, AsyncCallback< QuoteContext, std::vector< Candlestick >> callback) const
 Get security history candlesticks by date. More...
 
void option_chain_expiry_date_list (const std::string &symbol, AsyncCallback< QuoteContext, std::vector< Date >> callback) const
 Get option chain expiry date list. More...
 
void option_chain_info_by_date (const std::string &symbol, Date expiry_date, AsyncCallback< QuoteContext, std::vector< StrikePriceInfo >> callback) const
 Get option chain expiry date list. More...
 
void warrant_issuers (AsyncCallback< QuoteContext, std::vector< IssuerInfo >> callback) const
 Get warrant issuers. More...
 
void warrant_list (const std::string &symbol, WarrantSortBy sort_by, SortOrderType sort_order, const std::vector< WarrantType > &warrant_type, const std::vector< int32_t > &issuer, const std::vector< FilterWarrantExpiryDate > &expiry_date, const std::vector< FilterWarrantInOutBoundsType > &price_type, const std::vector< WarrantStatus > &status, AsyncCallback< QuoteContext, std::vector< WarrantInfo >> callback) const
 Query warrant list. More...
 
void trading_session (AsyncCallback< QuoteContext, std::vector< MarketTradingSession >> callback) const
 Get trading session of the day. More...
 
void trading_days (Market market, Date begin, Date end, AsyncCallback< QuoteContext, MarketTradingDays > callback)
 
void capital_flow (const std::string &symbol, AsyncCallback< QuoteContext, std::vector< CapitalFlowLine >> callback) const
 Get capital flow intraday. More...
 
void capital_distribution (const std::string &symbol, AsyncCallback< QuoteContext, CapitalDistributionResponse > callback) const
 Get capital distribution. More...
 
void calc_indexes (const std::vector< std::string > &symbols, const std::vector< CalcIndex > &indexes, AsyncCallback< QuoteContext, std::vector< SecurityCalcIndex >> callback) const
 Get calc indexes. More...
 
void watchlist (AsyncCallback< QuoteContext, std::vector< WatchlistGroup >> callback) const
 Get watchlist. More...
 
void create_watchlist_group (const CreateWatchlistGroup &req, AsyncCallback< QuoteContext, int64_t > callback) const
 Create watchlist group. More...
 
void delete_watchlist_group (int64_t id, bool purge, AsyncCallback< QuoteContext, void > callback) const
 Delete watchlist group. More...
 
void update_watchlist_group (const UpdateWatchlistGroup &req, AsyncCallback< QuoteContext, void > callback) const
 Create watchlist group. More...
 
void security_list (Market market, SecurityListCategory category, AsyncCallback< QuoteContext, std::vector< Security >> callback) const
 Get security list. More...
 
void realtime_quote (const std::vector< std::string > &symbols, AsyncCallback< QuoteContext, std::vector< RealtimeQuote >> callback) const
 
void realtime_depth (const std::string &symbol, AsyncCallback< QuoteContext, SecurityDepth > callback) const
 
void realtime_trades (const std::string &symbol, uint64_t count, AsyncCallback< QuoteContext, std::vector< Trade >> callback) const
 
void realtime_brokers (const std::string &symbol, AsyncCallback< QuoteContext, SecurityBrokers > callback) const
 
void realtime_candlesticks (const std::string &symbol, Period period, uintptr_t count, AsyncCallback< QuoteContext, std::vector< Candlestick >> callback) const
 

Static Public Member Functions

static void create (const Config &config, AsyncCallback< QuoteContext, void > callback)
 

Detailed Description

Quote context.

Constructor & Destructor Documentation

◆ QuoteContext() [1/4]

longport::quote::QuoteContext::QuoteContext ( )

◆ QuoteContext() [2/4]

longport::quote::QuoteContext::QuoteContext ( const lb_quote_context_t ctx)

◆ QuoteContext() [3/4]

longport::quote::QuoteContext::QuoteContext ( const QuoteContext ctx)

◆ QuoteContext() [4/4]

longport::quote::QuoteContext::QuoteContext ( QuoteContext &&  ctx)

◆ ~QuoteContext()

longport::quote::QuoteContext::~QuoteContext ( )

Member Function Documentation

◆ brokers()

void longport::quote::QuoteContext::brokers ( const std::string &  symbol,
AsyncCallback< QuoteContext, SecurityBrokers callback 
) const

Get security brokers.

◆ calc_indexes()

void longport::quote::QuoteContext::calc_indexes ( const std::vector< std::string > &  symbols,
const std::vector< CalcIndex > &  indexes,
AsyncCallback< QuoteContext, std::vector< SecurityCalcIndex >>  callback 
) const

Get calc indexes.

◆ candlesticks()

void longport::quote::QuoteContext::candlesticks ( const std::string &  symbol,
Period  period,
uintptr_t  count,
AdjustType  adjust_type,
AsyncCallback< QuoteContext, std::vector< Candlestick >>  callback 
) const

Get security candlesticks.

◆ capital_distribution()

void longport::quote::QuoteContext::capital_distribution ( const std::string &  symbol,
AsyncCallback< QuoteContext, CapitalDistributionResponse callback 
) const

Get capital distribution.

◆ capital_flow()

void longport::quote::QuoteContext::capital_flow ( const std::string &  symbol,
AsyncCallback< QuoteContext, std::vector< CapitalFlowLine >>  callback 
) const

Get capital flow intraday.

◆ create()

static void longport::quote::QuoteContext::create ( const Config config,
AsyncCallback< QuoteContext, void >  callback 
)
static

◆ create_watchlist_group()

void longport::quote::QuoteContext::create_watchlist_group ( const CreateWatchlistGroup req,
AsyncCallback< QuoteContext, int64_t >  callback 
) const

Create watchlist group.

◆ delete_watchlist_group()

void longport::quote::QuoteContext::delete_watchlist_group ( int64_t  id,
bool  purge,
AsyncCallback< QuoteContext, void >  callback 
) const

Delete watchlist group.

◆ depth()

void longport::quote::QuoteContext::depth ( const std::string &  symbol,
AsyncCallback< QuoteContext, SecurityDepth callback 
) const

Get security depth.

◆ history_candlesticks_by_date()

void longport::quote::QuoteContext::history_candlesticks_by_date ( const std::string &  symbol,
Period  period,
AdjustType  adjust_type,
std::optional< Date start,
std::optional< Date end,
AsyncCallback< QuoteContext, std::vector< Candlestick >>  callback 
) const

Get security history candlesticks by date.

◆ history_candlesticks_by_offset()

void longport::quote::QuoteContext::history_candlesticks_by_offset ( const std::string &  symbol,
Period  period,
AdjustType  adjust_type,
bool  forward,
DateTime  datetime,
uintptr_t  count,
AsyncCallback< QuoteContext, std::vector< Candlestick >>  callback 
) const

Get security history candlesticks by offset.

◆ intraday()

void longport::quote::QuoteContext::intraday ( const std::string &  symbol,
AsyncCallback< QuoteContext, std::vector< IntradayLine >>  callback 
) const

Get security intraday lines.

◆ member_id()

int64_t longport::quote::QuoteContext::member_id ( )

Returns the member id.

◆ operator=()

QuoteContext& longport::quote::QuoteContext::operator= ( const QuoteContext ctx)

◆ option_chain_expiry_date_list()

void longport::quote::QuoteContext::option_chain_expiry_date_list ( const std::string &  symbol,
AsyncCallback< QuoteContext, std::vector< Date >>  callback 
) const

Get option chain expiry date list.

◆ option_chain_info_by_date()

void longport::quote::QuoteContext::option_chain_info_by_date ( const std::string &  symbol,
Date  expiry_date,
AsyncCallback< QuoteContext, std::vector< StrikePriceInfo >>  callback 
) const

Get option chain expiry date list.

◆ option_quote()

void longport::quote::QuoteContext::option_quote ( const std::vector< std::string > &  symbols,
AsyncCallback< QuoteContext, std::vector< OptionQuote >>  callback 
) const

Get quote of option securities.

◆ participants()

void longport::quote::QuoteContext::participants ( AsyncCallback< QuoteContext, std::vector< ParticipantInfo >>  callback) const

Get participants.

◆ quote()

void longport::quote::QuoteContext::quote ( const std::vector< std::string > &  symbols,
AsyncCallback< QuoteContext, std::vector< SecurityQuote >>  callback 
) const

Get quote of securities.

◆ quote_level()

std::string longport::quote::QuoteContext::quote_level ( ) const

Returns the quote level.

◆ quote_package_details()

void longport::quote::QuoteContext::quote_package_details ( const std::vector< std::string > &  symbols,
AsyncCallback< QuoteContext, std::vector< QuotePackageDetail >>  callback 
) const

Returns the quote package details.

◆ realtime_brokers()

void longport::quote::QuoteContext::realtime_brokers ( const std::string &  symbol,
AsyncCallback< QuoteContext, SecurityBrokers callback 
) const

Get real-time broker queue

Get real-time broker queue of the subscribed symbols, it always returns the data in the local storage.

◆ realtime_candlesticks()

void longport::quote::QuoteContext::realtime_candlesticks ( const std::string &  symbol,
Period  period,
uintptr_t  count,
AsyncCallback< QuoteContext, std::vector< Candlestick >>  callback 
) const

Get real-time candlesticks

Get real-time candlesticks of the subscribed symbols, it always returns the data in the local storage.

◆ realtime_depth()

void longport::quote::QuoteContext::realtime_depth ( const std::string &  symbol,
AsyncCallback< QuoteContext, SecurityDepth callback 
) const

Get real-time depth

Get real-time depth of the subscribed symbols, it always returns the data in the local storage.

◆ realtime_quote()

void longport::quote::QuoteContext::realtime_quote ( const std::vector< std::string > &  symbols,
AsyncCallback< QuoteContext, std::vector< RealtimeQuote >>  callback 
) const

Get real-time quotes

Get real-time quotes of the subscribed symbols, it always returns the data in the local storage.

◆ realtime_trades()

void longport::quote::QuoteContext::realtime_trades ( const std::string &  symbol,
uint64_t  count,
AsyncCallback< QuoteContext, std::vector< Trade >>  callback 
) const

Get real-time trades

Get real-time trades of the subscribed symbols, it always returns the data in the local storage.

◆ ref_count()

size_t longport::quote::QuoteContext::ref_count ( ) const

◆ security_list()

void longport::quote::QuoteContext::security_list ( Market  market,
SecurityListCategory  category,
AsyncCallback< QuoteContext, std::vector< Security >>  callback 
) const

Get security list.

◆ set_on_brokers()

void longport::quote::QuoteContext::set_on_brokers ( PushCallback< QuoteContext, PushBrokers callback) const

Set brokers callback, after receiving the brokers data push, it will call back to this function.

◆ set_on_candlestick()

void longport::quote::QuoteContext::set_on_candlestick ( PushCallback< QuoteContext, PushCandlestick callback) const

Set candlestick callback, after receiving the trades data push, it will call back to this function.

◆ set_on_depth()

void longport::quote::QuoteContext::set_on_depth ( PushCallback< QuoteContext, PushDepth callback) const

Set depth callback, after receiving the depth data push, it will call back to this function.

◆ set_on_quote()

void longport::quote::QuoteContext::set_on_quote ( PushCallback< QuoteContext, PushQuote callback) const

Set quote callback, after receiving the quote data push, it will call back to this function.

◆ set_on_trades()

void longport::quote::QuoteContext::set_on_trades ( PushCallback< QuoteContext, PushTrades callback) const

Set trades callback, after receiving the trades data push, it will call back to this function.

◆ static_info()

void longport::quote::QuoteContext::static_info ( const std::vector< std::string > &  symbols,
AsyncCallback< QuoteContext, std::vector< SecurityStaticInfo >>  callback 
) const

Get basic information of securities.

◆ subscribe()

void longport::quote::QuoteContext::subscribe ( const std::vector< std::string > &  symbols,
SubFlags  sub_flags,
bool  is_first_push,
AsyncCallback< QuoteContext, void >  callback 
) const

Subscribe.

◆ subscribe_candlesticks()

void longport::quote::QuoteContext::subscribe_candlesticks ( const std::string &  symbol,
Period  period,
AsyncCallback< QuoteContext, void >  callback 
) const

Subscribe security candlesticks.

◆ subscriptions()

void longport::quote::QuoteContext::subscriptions ( AsyncCallback< QuoteContext, std::vector< Subscription >>  callback) const

Get subscription information.

◆ trades()

void longport::quote::QuoteContext::trades ( const std::string &  symbol,
uintptr_t  count,
AsyncCallback< QuoteContext, std::vector< Trade >>  callback 
) const

Get security trades.

◆ trading_days()

void longport::quote::QuoteContext::trading_days ( Market  market,
Date  begin,
Date  end,
AsyncCallback< QuoteContext, MarketTradingDays callback 
)

Get market trading days

The interval must be less than one month, and only the most recent year is supported.

◆ trading_session()

void longport::quote::QuoteContext::trading_session ( AsyncCallback< QuoteContext, std::vector< MarketTradingSession >>  callback) const

Get trading session of the day.

◆ unsubscribe()

void longport::quote::QuoteContext::unsubscribe ( const std::vector< std::string > &  symbols,
SubFlags  sub_flags,
AsyncCallback< QuoteContext, void >  callback 
) const

Unsubscribe.

◆ unsubscribe_candlesticks()

void longport::quote::QuoteContext::unsubscribe_candlesticks ( const std::string &  symbol,
Period  period,
AsyncCallback< QuoteContext, void >  callback 
) const

Unsubscribe security candlesticks.

◆ update_watchlist_group()

void longport::quote::QuoteContext::update_watchlist_group ( const UpdateWatchlistGroup req,
AsyncCallback< QuoteContext, void >  callback 
) const

Create watchlist group.

◆ warrant_issuers()

void longport::quote::QuoteContext::warrant_issuers ( AsyncCallback< QuoteContext, std::vector< IssuerInfo >>  callback) const

Get warrant issuers.

◆ warrant_list()

void longport::quote::QuoteContext::warrant_list ( const std::string &  symbol,
WarrantSortBy  sort_by,
SortOrderType  sort_order,
const std::vector< WarrantType > &  warrant_type,
const std::vector< int32_t > &  issuer,
const std::vector< FilterWarrantExpiryDate > &  expiry_date,
const std::vector< FilterWarrantInOutBoundsType > &  price_type,
const std::vector< WarrantStatus > &  status,
AsyncCallback< QuoteContext, std::vector< WarrantInfo >>  callback 
) const

Query warrant list.

◆ warrant_quote()

void longport::quote::QuoteContext::warrant_quote ( const std::vector< std::string > &  symbols,
AsyncCallback< QuoteContext, std::vector< WarrantQuote >>  callback 
) const

Get quote of warrant securities.

◆ watchlist()

void longport::quote::QuoteContext::watchlist ( AsyncCallback< QuoteContext, std::vector< WatchlistGroup >>  callback) const

Get watchlist.


The documentation for this class was generated from the following file: