Query Stock Quote Information (Batch)
query_symbol_snapshot
info
For version >=2.2.5
tip
This feature is for querying product information such as daily upper and lower price limits and does not include real-time quote updates.
Input Parameters
| Parameter | Account | Description |
|---|---|---|
| account | Account | Account |
| market_type | MarketType (Optional)(default = Common) | Market type: supports Common (regular lot), IntradayOdd (odd lot during trading hours), Fixing (closing auction) |
| stock_types | List StockType (Optional)(default = Stock) | Product category: Stock (stocks), ConvertBond (convertible bonds), ETF_and_ETN (ETFs and ETNs) |
Result
| Parameter | Type | Description |
|---|---|---|
| isSuccess | bool | Whether the request was successful |
| data | List[SymbolQuote] | Returned quote information |
| message | string | Error message when isSuccess = false |
Symbol Information (SymbolQuote Fields)
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| market | str | Markets |
| symbol | str | Symbol |
| istib_or_psb | bool | Whether it is TIB or PSB board |
| market_type | str | Market type |
| status | int | Status (bitmask sum) 0 :All forbidden, 1:Exempted from margin short selling price constraint,2: Exempted from SBL short selling price constraint, 4: Available sale after buy day trading, 8: Available buy after sale day trading |
| reference_price | float | Reference price |
| unit | int | Trading unit |
| update_time | str | Update time |
| limitup_price | float | Upper price limit |
| limitdown_price | float | Lower price limit |
| open_price | float | Opening price |
| high_price | float | Highest price |
| low_price | float | Lowest price |
| last_price | float | Latest traded price |
| total_volume | int | Total traded volume |
| total_transaction | int | Total number of trades (Reserved field, not currently in use) |
| total_value | int | Total traded value |
| last_size | int | Latest traded volume |
| last_transaction | int | Latest number of trades (Reserved field, not currently in use) |
| last_value | int | Latest traded value |
| bid_price | float | Best bid price |
| bid_volume | int | Best bid volume |
| ask_price | float | Best ask price |
| ask_volume | int | Best ask volume |
Supported Products
TAIEX and TAISDAQ securities
info
Status example: status 15 means all four capabilities are enabled (1 + 2 + 4 + 8).
Status 12 means buy-first and sell-first day trading are enabled (4 + 8).
Request Example
from fubon_neo.constant import StockType
sdk.stock.query_symbol_snapshot(accounts.data[0]) #Default
sdk.stock.query_symbol_snapshot(accounts.data[0], MarketType.Common, [StockType.Stock])
Response Example
Result {
is_success: True,
message: None,
data: [ SymbolQuote {
market: "TAIEX", # str - Market
symbol: "2330", # str - Symbol
istib_or_psb: False, # bool - Whether it is TIB or PSB board
market_type: "IntradayOdd", # str - Market type
status: 1, # int - Status (bitmask sum)
reference_price: 780, # float - Reference price
unit: 1, # int - Trading Unit
update_time: "09:09:55.741", # str - Update time
limitup_price: 858, # float - Upper price limit
limitdown_price: 702, # float - Lower price limit
open_price: None, # float | None - Opening price
high_price: None, # float | None - Highest price
low_price: None, # float | None - Lowest price
last_price: None, # float | None - Latest traded price
total_volume: None, # int | None - Total traded volume
total_transaction: 0, # int - Total number of trades (Reserved field, not currently in use)
total_value: None, # float | None - Total traded value
last_size: None, # int | None - Latest traded volume
last_transaction: 0, # int - Latest number of trades (Reserved field, not currently in use)
last_value: 0, # int - Latest traded value
bid_price: 1140, # float - Best bid price
bid_volume: 47975, # int - Best bid volume
ask_price: 1145, # float - Best ask price
ask_volume: 23024, # int - Best ask volume
},
SymbolQuote{
market: "TAIEX", # str - Market
...
},
...
]
}