Please follow below steps to get started with stock-price list APIs
- Clone this respository :
git clone https://github.com/vermaarun/stock-price.git
cd stock-price
- Create virtual environment :
python3 -m venv venv
- Activate virtual environment :
source venv/bin/activate
- Install dependencies :
pip install -r requirements.txt
- Migrate Migrations/Models :
python manage.py migrate
- Run server :
python manage.py runserver
- Put your API KEY(Please, register free account to get API key) in
djangoapi/settings.py
file underAPI_KEY
parameter - Re-start server
- Open browser and execute :
http://127.0.0.1:8000/consume
- Open browser and execute :
http://127.0.0.1:8000/stock-price/
To filter for any company, you can use query-parameter like this : http://127.0.0.1:8000/stock-price?comapny=<company-name>
Note: Supported companies as of now - AAPL, AMZN, GOOG
To filter on basis of date, you can use query-parameter like this : http://127.0.0.1:8000/stock-price?start=<YYYY-MM-DD>&end=<YYYY-MM-DD>