Market Data Subscriptions

The tables and examples below use the snake_case field names of Rust callback values. The JSON illustrates fields and values; it does not imply that the prost structs implement serde::Serialize. Ranking indicator values such as changeRate and bigOrder remain server-defined strings.

Subscribe Stock Quotes

Description

Create a market data subscription for real-time stock quotes. The SDK delivers both basic quotes and best bid/offer data as QuoteData.

Parameters

ParameterTypeDescription
symbols&strStock symbols, comma-separated, e.g. "AAPL,TSLA,00700"

Example

// Subscribe to stock quotes
push.subscribe(&SubjectType::Quote, Some("AAPL,TSLA,00700"), None, None);

Cancel Subscription

Call the generic unsubscribe method with the same symbols. See Utility Methods for parameter details.

push.unsubscribe(&SubjectType::Quote, Some("AAPL,TSLA,00700"), None, None);

Callbacks

  • on_quote(QuoteData) — Stock basic quotes and best bid/offer; inspect type for BASIC / BBO

Callback Data Fields

QuoteData (basic quote):

FieldTypeDescription
symbolstringStock symbol
typestringData type: BASIC
timestampstringData timestamp (milliseconds)
server_timestampstringServer push timestamp
avg_pricedoubleAverage price
latest_pricedoubleLatest price
latest_price_timestampstringLatest price timestamp
latest_timestringLatest trade time (readable format)
pre_closedoublePrevious close price
volumestringTrading volume
amountdoubleTrading amount
opendoubleOpen price
highdoubleHigh price
lowdoubleLow price
market_statusstringMarket status, e.g. Trading
hour_trading_tagstringPre/post market tag, e.g. PreMarket (US non-regular hours only)
miobjectMinute K-line snapshot
mi.pdoubleMinute close price
mi.adoubleMinute average price
mi.tstringMinute timestamp
mi.vstringMinute volume
mi.odoubleMinute open price
mi.hdoubleMinute high price
mi.ldoubleMinute low price

QuoteData (best bid/offer):

FieldTypeDescription
symbolstringStock symbol
typestringData type: BBO
timestampstringData timestamp (milliseconds)
ask_pricedoubleBest ask price
ask_sizestringAsk size
ask_timestampstringAsk quote timestamp
bid_pricedoubleBest bid price
bid_sizestringBid size
bid_timestampstringBid quote timestamp

Callback Data Examples

Basic quote (BASIC):

{
    "symbol": "AAPL",
    "type": "BASIC",
    "timestamp": "1684766012120",
    "server_timestamp": "1684766012129",
    "avg_price": 174.1721,
    "latest_price": 174.175,
    "latest_price_timestamp": "1684766011918",
    "latest_time": "05-22 10:33:31 EDT",
    "pre_close": 175.16,
    "volume": "12314802",
    "amount": 2144365591.41,
    "open": 173.98,
    "high": 174.71,
    "low": 173.45,
    "market_status": "Trading",
    "mi": {
        "p": 174.175,
        "a": 174.1721,
        "t": "1684765980000",
        "v": "57641",
        "o": 174.21,
        "h": 174.22,
        "l": 174.14
    }
}

Best bid/offer (BBO):

{
    "symbol": "AAPL",
    "type": "BBO",
    "timestamp": "1676992715509",
    "ask_price": 149.96,
    "ask_size": "200",
    "ask_timestamp": "1676992715367",
    "bid_price": 149.94,
    "bid_size": "700",
    "bid_timestamp": "1676992715367"
}

Subscribe Option Quotes

Description

Create a market data subscription for real-time option quotes (supports US and HK market options). Callback data includes basic quote and best bid/offer types.

Parameters

ParameterTypeDescription
symbols&strOption symbols, comma-separated. Supports two formats: "AAPL 20230317 150.0 CALL" or identifier format "SPY 190508C00290000"

Example

// Subscribe to option quotes
push.subscribe(&SubjectType::Option, Some("AAPL 20230317 150.0 CALL"), None, None);

Cancel Subscription

Call the generic unsubscribe method with the same symbol. See Utility Methods for parameter details.

push.unsubscribe(&SubjectType::Option, Some("AAPL 20230317 150.0 CALL"), None, None);

Callbacks

  • on_option(QuoteData) — Option basic quotes and best bid/offer; inspect type for BASIC / BBO

Callback Data Fields

QuoteData (option basic quote):

