Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cwchentw/twse-price-notify
- Owner: cwchentw
- Created: 2019-11-13T02:56:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-03T01:36:11.000Z (over 3 years ago)
- Last Synced: 2024-11-17T04:36:07.603Z (3 months ago)
- Topics: notification, puppeteer, twse, twstock
- Language: JavaScript
- Size: 340 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 VPSWe 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)