mlouielu / twstock

台灣股市股票價格擷取 (含即時股票資訊) - Taiwan Stock Opendata with realtime
http://twstock.readthedocs.io/
MIT License
1.14k stars 350 forks source link

realtime 的 latest_trade_price 並未顯示查詢時最後的成交價 #107

Open Kazekawa-azusa opened 1 year ago

Kazekawa-azusa commented 1 year ago

能否顯示最後的成交價,而不是 [現在無人成交,顯示 - 。現在有人成交,顯示成交價]

mlouielu commented 5 months ago

Not sure why, but this is the result returned by the API. I tried roughly 20 times on 2330, and it only showed latest_trade_price once.

Kazekawa-azusa commented 1 month ago

I find out why

I've read your code. You use 'http://mis.twse.com.tw/stock/index.jsp' to obtain real-time stock prices; however, the website does not refresh its data rapidly (整股交易的 成交價量及最佳五檔價量資訊揭示 之成交價未即時更新). And during its 'non-refreshing' time, the values are replaced with "-". Therefore, this issue is the limitation of the website.