FieldTypeDescription
symbolstringOption symbol
typestringData type: BASIC
timestampstringData timestamp (milliseconds)
latest_pricedoubleLatest price
latest_price_timestampstringLatest price timestamp
pre_closedoublePrevious close price
volumestringTrading volume
amountdoubleTrading amount
opendoubleOpen price
highdoubleHigh price
lowdoubleLow price
identifierstringStandard option code (e.g. AAPL 230317C00150000)
open_intstringOpen interest

QuoteData (option best bid/offer):

FieldTypeDescription
symbolstringOption symbol
typestringData type: BBO
timestampstringData timestamp (milliseconds)
ask_pricedoubleBest ask price
ask_sizestringAsk size
ask_timestampstringAsk quote timestamp
bid_pricedoubleBest bid price
bid_sizestringBid size
bid_timestampstringBid quote timestamp

Callback Data Examples

Option basic quote:

{
    "symbol": "AAPL 20230317 150.0 CALL",
    "type": "BASIC",
    "timestamp": "1676994444927",
    "latest_price": 4.83,
    "latest_price_timestamp": "1676994444927",
    "pre_close": 6.21,
    "volume": "3181",
    "amount": 939117.01,
    "open": 4.85,
    "high": 5.6,
    "low": 4.64,
    "identifier": "AAPL  230317C00150000",
    "open_int": "82677"
}

Option BBO:

{
    "symbol": "AAPL 20230317 150.0 CALL",
    "type": "BBO",
    "timestamp": "1676994393156",
    "ask_price": 4.85,
    "ask_size": "11",
    "ask_timestamp": "1676994393156",
    "bid_price": 4.8,
    "bid_size": "992",
    "bid_timestamp": "1676994390931"
}

Subscribe Future Quotes

Description

Create a market data subscription for real-time futures quotes. Callback data includes basic quote and best bid/offer types.

Parameters

ParameterTypeDescription
symbols&strFutures symbols, comma-separated, e.g. "ESmain,ES2609"

Example

// Subscribe to futures quotes
push.subscribe(&SubjectType::Future, Some("ESmain,ES2609"), None, None);

Cancel Subscription

Call the generic unsubscribe method with the same symbols. See Utility Methods for parameter details.

push.unsubscribe(&SubjectType::Future, Some("ESmain,ES2609"), None, None);

Callbacks

  • on_future(QuoteData) — Futures basic quotes and best bid/offer; inspect type for BASIC / BBO

Callback Data Fields

QuoteData (futures basic quote):

FieldTypeDescription
symbolstringFutures symbol
typestringData type: BASIC
timestampstringData timestamp (milliseconds)
avg_pricedoubleAverage price
latest_pricedoubleLatest price
latest_price_timestampstringLatest price timestamp
latest_timestringLatest trade time
pre_closedoublePrevious close price
volumestringTrading volume
opendoubleOpen price
highdoubleHigh price
lowdoubleLow price
market_statusstringMarket status
trade_timestringTrade timestamp
pre_settlementdoublePrevious settlement price
min_tickdoubleMinimum tick size
miobjectMinute K-line snapshot (same fields as stock)

QuoteData (futures best bid/offer): Same fields as stock BBO data.

Callback Data Examples

Futures basic quote:

{
    "symbol": "ESmain",
    "type": "BASIC",
    "timestamp": "1684766824130",
    "avg_price": 4206.476,
    "latest_price": 4202.5,
    "latest_price_timestamp": "1684766824000",
    "latest_time": "05-22 09:47:04 -0500",
    "pre_close": 4204.75,
    "volume": "557570",
    "open": 4189,
    "high": 4221.75,
    "low": 4186.5,
    "market_status": "Trading",
    "trade_time": "1684766824000",
    "pre_settlement": 4204.75,
    "min_tick": 0.25,
    "mi": {
        "p": 4202.25,
        "a": 4206.476,
        "t": "1684766820000",
        "v": "96",
        "o": 4202.25,
        "h": 4202.5,
        "l": 4202.0
    }
}

Futures BBO:

{
    "symbol": "ESmain",
    "type": "BBO",
    "timestamp": "1684766824130",
    "ask_price": 4202.75,
    "ask_size": "70",
    "ask_timestamp": "1684766824129",
    "bid_price": 4202.5,
    "bid_size": "2",
    "bid_timestamp": "1684766824130"
}

Subscribe Crypto Quotes

Description

Create a market data subscription for real-time cryptocurrency quotes. Callback data includes basic quote and best bid/offer types.

