Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cwchentw/twse-price-notify

Notifications for stocks and ETFs in TWSE
https://github.com/cwchentw/twse-price-notify

notification puppeteer twse twstock

Last synced: 17 days ago
JSON representation

Notifications for stocks and ETFs in TWSE

Awesome Lists containing this project

README

        

# 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

```console
$ 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](https://opensource.org/licenses/MIT)