Giter VIP home page Giter VIP logo

x3388638 / tw-stock-telegram-bot Goto Github PK

View Code? Open in Web Editor NEW
58.0 2.0 10.0 264 KB

台股機器人,提供即時個股及大盤報價、走勢、新聞、盤後資料等 Telegram bot to query real-time TW stock quotes, charts, news, and other related information

License: MIT License

JavaScript 98.79% Dockerfile 1.21%
telegram-bot stock puppeteer crawler yahoo-finance node-telegram-bot-api starter docker

tw-stock-telegram-bot's Introduction

tw-stock-telegram-bot

台股機器人,快速取得個股及大盤即時走勢、近期 K 線、相關新聞、盤後資料等,讓你在各種不方便打開充滿高對比紅綠黑看盤軟體的場合 (如擁擠的捷運上或辦公室而且老闆坐你後面) 也能掌握即時報價資訊。

Demo

@tw_stock_telegram_bot
https://t.me/tw_stock_telegram_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-started

Install 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

tw-stock-telegram-bot's People

Contributors

x3388638 avatar zxp86021 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tw-stock-telegram-bot's Issues

想詢問詳細步驟

請問一下前置作業是需要開啟bot father,輸入自己的api才能使用嗎?走完步驟1跟2之後後面的步驟還需要繼續做嗎?不好意思我是完全新手,不知道如何操作,是否有螢幕錄影操作可以供參考

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.