Git Product home page Git Product logo

twse-price-notify's Introduction

TWSE Price Notify

This small app notifies buy and sell prices of stocks or ETFs in TWSE (台灣證券交易所).

Disclaimer

This app neither guarantees any damage or loss from using it nor recommends any investment. Judge the results generated by the app by yourself.

本程式不擔保因使用本程式所造成的任何損害或損失,也不推薦任何投資。請自行判斷程式輸出的結果。

System Requirements

  • Node.js
  • Your own domain name
  • Mailgun account
  • (Optional) a GNU/Linux VPS

We need Maingun to notify you when target prices are available. Mailgun needs a personal domain name to set a custom mail address.

To run the bot periodically, deploy it at a remote GNU/Linux VPS, invoking it as a cron job.

Install

$ git clone https://github.com/cwchentw/twse-price-notify.git
$ cd twse-price-notify
$ npm install
$ npm run prod
$ npm install -g

Then, twse-price-notify should be available in your console environment.

Usage

Write a .env for environment variables used in this app:

MAILGUN_DOMAIN=example.com
MAILGUN_KEY=enter-mailgun-api-key-here
[email protected]

Write your target prices of stocks or ETFs in a config file. Let's say it is assets.json:

{
    "0050": [75.0, 80.0],
    "0056": [25.0, 27.0]
}

Run this app:

$ twse-price-notify /path/to/assets.json

To invoke the notification bot periodically, write a cron job like this:

5 9-13 * * 1-5 user twse-price-notify assets.json

Copyright

Copyright (c) 2019-2020 Michelle Chen. Licensed under MIT

twse-price-notify's People

Contributors

cwchentw avatar dependabot[bot] avatar opensourcedoc avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.