Query Stock Quote Information (Single)
query_symbol_quote
info
For version >=2.2.5
Input Parameters
Parameter | Type | Description |
---|---|---|
account | Account | Account |
symbol | String | Symbol |
market_type | MarketType (Optional)(default = Common) | Market type: supports Common (regular lot), IntradayOdd (odd lot during trading hours), Fixing (closing auction) |
Result
Parameter | Type | Description |
---|---|---|
isSuccess | bool | Whether the request was successful |
data | SymbolQuote | Returned quote information |
message | string | Error message when isSuccess = false |
Symbol Information (SymbolQuote Fields)
Return type : Object
Parameter | Type | Description |
---|---|---|
market | str | Market |
symbol | str | Symbol |
is_tib_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 |
total_value | float | Total traded value |
last_size | int | Latest traded volume |
last_transaction | int | Latest number of trades |
last_value | float | 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 : if Status = 15 : It represnet there is no constraint for this symbol ,15 eqauls 1+2+4+8 break down; if Status = 12 ,it represnet 4 + 8 break down。
Request Example
sdk.stock.query_symbol_quote(accounts.data[0],"2330", MarketType.IntradayOdd )
Response Example
Result {
is_success: True,
message: None,
data: SymbolQuote {
market: "TAIEX", # str - Market
symbol: "2330", # str - Symbol
is_tib_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
total_value: None, # float | None - Total traded value
last_size: None, # int | None - Latest traded volume
last_transaction: 0, # int - Latest number of trades
last_value: 0, # float - 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
}
}