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
| Parameter | Type | Description |
|---|---|---|
| symbols | &str | Stock 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; inspecttypeforBASIC/BBO
Callback Data Fields
QuoteData (basic quote):
| Field | Type | Description |
|---|---|---|
| symbol | string | Stock symbol |
| type | string | Data type: BASIC |
| timestamp | string | Data timestamp (milliseconds) |
| server_timestamp | string | Server push timestamp |
| avg_price | double | Average price |
| latest_price | double | Latest price |
| latest_price_timestamp | string | Latest price timestamp |
| latest_time | string | Latest trade time (readable format) |
| pre_close | double | Previous close price |
| volume | string | Trading volume |
| amount | double | Trading amount |
| open | double | Open price |
| high | double | High price |
| low | double | Low price |
| market_status | string | Market status, e.g. Trading |
| hour_trading_tag | string | Pre/post market tag, e.g. PreMarket (US non-regular hours only) |
| mi | object | Minute K-line snapshot |
| mi.p | double | Minute close price |
| mi.a | double | Minute average price |
| mi.t | string | Minute timestamp |
| mi.v | string | Minute volume |
| mi.o | double | Minute open price |
| mi.h | double | Minute high price |
| mi.l | double | Minute low price |
QuoteData (best bid/offer):
| Field | Type | Description |
|---|---|---|
| symbol | string | Stock symbol |
| type | string | Data type: BBO |
| timestamp | string | Data timestamp (milliseconds) |
| ask_price | double | Best ask price |
| ask_size | string | Ask size |
| ask_timestamp | string | Ask quote timestamp |
| bid_price | double | Best bid price |
| bid_size | string | Bid size |
| bid_timestamp | string | Bid 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
| Parameter | Type | Description |
|---|---|---|
| symbols | &str | Option 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; inspecttypeforBASIC/BBO
Callback Data Fields
QuoteData (option basic quote):
| Field | Type | Description |
|---|---|---|
| symbol | string | Option symbol |
| type | string | Data type: BASIC |
| timestamp | string | Data timestamp (milliseconds) |
| latest_price | double | Latest price |
| latest_price_timestamp | string | Latest price timestamp |
| pre_close | double | Previous close price |
| volume | string | Trading volume |
| amount | double | Trading amount |
| open | double | Open price |
| high | double | High price |
| low | double | Low price |
| identifier | string | Standard option code (e.g. AAPL 230317C00150000) |
| open_int | string | Open interest |
QuoteData (option best bid/offer):
| Field | Type | Description |
|---|---|---|
| symbol | string | Option symbol |
| type | string | Data type: BBO |
| timestamp | string | Data timestamp (milliseconds) |
| ask_price | double | Best ask price |
| ask_size | string | Ask size |
| ask_timestamp | string | Ask quote timestamp |
| bid_price | double | Best bid price |
| bid_size | string | Bid size |
| bid_timestamp | string | Bid 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
| Parameter | Type | Description |
|---|---|---|
| symbols | &str | Futures 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; inspecttypeforBASIC/BBO
Callback Data Fields
QuoteData (futures basic quote):
| Field | Type | Description |
|---|---|---|
| symbol | string | Futures symbol |
| type | string | Data type: BASIC |
| timestamp | string | Data timestamp (milliseconds) |
| avg_price | double | Average price |
| latest_price | double | Latest price |
| latest_price_timestamp | string | Latest price timestamp |
| latest_time | string | Latest trade time |
| pre_close | double | Previous close price |
| volume | string | Trading volume |
| open | double | Open price |
| high | double | High price |
| low | double | Low price |
| market_status | string | Market status |
| trade_time | string | Trade timestamp |
| pre_settlement | double | Previous settlement price |
| min_tick | double | Minimum tick size |
| mi | object | Minute 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
| Parameter | Type | Description |
|---|---|---|
| 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; inspecttypeforBASIC/BBO
Callback Data Fields
QuoteData (crypto basic quote):
| Field | Type | Description |
|---|---|---|
| symbol | string | Crypto symbol, e.g. ETH.USD |
| type | string | Data type: BASIC |
| timestamp | string | Data timestamp (milliseconds) |
| server_timestamp | string | Server push timestamp |
| latest_price | double | Latest price |
| latest_price_timestamp | string | Latest price timestamp |
| latest_time | string | Latest trade time |
| pre_close | double | Previous close price |
| volume_decimal | double | Trading volume (decimal precision) |
| amount | double | Trading amount |
| open | double | Open price |
| high | double | High price |
| low | double | Low price |
| market_status | string | Market status, e.g. TRADING |
QuoteData (crypto best bid/offer):
| Field | Type | Description |
|---|---|---|
| symbol | string | Crypto symbol |
| type | string | Data type: BBO |
| timestamp | string | Data timestamp (milliseconds) |
| ask_price | double | Best ask price |
| ask_timestamp | string | Ask quote timestamp |
| bid_price | double | Best bid price |
| bid_size | string | Bid size |
| bid_timestamp | string | Bid 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
| Parameter | Type | Description |
|---|---|---|
| symbols | &str | Stock, 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:
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol |
| timestamp | string | Order book timestamp |
| ask | object | Ask (sell) side data |
| ask.price | double[] | Price at each level |
| ask.volume | string[] | Volume at each level |
| ask.orderCount | int[] | Order count at each level (HK only) |
| bid | object | Bid (buy) side data |
| bid.price | double[] | Price at each level |
| bid.volume | string[] | Volume at each level |
| bid.orderCount | int[] | 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
| Parameter | Type | Description |
|---|---|---|
| symbols | &str | Stock 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:
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol |
| sec_type | string | Security type: STK / FUT |
| quote_level | string | Market data access level (e.g. usQuoteBasic, hkStockQuoteLv2) |
| timestamp | long | Data timestamp |
| ticks | Tick[] | Trade tick array |
Tick:
| Field | Type | Description |
|---|---|---|
| sn | long | Tick sequence number |
| volume | long | Trade volume |
| tick_type | string | * neutral, + active buy, - active sell (not available for futures) |
| price | double | Trade price |
| time | long | Trade timestamp |
| cond | string | Decoded trade condition; see Trade Tick Conditions |
| part_code | string | Exchange 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
| Parameter | Type | Description |
|---|---|---|
| symbols | &str | Stock 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:
| Field | Type | Description |
|---|---|---|
| symbol | string | Stock symbol |
| time | string | Minute timestamp |
| open | float | Open price |
| high | float | High price |
| low | float | Low price |
| close | float | Close price |
| avg | float | Average price |
| volume | string | Trading volume |
| count | int | Trade count |
| amount | double | Trading amount |
| server_timestamp | string | Server 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
| Parameter | Type | Description |
|---|---|---|
| market | &str | Market 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:
| Field | Type | Description |
|---|---|---|
| market | string | Market: US / HK |
| timestamp | string | Timestamp |
| top_data | TopData[] | Ranking data for each indicator |
TopData:
| Field | Type | Description |
|---|---|---|
| target_name | string | Indicator name: changeRate (daily change), changeRate5Min (5-min change), turnoverRate (turnover rate), amount (trading amount), volume (trading volume), amplitude (amplitude) |
| item | StockItem[] | Ranking list for this indicator |
StockItem:
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol |
| latest_price | double | Latest price |
| target_value | double | Indicator 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
| Parameter | Type | Description |
|---|---|---|
| market | &str | Market 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:
| Field | Type | Description |
|---|---|---|
| market | string | Market: US |
| timestamp | string | Timestamp |
| top_data | TopData[] | Ranking data for each indicator |
TopData:
| Field | Type | Description |
|---|---|---|
| target_name | string | Indicator name: bigOrder (large orders), volume (volume), amount (amount), openInt (open interest) |
| big_order | BigOrder[] | Large order data list (bigOrder indicator only) |
| item | OptionItem[] | Ranking list for this indicator |
BigOrder:
| Field | Type | Description |
|---|---|---|
| symbol | string | Stock/ETF symbol |
| expiry | string | Expiry date, format: yyyyMMdd |
| strike | string | Strike price |
| right | string | CALL / PUT |
| dir | string | Direction: Buy / Sell / NONE |
| volume | double | Trade volume |
| price | double | Trade price |
| amount | double | Trade amount |
| trade_time | long | Trade timestamp |
OptionItem:
| Field | Type | Description |
|---|---|---|
| symbol | string | Stock/ETF symbol |
| expiry | string | Expiry date, format: yyyyMMdd |
| strike | string | Strike price |
| right | string | CALL / PUT |
| total_amount | double | Total amount |
| total_volume | double | Total volume |
| total_open_int | double | Total open interest |
| volume_to_open_int | double | Volume to open interest ratio |
| latest_price | double | Latest price |
| update_time | string | Data 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
subscribeGeneric 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| Parameter | Type | Description |
|---|---|---|
| subject | &SubjectType | Subject type (Quote, Option, Future, Depth, Tick, Kline, StockTop, OptionTop) |
| symbols | Option<&str> | Symbols, comma-separated |
| account | Option<&str> | Account (for trade subscriptions) |
| market | Option<&str> | Market (for ranking subscriptions) |
Returns bool: only indicates whether the protocol frame was queued locally, not server acceptance.
unsubscribe
unsubscribeGeneric unsubscription method. Same parameter semantics as subscribe.
pub fn unsubscribe(
&self,
subject: &SubjectType,
symbols: Option<&str>,
account: Option<&str>,
market: Option<&str>,
) -> boolsubscribe_market
subscribe_marketSubscribes 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
unsubscribe_marketUnsubscribes from HK whole-market quote updates; only HK is supported.
pub fn unsubscribe_market(&self, market: &str) -> Result<(), TigerError>subscribe_cc
subscribe_ccSubscribe to cryptocurrency quotes.
pub fn subscribe_cc(&self, symbols: &[&str]) -> Result<(), TigerError>unsubscribe_cc
unsubscribe_ccUnsubscribe from cryptocurrency quotes. symbols=None unsubscribes all crypto.
pub fn unsubscribe_cc(&self, symbols: Option<&[&str]>) -> Result<(), TigerError>get_subscriptions
get_subscriptionsReturns a snapshot of local subscription state.
pub fn get_subscriptions(&self) -> HashMap<SubjectType, Vec<String>>Updated about 1 month ago
