LongPort OpenAPI C++ SDK
|
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 () | |
QuoteContext & | operator= (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) |
Quote context.
longport::quote::QuoteContext::QuoteContext | ( | ) |
longport::quote::QuoteContext::QuoteContext | ( | const lb_quote_context_t * | ctx | ) |
longport::quote::QuoteContext::QuoteContext | ( | const QuoteContext & | ctx | ) |
longport::quote::QuoteContext::QuoteContext | ( | QuoteContext && | ctx | ) |
longport::quote::QuoteContext::~QuoteContext | ( | ) |
void longport::quote::QuoteContext::brokers | ( | const std::string & | symbol, |
AsyncCallback< QuoteContext, SecurityBrokers > | callback | ||
) | const |
Get security brokers.
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.
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.
void longport::quote::QuoteContext::capital_distribution | ( | const std::string & | symbol, |
AsyncCallback< QuoteContext, CapitalDistributionResponse > | callback | ||
) | const |
Get capital distribution.
void longport::quote::QuoteContext::capital_flow | ( | const std::string & | symbol, |
AsyncCallback< QuoteContext, std::vector< CapitalFlowLine >> | callback | ||
) | const |
Get capital flow intraday.
|
static |
void longport::quote::QuoteContext::create_watchlist_group | ( | const CreateWatchlistGroup & | req, |
AsyncCallback< QuoteContext, int64_t > | callback | ||
) | const |
Create watchlist group.
void longport::quote::QuoteContext::delete_watchlist_group | ( | int64_t | id, |
bool | purge, | ||
AsyncCallback< QuoteContext, void > | callback | ||
) | const |
Delete watchlist group.
void longport::quote::QuoteContext::depth | ( | const std::string & | symbol, |
AsyncCallback< QuoteContext, SecurityDepth > | callback | ||
) | const |
Get security depth.
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.
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.
void longport::quote::QuoteContext::intraday | ( | const std::string & | symbol, |
AsyncCallback< QuoteContext, std::vector< IntradayLine >> | callback | ||
) | const |
Get security intraday lines.
int64_t longport::quote::QuoteContext::member_id | ( | ) |
Returns the member id.
QuoteContext& longport::quote::QuoteContext::operator= | ( | const QuoteContext & | ctx | ) |
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.
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.
void longport::quote::QuoteContext::option_quote | ( | const std::vector< std::string > & | symbols, |
AsyncCallback< QuoteContext, std::vector< OptionQuote >> | callback | ||
) | const |
Get quote of option securities.
void longport::quote::QuoteContext::participants | ( | AsyncCallback< QuoteContext, std::vector< ParticipantInfo >> | callback | ) | const |
Get participants.
void longport::quote::QuoteContext::quote | ( | const std::vector< std::string > & | symbols, |
AsyncCallback< QuoteContext, std::vector< SecurityQuote >> | callback | ||
) | const |
Get quote of securities.
std::string longport::quote::QuoteContext::quote_level | ( | ) | const |
Returns the quote level.
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.
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.
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.
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.
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.
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.
size_t longport::quote::QuoteContext::ref_count | ( | ) | const |
void longport::quote::QuoteContext::security_list | ( | Market | market, |
SecurityListCategory | category, | ||
AsyncCallback< QuoteContext, std::vector< Security >> | callback | ||
) | const |
Get security list.
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.
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.
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.
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.
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.
void longport::quote::QuoteContext::static_info | ( | const std::vector< std::string > & | symbols, |
AsyncCallback< QuoteContext, std::vector< SecurityStaticInfo >> | callback | ||
) | const |
Get basic information of securities.
void longport::quote::QuoteContext::subscribe | ( | const std::vector< std::string > & | symbols, |
SubFlags | sub_flags, | ||
bool | is_first_push, | ||
AsyncCallback< QuoteContext, void > | callback | ||
) | const |
Subscribe.
void longport::quote::QuoteContext::subscribe_candlesticks | ( | const std::string & | symbol, |
Period | period, | ||
AsyncCallback< QuoteContext, void > | callback | ||
) | const |
Subscribe security candlesticks.
void longport::quote::QuoteContext::subscriptions | ( | AsyncCallback< QuoteContext, std::vector< Subscription >> | callback | ) | const |
Get subscription information.
void longport::quote::QuoteContext::trades | ( | const std::string & | symbol, |
uintptr_t | count, | ||
AsyncCallback< QuoteContext, std::vector< Trade >> | callback | ||
) | const |
Get security trades.
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.
void longport::quote::QuoteContext::trading_session | ( | AsyncCallback< QuoteContext, std::vector< MarketTradingSession >> | callback | ) | const |
Get trading session of the day.
void longport::quote::QuoteContext::unsubscribe | ( | const std::vector< std::string > & | symbols, |
SubFlags | sub_flags, | ||
AsyncCallback< QuoteContext, void > | callback | ||
) | const |
Unsubscribe.
void longport::quote::QuoteContext::unsubscribe_candlesticks | ( | const std::string & | symbol, |
Period | period, | ||
AsyncCallback< QuoteContext, void > | callback | ||
) | const |
Unsubscribe security candlesticks.
void longport::quote::QuoteContext::update_watchlist_group | ( | const UpdateWatchlistGroup & | req, |
AsyncCallback< QuoteContext, void > | callback | ||
) | const |
Create watchlist group.
void longport::quote::QuoteContext::warrant_issuers | ( | AsyncCallback< QuoteContext, std::vector< IssuerInfo >> | callback | ) | const |
Get warrant issuers.
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.
void longport::quote::QuoteContext::warrant_quote | ( | const std::vector< std::string > & | symbols, |
AsyncCallback< QuoteContext, std::vector< WarrantQuote >> | callback | ||
) | const |
Get quote of warrant securities.
void longport::quote::QuoteContext::watchlist | ( | AsyncCallback< QuoteContext, std::vector< WatchlistGroup >> | callback | ) | const |
Get watchlist.