Parameters

ParameterTypeDescription
symbols&[&str]Crypto symbol array, e.g. &["BTC.USD", "ETH.USD"]

Example

// Subscribe to crypto quotes
push.subscribe_cc(&["BTC.USD", "ETH.USD"])?;

Cancel Subscription

Call unsubscribe_cc for specific cryptocurrencies, or pass None to cancel all. See Utility Methods for details.

push.unsubscribe_cc(Some(&["BTC.USD", "ETH.USD"]))?;

Callbacks

  • on_quote(QuoteData) — Crypto basic quotes and best bid/offer; inspect type for BASIC / BBO

Callback Data Fields

QuoteData (crypto basic quote):

FieldTypeDescription
symbolstringCrypto symbol, e.g. ETH.USD
typestringData type: BASIC
timestampstringData timestamp (milliseconds)
server_timestampstringServer push timestamp
latest_pricedoubleLatest price
latest_price_timestampstringLatest price timestamp
latest_timestringLatest trade time
pre_closedoublePrevious close price
volume_decimaldoubleTrading volume (decimal precision)
amountdoubleTrading amount
opendoubleOpen price
highdoubleHigh price
lowdoubleLow price
market_statusstringMarket status, e.g. TRADING

QuoteData (crypto best bid/offer):

FieldTypeDescription
symbolstringCrypto symbol
typestringData type: BBO
timestampstringData timestamp (milliseconds)
ask_pricedoubleBest ask price
ask_timestampstringAsk quote timestamp
bid_pricedoubleBest bid price
bid_sizestringBid size
bid_timestampstringBid quote timestamp

Callback Data Examples

Crypto basic quote:

{
    "symbol": "ETH.USD",
    "type": "BASIC",
    "timestamp": "1770041127619",
    "server_timestamp": "1770041127816",
    "latest_price": 2322.97,
    "latest_price_timestamp": "1770041127619",
    "latest_time": "02-02 22:05:27 HKT",
    "pre_close": 2313.05,
    "volume_decimal": 27711.5,
    "amount": 62465538.27,
    "open": 2314.18,
    "high": 2374.87,
    "low": 2156.8,
    "market_status": "TRADING"
}

Crypto BBO:

{
    "symbol": "ETH.USD",
    "type": "BBO",
    "timestamp": "1770041127619",
    "ask_price": 2322.97,
    "ask_timestamp": "1770041127605",
    "bid_price": 2322.95,
    "bid_size": "1",
    "bid_timestamp": "1770041127605"
}

Subscribe to Market Depth

Description

Subscribe to market depth. Supports stocks (US/HK), options (US/HK), and futures. US market depth updates every 300ms, while HK market depth updates every 2s. Each update returns up to 40 levels of order book data (HK has 10 levels).

Parameters

ParameterTypeDescription
symbols&strStock, option, or futures symbols, comma-separated, e.g. "AAPL,ESmain"

Example

// Subscribe to market depth
push.subscribe(&SubjectType::Depth, Some("AAPL,00700"), None, None);

Cancel Subscription

Call the generic unsubscribe method with the same symbols. See Utility Methods for parameter details.

push.unsubscribe(&SubjectType::Depth, Some("AAPL,00700"), None, None);

Callbacks

  • on_depth(QuoteDepthData) — Order book data

Callback Data Fields

QuoteDepthData:

FieldTypeDescription
symbolstringSymbol
timestampstringOrder book timestamp
askobjectAsk (sell) side data
ask.pricedouble[]Price at each level
ask.volumestring[]Volume at each level
ask.orderCountint[]Order count at each level (HK only)
bidobjectBid (buy) side data
bid.pricedouble[]Price at each level
bid.volumestring[]Volume at each level
bid.orderCountint[]Order count at each level (HK only)

Callback Data Examples

US market depth:

{
    "symbol": "AAPL",
    "timestamp": "1676993368405",
    "ask": {
        "price": [149.69, 149.70, 149.71, 149.72, 149.73],
        "volume": ["100", "200", "185", "100", "100"]
    },
    "bid": {
        "price": [149.68, 149.67, 149.66, 149.65, 149.64],
        "volume": ["84", "100", "100", "200", "100"]
    }
}

HK market depth (with order count):

