Skip to content

It is a API based program for fetching the price of Bitcoin in real time and every time the price of bitcoin is fetched it is stored in a database table and you can get the list of Bitcoin prices with timestamps with pagination, of 10 items per page by an API.

Notifications You must be signed in to change notification settings

naveen723658/BitcoinAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitcoinAPI

It is a API based program for fetching the price of Bitcoin in real time and every time the price of bitcoin is fetched it is stored in a database table and you can get the list of Bitcoin prices with timestamps with pagination, of 10 items per page by an API.

image

#####################################################

Getting Bitcoin Prices using Python Django

A Django project which uses requests package to hit api and get the Bitcoin prices and save it to database and display the prices with timestamp in json farmat

hit this url to get the Bitcoin Prices <your_localhost>/bitcoinfatch/

for getting the list of bitcoin prices first you need to login

image

after that use this url to get the json file for bitcoin prices <your_localhost>/bitcoin/?format=json&page=N

where N is 1,2,3...

for logout use <your_localhost>/logout/

###############################################

How to deploy on your local machine

  • clone the repo.

  • create a virtual environment. Activate it

  • Install the dependecies from req.txt file using pip install -r req.txt command

  • go to project directory where manage.py file

  • you need to run migration first

-python manage.py makemigration

-python manage.py migrate

  • run using python manage.py runserver

  • Start the server. Go to

###################################################

About

It is a API based program for fetching the price of Bitcoin in real time and every time the price of bitcoin is fetched it is stored in a database table and you can get the list of Bitcoin prices with timestamps with pagination, of 10 items per page by an API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •