Profithook is a non for profit, fun project I built as part of my Web Development Course during Engineering.
It is a REST API that delivers stock market data in real-time. The API uses a web scraper that searches for your favorite stocks, scrapes stock prices and historic data from the web.
To run the Flask Server on your local system, install Python 3 and the required dependencies. To ensure you're running the correct versions, use a virtual environment. Clone the project and run this command in the root directory.
1. Install modules
pip install -r requirements.txt
2. Download Firefox driver i.e. geckodriver for your platform from here and place it in
bin/geckodriver
3. Setup Database
rm stocks.db
python setup.py
4. Start the Flask server
python3 app.py
Below are the API routes for using the service.
/profithook/api/
/profithook/api/search/<query>
Use the stockID provided in the search results to query the stock's information directly.
/profithook/api/<stockID>
Specify daily, monthly or yearly format and then set the duration.
/profithook/api/historic/key=XXX&type=[daily,monthly,yearly]&from=[mm-dd-yy,mm-yy,yy]&to=[mm-dd-yy,mm-yy,yy]'
This project is licensed under the MIT License - see the LICENSE file for details.