Louie Lu
Louie Lu
Hi all, I'm currently working on Python reading rocksdb data, and it is relative to this topic. ## Problem I think `TryteString` naming and lack of documentation only confusing Python...
You can use RoundRobinProxy to prevent this issue. hourtest 於 2019年11月27日 週三 09:25 寫道: > 請問這個連線有限制嗎 我要抓全部股票31天內的資訊 > > 抓到中間某之就錯誤 還是其他問題 > > — > You are receiving this because...
你需要先更新你的 codes: https://github.com/mlouielu/twstock#update-codes 更新完成之後再嘗試一次
另外一個問題是,晚上10點的時候不會有即時資料,如果你現在再嘗試一次呢?
Latest price 是正常情況,他是顯示即時撮合的結果而不是最後一筆撮合結果。如果當下沒有撮合,則會顯示 `--`。在台股 ETF 這種交易量偏小的情況下容易發生。 https://mis.twse.com.tw/stock/fibest.jsp?stock=2330 https://mis.twse.com.tw/stock/fibest.jsp?stock=006208
> > Latest price 是正常情況,他是顯示即時撮合的結果而不是最後一筆撮合結果。如果當下沒有撮合,則會顯示 `--`。在台股 ETF 這種交易量偏小的情況下容易發生。 > > https://mis.twse.com.tw/stock/fibest.jsp?stock=2330 https://mis.twse.com.tw/stock/fibest.jsp?stock=006208 > > 看了API我的理解是 realtime的股價request基本市況報導網站的資料 基本市況報導網站又是5秒update一次資料 變成造成沒有最後一筆撮合結果,會顯示 `--` 不知道這樣理解有沒有錯誤 > 對,這是 source 造成的問題 > 另外請問這有辦法如果request當下success == True 但'latest_trade_price': '-'...
> > 另外一個問題是,晚上10點的時候不會有即時資料,如果你現在再嘗試一次呢? > > 我直接heroku上呼叫.py檔 還是無法取的某些特定代碼的資料 .py內容如下 > > ``` > import twstock > app = Flask(__name__) > twstock.__update_codes() > stock_list = np.append(stock_list,str('00878')) > stock_list = stock_list.tolist() > stocks=twstock.realtime.get(stock_list)...
Heruku 的部份,要看 output 是什麼,可能你踩到 query limit 了? 你可以在你自己的電腦上測試看看上面的 code.
你可以提供兩個東西嗎: 1. heroku 上成功的回傳值 2. 在 heroku 上 確認 symbol 是否在 codes 當中: ``` >>> '00878' in twstock.codes True ```
回傳 false 代表 codes 沒有成功更新,所以沒有辦法取得結果。 Update codes 應該會印出東西,他寫了什麼?