查詢上櫃公司當日股價,並透過 mandrillapp.com SendGrid 送出郵件通知
- Install
npm install -g stockjs
- Get a SendGrid api key Link
- Config your crontab
FROM_EMAIL=shih@yulun.me \
TO=xxx@mail.com,yyy@mail.com \
SENDGRID_API_KEY=YOUR_KEY \
stockjs
.stock.getTodayPrice(stockCode[, callback(stackObj)])
.sendmail(stockObject, config[, callback(err, result)])
- Multiple stocks at once
- Customize mail theme
- Using more generic api to get price
- ...
MIT