Skip to main content

Intraday Quote

Real-time quotes (query by contract symbol)

intraday/quote/{symbol}

Parameters

NameTypeDescription
symbol*stringContract Symbol
sessionstringTrading Session,valid in afterhours overnight market

Response

NameTypeDescription
date*stringDate
type*stringType
exchangestringExchange
symbolstringContract Code
namestringContract Name
previousClosenumberThe closing price of the previous trading day
openPricenumberOpening Price
openTimenumberOpening price transaction time
highPricenumberHighest Trading Price
highTimenumberHighest Trading Price transaction time
lowPricenumberLowest Trading Price
lowTimenumberLowest Trading Price transaction time
closePricenumberClose Price
closeTimenumberClose Price transaction time
avgPricenumberTrading Average Price Today
changenumberLast Trading Price Change(include trial)
changePercentnumberLast Trading price Change Percentage(include trial)
amplitudenumberPrice Range Today
lastPricenumberLast Price(include trial)
lastSizenumberLast Trading Volume(include trial)
totalobjectList
>> tradeVolumenumberAccumulative Trading Volume
>> totalBidMatchnumberTotal Bid Order Count
>> totalAskMatchnumberTotal Ask Order Count
lastTradeobjectList
>> bidnumberLast Trading Bid
>> asknumberLast Trading Ask
>> pricenumberLast Trading Price
>> sizenumberLast Trading Volume
>> timenumberLast Trading Time
>> serialnumberLast Trading Serial Number
lastTrialobjectList (trial match)
>> bidnumberLast Trial Bid
>> asknumberLast Trial Ask
>> pricenumberLast Trial Price
>> sizenumberLast Trial Volume
>> timenumberLast Trial Time
>> serialnumberLast Trial Serial Number
serialnumberSerial Number
lastUpdatednumberLast Updated Time
info

'*' Indicates mandatory disclosure fields.

Trial field

lastTrial reports the last trial-match tick (bidaskpricesizetimeserial) during the pre-market trial matching session. This field is rolled out in stages together with the futures/options advanced market data features; once trial matching ends at market open, the update semantics of its value follow the latest published spec.

Example

from fubon_neo.sdk import FubonSDK, Order

sdk = FubonSDK()

accounts = sdk.login("Your ID", "Your password" , "Your cert path", "Your cert password")

sdk.init_realtime()

restfut = sdk.marketdata.rest_client.futopt
# restfut.intraday.quote(symbol='TXFA4') # Version 2.2.3 and before

## Aftrer version 2.2.4 (use Exception for exception handling)
from fubon_neo.fugle_marketdata.rest.base_rest import FugleAPIError

try:
restfut.intraday.quote(symbol='TXFA4')
except FugleAPIError as e:
print(f"Error: {e}")
print("------------")
print(f"Status Code: {e.status_code}") # Ex: 429
print(f"Response Text: {e.response_text}") # Ex: {"statusCode":429,"message":"Rate limit exceeded"}

Response Body:

{
"date": "2023-12-12",
"type": "FUTURE",
"exchange": "TAIFEX",
"symbol": "TXFA4",
"name": "臺股期貨014",
"previousClose": 17416,
"openPrice": 17514,
"openTime": 1702341900070000,
"highPrice": 17540,
"highTime": 1702342491330000,
"lowPrice": 17427,
"lowTime": 1702355400574000,
"closePrice": 17460,
"closeTime": 1702359886936000,
"avgPrice": 17478.89,
"change": 44,
"changePercent": 0.25,
"amplitude": 0.65,
"lastPrice": 17460,
"lastSize": 1,
"total": {
"tradeVolume": 1626,
"totalBidMatch": 0,
"totalAskMatch": 0
},
"lastTrade": {
"bid": 17459,
"ask": 17460,
"price": 17460,
"size": 1,
"time": 1702359886936000,
"serial": "00165753"
},
"lastTrial": {
"price": 45380,
"size": 1,
"time": 1781506205000000,
"serial": "00000003"
},
"serial": 165753,
"lastUpdated": 1702359886936000
}