{
    "symbol": "00700",
    "timestamp": "1670465696884",
    "ask": {
        "price": [311.4, 311.6, 311.8, 312.0, 312.2],
        "volume": ["15600", "5700", "16600", "33800", "61100"],
        "orderCount": [16, 13, 19, 79, 39]
    },
    "bid": {
        "price": [311.2, 311.0, 310.8, 310.6, 310.4],
        "volume": ["2300", "8300", "18000", "8800", "7700"],
        "orderCount": [10, 15, 18, 9, 6]
    }
}

Subscribe Trade Ticks

Description

Subscribe to trade ticks for stocks and futures. Trade ticks are pushed every 200ms in snapshot mode, with the latest 50 records in each push. Supports US and HK stocks and futures.

Parameters

ParameterTypeDescription
symbols&strStock or futures symbols, comma-separated, e.g. "AAPL,00700,ESmain"

Example

// Subscribe to trade ticks
push.subscribe(&SubjectType::Tick, Some("AAPL,00700"), None, None);

Cancel Subscription

Call the generic unsubscribe method with the same symbols. See Utility Methods for parameter details.

push.unsubscribe(&SubjectType::Tick, Some("AAPL,00700"), None, None);

Callbacks

  • on_tick(PushTradeTick) — Trade ticks decoded by the SDK

Callback Data Fields

PushTradeTick:

FieldTypeDescription
symbolstringSymbol
sec_typestringSecurity type: STK / FUT
quote_levelstringMarket data access level (e.g. usQuoteBasic, hkStockQuoteLv2)
timestamplongData timestamp
ticksTick[]Trade tick array

Tick:

FieldTypeDescription
snlongTick sequence number
volumelongTrade volume
tick_typestring* neutral, + active buy, - active sell (not available for futures)
pricedoubleTrade price
timelongTrade timestamp
condstringDecoded trade condition; see Trade Tick Conditions
part_codestringExchange code (US stocks only)

Callback Data Examples

US stock trade ticks:

{
    "symbol": "AAPL",
    "sec_type": "STK",
    "quote_level": "usQuoteBasic",
    "timestamp": 1676993925700,
    "ticks": [
        {
            "sn": 116202,
            "volume": 50,
            "tick_type": "*",
            "price": 149.665,
            "time": 1676993924289,
            "cond": "US_REGULAR_SALE"
        },
        {
            "sn": 116203,
            "volume": 1,
            "tick_type": "*",
            "price": 149.68,
            "time": 1676993924459,
            "cond": "US_REGULAR_SALE"
        }
    ]
}

HK stock trade ticks:

{
    "symbol": "00700",
    "sec_type": "STK",
    "quote_level": "hkStockQuoteLv2",
    "timestamp": 1669345639970,
    "ticks": [
        {
            "sn": 35115,
            "volume": 300,
            "tick_type": "+",
            "price": 269.2,
            "time": 1669345639496,
            "cond": "HK_AUTOMATCH_NORMAL"
        },
        {
            "sn": 35116,
            "volume": 200,
            "tick_type": "+",
            "price": 269.2,
            "time": 1669345639610,
            "cond": "HK_AUTOMATCH_NORMAL"
        }
    ]
}

Futures trade ticks:

{
    "symbol": "HSImain",
    "sec_type": "FUT",
    "timestamp": 1669345640575,
    "ticks": [
        {
            "sn": 261560,
            "volume": 1,
            "price": 17465.0,
            "time": 1669345639000
        },
        {
            "sn": 261561,
            "volume": 1,
            "price": 17465.0,
            "time": 1669345639000
        }
    ]
}

Subscribe to Minute Bars

Description

Subscribe to minute-level K-line (candlestick) data for stocks. Supports US and HK market stocks.

Parameters

ParameterTypeDescription
symbols&strStock symbols, comma-separated, e.g. "AAPL,00700"

Example

// Subscribe to minute K-line
push.subscribe(&SubjectType::Kline, Some("AAPL,00700"), None, None);

Cancel Subscription

Call the generic unsubscribe method with the same symbols. See Utility Methods for parameter details.

push.unsubscribe(&SubjectType::Kline, Some("AAPL,00700"), None, None);

Callbacks

  • on_kline(KlineData) — Minute K-line data

Callback Data Fields

KlineData:

FieldTypeDescription
symbolstringStock symbol
timestringMinute timestamp
openfloatOpen price
highfloatHigh price
lowfloatLow price
closefloatClose price
avgfloatAverage price
volumestringTrading volume
countintTrade count
amountdoubleTrading amount
server_timestampstringServer push timestamp

Callback Data Example

