Query Stock Quote
query_symbol_quote
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account |
| symbol | String | Stock code |
| market_type | MarketType (Optional)(default = Common) | Market type: supports Common, IntradayOdd, Fixing |
Result Response
| Parameter | Type | Description |
|---|---|---|
| isSuccess | bool | Whether successful |
| data | SymbolQuote | Returned quote information |
| message | string | Error message when isSuccess = False |
SymbolQuote Fields
Return type: Object
| Parameter | Type | Description |
|---|---|---|
| market | string | Market |
| symbol | string | Stock code |
| is_tib_or_psb | bool | Whether TIB or PSB |
| market_type | string | Market type |
| status | int | Status (bitmask) |
| reference_price | double | Reference price |
| unit | string | Trading unit |
| update_time | string | Update time |
| limitup_price | double | Upper limit price |
| limitdown_price | double | Lower limit price |
| open_price | double | Opening price |
| high_price | double | Highest price |
| low_price | double | Lowest price |
| last_price | double | Last traded price |
| total_volume | int | Total volume |
| total_transaction | int | Total transactions |
| total_value | double | Total value |
| last_size | int | Last trade size |
| last_transaction | int | Last transaction count |
| last_value | double | Last trade value |
| bid_price | double | Bid price |
| bid_volume | int | Bid volume |
| ask_price | double | Ask price |
| ask_volume | int | Ask volume |
Request Example
auto query_quote = sdk->stock->query_symbol_quote(target_account,"2330");
Response Example
{
isSuccess = True,
message = ,
data = SymbolQuote{
market = TAIEX,
symbol = 2330,
istibOrPsb = False,
marketType = Common,
status = 15,
referencePrice = 780,
unit = 1000,
updateTime = ,
limitupPrice = 858,
limitdownPrice = 702,
openPrice = 1155,
highPrice = 1160,
lowPrice = 1145,
lastPrice = 1145,
totalVolume = 20501,
totalTransaction = 0,
totalValue = 23551095000,
lastSize = 6673,
lastTransaction = 0,
lastValue = 7640585000,
bidPrice = 1145,
bidVolume = 1549,
askPrice = 1150,
askVolume = 4169
}
}