台股機器人,提供即時個股及大盤報價、走勢、新聞、盤後資料等 Telegram bot to query real-time TW stock quotes, charts, news, and other related information
Last updated Apr 23, 2026
75
Stars
14
Forks
1
Issues
0
Stars/day
Attention Score
19
Language breakdown
No language data available.
▸ Files
click to expand
README
tw-stock-telegram-bot
台股機器人,快速取得個股及大盤即時走勢、近期 K 線、相關新聞、盤後資料等,讓你在各種不方便打開充滿高對比紅綠黑看盤軟體的場合 (如擁擠的捷運上或辦公室而且老闆坐你後面) 也能掌握即時報價資訊。
Demo
@twstocktelegram_bot
https://t.me/twstocktelegram_bot
(學術研究開發測試使用,不提供 24/7 不中斷服務,亦不保證資料之正確性)
如何使用
前置作業
請先找到@BotFather 建立新的 Bot 取得 API token,並啟用 inline mode 以及設定 commands (/setcommands)
執行
1.
git clone https://github.com/x3388638/tw-stock-telegram-bot.git
cd tw-stock-telegram-bot
cp config.js.example config.js
將 Bot API token 填入 config.js 中 botToken
2.
npm run build
npm start
或
npm install
npm run dev:watch
Heroku
https://devcenter.heroku.com/articles/container-registry-and-runtime#getting-startedInstall the Heroku CLI
Download and install the Heroku CLI. If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.$ heroku login
Log in to Container Registry
You must have Docker set up locally to continue. You should see output when you run this command.$ docker ps
Now you can sign into Container Registry.
$ heroku container:login
Push your Docker-based app
Build the Dockerfile in the current directory and push the Docker image.$ heroku container:push web
Deploy the changes
Release the newly pushed images to deploy your app.$ heroku container:release web
功能
/start 導覽訊息
/chart 盤中走勢圖
/chart ${stockId} 查詢個股
/chart_tse 查詢上市指數
/chart_toc 查詢櫃買指數
/text 盤中文字報價及五檔
/text ${stockId} 查詢個股
/text_tse 查詢上市指數
/text_otc 查詢櫃買指數
/k 近期 K 線圖
/k ${stockId} 查詢個股
/k_tse 查詢上市指數
/k_otc 查詢櫃買指數
/news 個股新聞
/after_hours 盤後資料
/after_hours ${stockId} 查詢個股盤後資料
/after_hours 查詢其他盤後資料
Inline mode




已知問題
- [ ] 盤後資料的外資買賣超、投信買賣超會失敗
- [ ] K 線圖資料缺漏 (原始資料問題)
- [ ] 開盤前試撮資料顯示問題
LICENSE
MIT🔗 More in this category