Skip to content

台灣股市股票價格擷取 (含即時股票資訊) - Taiwan Stock Opendata with realtime

License

Notifications You must be signed in to change notification settings

mlouielu/twstock

Repository files navigation

GitHub Actions Status Coverage Status PyPI version Documentation Status

有任何問題歡迎透過 Gitter.im 詢問。

twstock 台灣股市股票價格擷取

擷取台灣證券交易所之股價資料 重新製作 toomore/grs 之功能

資料來源:

(請注意,TWSE 有 request limit, 每 5 秒鐘 3 個 request,超過的話會被 ban 掉,請自行注意)

Documentation

Requirements

  • Python 3
  • lxml
  • requests

Install

By PyPi

$ python -m pip install --user twstock

By Source

$ git clone https://github.com/mlouielu/twstock
$ cd twstock
$ pipenv install

By Source & install

$ git clone https://github.com/mlouielu/twstock
$ cd twstock
$ python -m pip install --user flit
$ flit install

CLI Tools

$ twstock -b 2330 6223
四大買賣點判斷 Best Four Point
------------------------------
2330: Buy   量大收紅
6223: Sell  量縮價跌, 三日均價小於六日均價
$ twstock -s 2330 6223
-------------- 2330 ----------------
high : 215.0 214.0 210.0 210.5 208.5
low  : 212.0 211.0 208.0 208.5 206.5
price: 215.0 211.5 208.5 210.0 208.5
-------------- 2337 ----------------
high :  16.2  16.8  16.4 16.75 16.75
low  :  15.8  16.1 15.15  16.