Skip to content

REST API for stock data fetched from Money Control using web scrapers

License

Notifications You must be signed in to change notification settings

gaurang8989/api_profithook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Profithook

REST API for Stock Market Data

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.

Getting Started

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

API Routes

Below are the API routes for using the service.

1. Instructions to use the API

/profithook/api/

2. Search a Stock

/profithook/api/search/<query>

3. Get Stock Information

Use the stockID provided in the search results to query the stock's information directly.

/profithook/api/<stockID>

4. Get Historic Data for a Stock

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]'

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

REST API for stock data fetched from Money Control using web scrapers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%