Skip to content

The purpose of this project is to fetch the price of BTC/USD from the Alphavantage API everyhour, stores the data in Postgre Database.

Notifications You must be signed in to change notification settings

ankurpython/crypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto Project based on Alphavantage API

This Project is purely based on Pyhon and their webframework Django with Alphavantage API.

The purpose of this project is to fetch the price of BTC/USD from the Alphavantage API everyhour, stores the data in Postgre Database. The API must be secured mean you need to pass an API key to use it. We provided here two Endpoints : GET/api/v1/quotes which returns exchnage rate and POST/api/v1/quotes which triggers force requesting of the price from Alphavantage API. An API Key is required to run this project.

We used here Docker to containerize API and DB. You have to use your Alphavantage APIKEY to run this program.

Please go through the Requirements.txt file:https://github.com/ankurpython/crypto/blob/master/requirements.txt and install all the requirements.

Required

Steps to Run

  1. Download or Clone the Repository: git clone https://github.com/ankurpython/crypto.git
  2. Go to the Dockerfile change the APIKEY to your APIKEY: APIKEY == Your-API-KEY.
  3. Run the container: sudo docker-compose up
  4. Create the superuser using this command Run the: docker exec -it container_id python manage.py createsuperuser
  5. Login with username and password.http://localhost:8000/admin_login. This will return the access token.
  6. Request with Bearer token using this endpoint: http://localhost:8000/api/v1/quotes
  7. For the GET and POST request

Steps to build the Docker(if it's not build)

Build the Docker container by using: docker-compose build

Screenshot

1. Login Page

login

2. Returning all the data through GET request

Screenshot from 2021-10-17 12-23-31

3. Returning the data through POST request

Screenshot from 2021-10-18 10-49-07

Screen Record

screen-capture.mov

Thank You

About

The purpose of this project is to fetch the price of BTC/USD from the Alphavantage API everyhour, stores the data in Postgre Database.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published