Git Product home page Git Product logo

etf-line-bot's Introduction

📈 ETF-Line-Bot

Deploy Status Health Status


ETF-Line-Bot 為一款可以即時查詢國內所有 ETF 股票即時淨值的 LINE Bot,提供使用快速掌握 ETF 股票的即時淨值資訊(5 分鐘更新),也可自行設定自選股,讓你輕鬆得知自己關注的 ETF 標的!

本專案僅為個人為了面試所開發的,沒有任何的營利目的,資料來源自TWSE 臺灣證券交易所,對於任何因數據錯誤,資料不正確所引起的任何損失,概不負責,投資一定有風險,股票投資有賺有賠,申購前應詳閱公開說明書!

功能

  • 📈 查詢台灣股市目前上市上櫃的所有 ETF,目前約 227 檔。
  • 🏦 查詢各大投信所發行的 ETF 股票。
  • 🔍 ETF 股票代號查詢,輸入股票代號即可查詢。
  • 🔖 ETF 自選股標的的新增或刪除,最多可以儲存 25 檔。

Demo

新增為 LINE 好友: https://line.me/R/ti/p/@623wmicb

QR Code:

QR Code

專案目錄

.
├── assets                      # LINE Bot 所使用到的圖檔素材
├── controllers
|   ├── follow.controller.js    # 處理 follow 回應事件的判斷流程
|   ├── message.controller.js   # 處理 message 回應事件的判斷流程
|   └── postback.controller.js  # 處理 postback 回應事件的判斷流程
├── database
|   ├── mongodb.js              # Mongo DB 連線處理
|   └── user.js                 # Mongo DB User Collection Schema
├── services
|   └── etf.js                  # 爬取 ETF 資料
├── utils
|   ├── investmentTrustList.js  # 投信清單資料
|   └── messageTemplate.js      # Flex Message 訊息樣板
├── package-lock.json           # NPM 套件版本
├── package.json                # NPM 套件版本
├── app.js                      # 主程式
└── README.md                   # 說明文件

開發

下載

$ git clone [email protected]:stu01509/ETF-Line-Bot.git
$ cd ETF-Line-Bot
$ yarn

環境變數設定

請在當前目錄下新增一個 .env 檔案,內容可以照這 .env.example 進行修改。

channelId = YOUR_CHANNEL_ID                     # LINE CHANNEL ID
channelSecret = YOUR_CHANNEL_SECRET             # LINE CHANNEL SECRET
channelAccessToken = YOUR_CHANNEL_ACCESS_TOKEN  # LINE CHANNEL ACCESS TOKEN
PORT = SERVER_LISTEN_PORT                       # Server 監聽埠號
DB_SSL = USE_SSL_PROTOCOL_TO_CONNECT_DB         # MongoDB 是否使用 SSL 連線 true/false
DB_PATH = DB_ADDRESS                            # MongoDB 連線位置

啟動

$ yarn start

Start

etf-line-bot's People

Contributors

stu01509 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

linrbaba

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.