Query Symbol Quote (Single)
query_symbol_quote
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account |
| symbol | String | Stock Symbol |
| market_type | MarketType (Optional)(default = Common) | Market Type: Supports Common (Regular Stock), IntradayOdd (Intraday Odd Lot), Fixing (Fixing) |
Result Return
| Parameter | Type | Description |
|---|---|---|
| isSuccess | bool | Whether successful |
| data | SymbolQuote | Returns quote information |
| message | string | Returns error message when isSuccess : false |
Symbol Information SymbolQuote Fields
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| Market | *string | Market |
| Symbol | *string | Stock Symbol |
| IsTibOrPsb | *bool | Whether it is TIB (Taiwan Innovation Board) or PSB (Pioneer Stock Board) |
| MarketType | *string | Market Type |
| Status | *int64 | Status (bitmask sum): 0: All Disabled, 1: Short selling allowed below flat, 2: SBL selling allowed below flat, 4: Day trade allowed (Buy then Sell), 8: Day trade allowed (Sell then Buy) |
| ReferencePrice | *string | Reference Price |
| Unit | *int64 | Trading Unit |
| UpdateTime | *string | Update Time |
| LimitupPrice | *string | Limit Up Price |
| LimitdownPrice | *string | Limit Down Price |
| OpenPrice | *string | Open Price |
| HighPrice | *string | High Price |
| LowPrice | *string | Low Price |
| LastPrice | *string | Last Price |
| TotalVolume | *int64 | Total Volume |
| TotalTransaction | *int64 | Total Transactions |
| TotalValue | *string | Total Value |
| LastSize | *int64 | Last Size |
| LastTransaction | *int64 | Last Transaction Count |
| LastValue | *string | Last Value |
| BidPrice | *string | Bid 1 Price |
| BidVolume | *int64 | Bid 1 Volume |
| AskPrice | *string | Ask 1 Price |
| AskVolume | *int64 | Ask 1 Volume |
Supported Scope
Listed and OTC securities
info
Status Example Explanation: If Status = 15, it is the decomposition of 1 (Short selling allowed below flat) + 2 (SBL selling allowed below flat) + 4 (Day trade buy-sell) + 8 (Day trade sell-buy). If Status = 3, it is 1 + 2. Others follow the same logic.
Request Example
quote, err := sdk.Stock.QuerySymbolQuote(account, "2330", nil)
if err != nil {
fmt.Printf("❌ Quote Format/Parse Error: %v (Type: %T)\n", err, err)
} else {
s, _ := json.MarshalIndent(quote, "", " ")
fmt.Println("Quote Data ", string(s))
}
Response Example
{
isSuccess : true,
message : ,
data : SymbolQuote{
market : TAIEX, // string - Market
symbol : 2330, // string - Stock Symbol
istibOrPsb : false, // bool - Whether TIB or PSB
marketType : Common, // string - Market Type (Common Stock)
status : 15, // int - Status (bitmask sum: 1+2+4+8 : Short sell + SBL sell + Day trade buy-sell + Day trade sell-buy)
referencePrice : 780, // double - Reference Price (Previous close)
unit : 1000, // int - Trading Unit
updateTime : , // string - Update Time
limitupPrice : 858, // double - Limit Up Price
limitdownPrice : 702, // double - Limit Down Price
openPrice : 1155, // double - Open Price
highPrice : 1160, // double - High Price
lowPrice : 1145, // double - Low Price
lastPrice : 1145, // double - Last Price
totalVolume : 20501, // int - Total Volume
totalTransaction : 0, // int - Total Transactions
totalValue : 23551095000, // int - Total Value
lastSize : 6673, // int - Last Size
lastTransaction : 0, // int - Last Transaction Count
lastValue : 7640585000, // int - Last Value
bidPrice : 1145, // double - Bid 1 Price
bidVolume : 1549, // int - Bid 1 Volume
askPrice : 1150, // double - Ask 1 Price
askVolume : 4169 // int - Ask 1 Volume
}
}