Tiny personal script to grab stock buy/sell momentum data of Hong Kong stocks from DB Power. Only Hong Kong stocks data are available.
Please note that it's a personal project. While I will try my best to show how to configure the script, there is a good chance some custom config isn't listed. Please start new issues for problem experieced. Thanks.
The scripts has 2 parts:
- Cron scripts to grab data from DBPower
- Simple Flask web app to display data on local machine
- Python 3
- packages listed in ./requirements.txt
- wget
- SQLite
To install the crontab, please make sure the correct virtualenv path is included. Please refer to this post for a proper setup.
Daily script is located at package root named dailyscript.py. However a shell script daily.sh is created along with it for a easier cron job setup. Please make sure to edit the paths in daily.sh to get it work.
Default daily webpage grab are stored in:
./mickey/powerticker/
with name %Y%m%d.html
Default SQLite database path is:
./master.db
Please edit in config.py to change it.
There are two config files for minimal Gunicorn + Ngnix setup for reference, they are located at:
./mickey/scripts/mickey_gunicorn.conf # Gunicorn config
./mickey/scripts/mickey_nginx.conf # Nginx config
Please note that ./weeklyscript.py was never implemented.
- Flask - The web framework used
- Bootstrap - HTML frontend library
- SQLAlchemy - Database toolkit
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Henry Fong - Initial work - foongsy
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used
- Inspiration
- etc