{
    "symbol": "AAPL",
    "time": "1712584560000",
    "open": 168.9779,
    "high": 169.0015,
    "low": 168.9752,
    "close": 169.0,
    "avg": 168.778,
    "volume": "3664",
    "count": 114,
    "amount": 617820.6508,
    "server_timestamp": "1712584569746"
}

Subscribe Stock Rankings

Description

Subscribe to stock ranking data. No pushes during non-trading hours. The server runs the ranking push task every 30 seconds; ranking size is configurable and defaults to 10. Supports US and HK markets.

During regular trading hours, all indicators are available. US pre/post market only has changeRate and changeRate5Min.

Parameters

ParameterTypeDescription
market&strMarket code, e.g. "US", "HK"

Example

// Subscribe to US stock rankings
push.subscribe(&SubjectType::StockTop, None, None, Some("US"));

subscribe_market("HK") subscribes to HK whole-market quotes, not stock rankings; only HK is supported.

Cancel Subscription

Call the generic unsubscribe method with SubjectType::StockTop to cancel stock ranking data for a market. See Utility Methods for details.

push.unsubscribe(&SubjectType::StockTop, None, None, Some("US"));

Callbacks

  • on_stock_top(StockTopData) — Stock ranking data

Callback Data Fields

StockTopData:

FieldTypeDescription
marketstringMarket: US / HK
timestampstringTimestamp
top_dataTopData[]Ranking data for each indicator

TopData:

FieldTypeDescription
target_namestringIndicator name: changeRate (daily change), changeRate5Min (5-min change), turnoverRate (turnover rate), amount (trading amount), volume (trading volume), amplitude (amplitude)
itemStockItem[]Ranking list for this indicator

StockItem:

FieldTypeDescription
symbolstringSymbol
latest_pricedoubleLatest price
target_valuedoubleIndicator value

Callback Data Example

{
    "market": "US",
    "timestamp": "1687271010482",
    "top_data": [
        {
            "target_name": "changeRate",
            "item": [
                {"symbol": "ICAD", "latest_price": 1.63, "target_value": 0.393162},
                {"symbol": "DICE", "latest_price": 46.54, "target_value": 0.374889},
                {"symbol": "VCIG", "latest_price": 3.88, "target_value": 0.371025}
            ]
        },
        {
            "target_name": "amount",
            "item": [
                {"symbol": "TSLA", "latest_price": 263.21, "target_value": 10629393179.8},
                {"symbol": "SPY", "latest_price": 435.64, "target_value": 5839415251.67},
                {"symbol": "NVDA", "latest_price": 428.38, "target_value": 5123997584.1}
            ]
        },
        {
            "target_name": "volume",
            "item": [
                {"symbol": "TSLA", "latest_price": 263.21, "target_value": 40190416},
                {"symbol": "NKLA", "latest_price": 1.26, "target_value": 33326008},
                {"symbol": "SQQQ", "latest_price": 19.93, "target_value": 31339556}
            ]
        }
    ]
}

Subscribe Option Rankings

Description

Subscribe to option ranking data. No pushes during non-trading hours. The server runs the ranking push task every 30 seconds; ranking size is configurable and defaults to 10. Supports US market options.

Big orders are defined as single trades with volume > 1000, sorted by trade time descending. Other indicators show cumulative daily values sorted descending.

Parameters

ParameterTypeDescription
market&strMarket code, e.g. "US"

Example

// Subscribe to US option rankings
push.subscribe(&SubjectType::OptionTop, None, None, Some("US"));

Cancel Subscription

Call the generic unsubscribe method with the same market. See Utility Methods for parameter details.

push.unsubscribe(&SubjectType::OptionTop, None, None, Some("US"));

Callbacks

  • on_option_top(OptionTopData) — Option ranking data

Callback Data Fields

OptionTopData:

FieldTypeDescription
marketstringMarket: US
timestampstringTimestamp
top_dataTopData[]Ranking data for each indicator

TopData:

FieldTypeDescription
target_namestringIndicator name: bigOrder (large orders), volume (volume), amount (amount), openInt (open interest)
big_orderBigOrder[]Large order data list (bigOrder indicator only)
itemOptionItem[]Ranking list for this indicator

BigOrder:

FieldTypeDescription
symbolstringStock/ETF symbol
expirystringExpiry date, format: yyyyMMdd
strikestringStrike price
rightstringCALL / PUT
dirstringDirection: Buy / Sell / NONE
volumedoubleTrade volume
pricedoubleTrade price
amountdoubleTrade amount
trade_timelongTrade timestamp

