Home

Awesome

Project Title: CryptoViZ

Team Members: Mohan Vashist, Mrigank Mehta

Demo Video URL: https://youtu.be/ZdXBcqWCirI

Tech Stack

Description

We created a specialized application to view crypto currency data. Currently you can view data for the Binance exchange, due to the fact that it is the largest crypto currency exchange (in terms of volume traded per day). However, it can easily be modified for other Exchanges. Additionally, our application has integration with the Trading View charting library.

How to run the application

For the backend:

Create a new virtual enviroment

cd backend
python3 -m venv env
source env/bin/activate

Install dependencies

pip3 install -r requirements.txt

Run the backend

uvicorn main:app --reload

Place you mongodb url and secret key in a file called .env in the same direcotry as main.py

DATABASE_URL=......
SECRET=......

How to run the frontend

cd frontend/cryptoviz
npm i
npm run dev

Optional

If you have access to the TradingView Charting Library add the chrating library and datafeed folders from it to src/public, and the charting library to src. Then add the component from https://github.com/tradingview/charting-library-examples/tree/master/react-javascript/src/components/TVChartContainer to src in a directory call components

Screenshots

https://imgur.com/a/lsNaTgv

REST API Documentation

Authentication API

Create

$ curl -X POST
       -H "accept: application/json"
       -H "Content-Type: application/json"
       -d '{"email":"example@example.com","password":"password","first_name":"example","last_name":"example"}'
       localhost:8000/api/users/register
$ curl -X POST
       -c cookie.txt
       -H "accept: application/json"
       -H "Content-Type: application/x-www-form-urlencoded"
       -d "username=example@example.com&password=password"
       localhost:8000/api/users/login/cookie
$ curl -X POST
       -b cookie.txt
       -c cookie.txt
       localhost:8000/api/users/logout/cookie

Read

$ curl -b cookie.txt
       localhost:8000/api/users/me/

Update

$ curl -X PATCH
       -H "Content-Type: application/json"
       -b cookie.txt
       -d '{"first_name": "example"}'
       localhost:8000/api/users/me/

Crypto API

Read

$ curl -H "Content-Type: application/json"
       localhost:8000/api/gainers/
$ curl -H "Content-Type: application/json"
       localhost:8000/api/losers/
curl --location --request GET 'localhost:8000/api/crypto/tickerInfo/BTCUSDT'
curl --location --request GET 'localhost:8000/time'
curl --location --request GET 'http://localhost:8000/api/crypto/data/BTCUSDT?minDate=2020-03-12%21:12:31&maxDate=2020-04-12%21:12:31&timeInterval=1d'
curl --location --request GET 'http://localhost:8000/config'
curl --location --request GET 'http://localhost:8000/symbols?symbol=ETHUSDT'
curl --location --request GET 'http://localhost:8000/symbol_info''
curl --location --request GET 'http://localhost:8000/search?query=btc'
curl --location --request GET 'http://localhost:8000/history?from=1585967439&to=1585978239&symbol=BTCUSDT&resolution=1'