View Code? Open in Web Editor
NEW
Yuanta Quote API using Python.
License: MIT License
Python 99.80%
Shell 0.20%
yuantaapi-python's Introduction
Yuanda Quote API using Python
- 這是使用 Python 串接元大行情 API 的程式。
- 這份程式碼修改自 這篇文章,請各位一定要去按個讚!
- 啟動程式後,會將行情資料記錄成 csv 檔。
- 支援股票、期貨和選擇權商品。
- 自動切換日夜盤。
- 自動更新選擇權商品代碼。
- OS: Windows 10 x64 1903
- Python Version: 3.6 x86
- 必須使用 x86 版本的 Python 才能正常運作。
- 安裝元大行情 API,請參考 這篇文章。
- 安裝 Python 環境:
pip install -r requirements.txt
$ python quote.py [-h] [-v VERBOSE]
-h, --help
- 顯示說明訊息。
-v, --verbose
- 設定 Log 檔的 Logging Level,請參考 Severity Levels。
--no-option
- 選擇不要接收選擇權的行情
- 使用 80 或 443 為日盤的行情。
- 使用 82 或 442 為夜盤的行情。
do_compress.py
log_cls.py
quote.py
retrieve_file.py
std_analysis.py
switch_battery_plan.py
utils.py
ping.sh
- 執行 Ping 元大行情主機的指令。
- 必須使用 Bash 執行。
- 選擇權商品的部分並不算太完整,目前只有針對個人需求抓取台指的部分。
- 元大 API 會在連接伺服器的時候自動產生一個
Logs\event.log
的檔案,會將使用者的帳密以明碼的方式寫入,程式執行結束時請務必手動刪除這個檔案。
- 本系統會每隔五分鐘清除一次這個資料夾下的檔案
- 也可以手動執行
log_cls.py
這個程式來清除
yuantaapi-python's People
Contributors