OptionItem:

FieldTypeDescription
symbolstringStock/ETF symbol
expirystringExpiry date, format: yyyyMMdd
strikestringStrike price
rightstringCALL / PUT
total_amountdoubleTotal amount
total_volumedoubleTotal volume
total_open_intdoubleTotal open interest
volume_to_open_intdoubleVolume to open interest ratio
latest_pricedoubleLatest price
update_timestringData update timestamp

Callback Data Example

{
    "market": "US",
    "timestamp": "1687277160445",
    "top_data": [
        {
            "target_name": "volume",
            "item": [
                {
                    "symbol": "SPY",
                    "expiry": "20230620",
                    "strike": "435.0",
                    "right": "PUT",
                    "total_amount": 5394115,
                    "total_volume": 212478,
                    "total_open_int": 16377,
                    "volume_to_open_int": 0.012467,
                    "latest_price": 0.25,
                    "update_time": "1687277254390"
                },
                {
                    "symbol": "SPY",
                    "expiry": "20230620",
                    "strike": "436.0",
                    "right": "PUT",
                    "total_amount": 7754077,
                    "total_volume": 194423,
                    "total_open_int": 13403,
                    "volume_to_open_int": 0.011408,
                    "latest_price": 0.58,
                    "update_time": "1687277213603"
                }
            ]
        },
        {
            "target_name": "bigOrder",
            "big_order": [
                {
                    "symbol": "AMC",
                    "expiry": "20230818",
                    "strike": "10.0",
                    "right": "PUT",
                    "dir": "Buy",
                    "volume": 1000,
                    "price": 6.94,
                    "amount": 694000,
                    "trade_time": 1687276860753
                },
                {
                    "symbol": "AMD",
                    "expiry": "20230818",
                    "strike": "140.0",
                    "right": "CALL",
                    "dir": "Buy",
                    "volume": 1700,
                    "price": 3.25,
                    "amount": 552500,
                    "trade_time": 1687276467421
                }
            ]
        }
    ]
}

Get Subscribed Symbols

Description

Query locally subscribed symbols. Returns a mapping from subject type to symbol list. List order is not guaranteed to be stable.

Example

// Get subscribed symbols
let subscriptions = push.get_subscriptions();
// Returns HashMap<SubjectType, Vec<String>>

Return Value

HashMap<SubjectType, Vec<String>> — Map from subject to locally recorded symbol list.


Utility Methods

subscribe

Generic subscription method. Builds and queues a subscription frame by subject type.

pub fn subscribe(
    &self,
    subject: &SubjectType,
    symbols: Option<&str>,
    account: Option<&str>,
    market: Option<&str>,
) -> bool
ParameterTypeDescription
subject&SubjectTypeSubject type (Quote, Option, Future, Depth, Tick, Kline, StockTop, OptionTop)
symbolsOption<&str>Symbols, comma-separated
accountOption<&str>Account (for trade subscriptions)
marketOption<&str>Market (for ranking subscriptions)

Returns bool: only indicates whether the protocol frame was queued locally, not server acceptance.

unsubscribe

Generic unsubscription method. Same parameter semantics as subscribe.

pub fn unsubscribe(
    &self,
    subject: &SubjectType,
    symbols: Option<&str>,
    account: Option<&str>,
    market: Option<&str>,
) -> bool

subscribe_market

Subscribes to quote updates for the whole Hong Kong market; only HK is supported. The server delivers ongoing per-symbol QuoteData through the ordinary on_quote callback. This is neither a market-status subscription nor a one-time market snapshot or stock-ranking subscription.

pub fn subscribe_market(&self, market: &str) -> Result<(), TigerError>

unsubscribe_market

Unsubscribes from HK whole-market quote updates; only HK is supported.

pub fn unsubscribe_market(&self, market: &str) -> Result<(), TigerError>

subscribe_cc

Subscribe to cryptocurrency quotes.

pub fn subscribe_cc(&self, symbols: &[&str]) -> Result<(), TigerError>

unsubscribe_cc

Unsubscribe from cryptocurrency quotes. symbols=None unsubscribes all crypto.

pub fn unsubscribe_cc(&self, symbols: Option<&[&str]>) -> Result<(), TigerError>

get_subscriptions

Returns a snapshot of local subscription state.

pub fn get_subscriptions(&self) -> HashMap<SubjectType, Vec<String>>

Did this page help you?