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 |
|---|---|---|
| is_success | bool | Whether successful |
| data | SymbolQuote | Returned quote information |
| message | string | Error message when is_success = 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(account,"2330");
Response Example
{
is_success = True,
message = ,
data = SymbolQuote{
market = TAIEX,
symbol = 2330,
istib_or_psb = False,
market_type = Common,
status = 15,
reference_price = 780,
unit = 1000,
update_time = ,
limitup_price = 858,
limitdown_price = 702,
open_price = 1155,
high_price = 1160,
low_price = 1145,
last_price = 1145,
total_volume = 20501,
total_transaction = 0,
total_value = 23551095000,
last_size = 6673,
last_transaction = 0,
last_value = 7640585000,
bid_price = 1145,
bid_volume = 1549,
ask_price = 1150,
ask_volume = 4169
}
}