- Create an .env file containing the ff variables: SECRET_KEY ALLOWED_HOSTS IS_DEBUG
- Create a superuser account using pipenv run manage createsuperuser
- Create a stock using the admin.
- Retrieve a jwt token through the token obtain endpoint ('/api/token/')
- requires username and password posted
- Retrieve the stock through the retrieve endpoint ('/api/stocks/')
- Create an order using the URL of the stock of your choice and set the quantity
- required payload : { 'stock': <stock_url>, 'quantity': <quantitiy_of_the_order> }
- Retrieve orders related to the stock by filtering it using the stock__id filter
- '/api/orders/?stock__id=<STOCK_ID>'
- Retrieve the total_investment using the total_investment endpoint
- 'api/orders/total_investment'
- you can filter out the total_investment per stock using the stock__id filter.
-
Notifications
You must be signed in to change notification settings - Fork 0
ricksore/exam
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published