BTC-ETH-Exchange-Rate-APP-Svelte-Flask- Svelte Themes

Btc Eth Exchange Rate App Svelte Flask

*To Run this application you will need both Nodejs and FLask(python) and Requests(python) installed onto your device *

*To Install Nodejs please go to https://nodejs.org/en/download/ and to install Flask please go to https://flask.palletsprojects.com/en/2.0.x/installation/ and to install Requests please go to https://pypi.org/project/requests/ *

*Questionare answers in question.md *

BTC/ETH Exchange Rate APP (Svelte +FLask)

This project is a web app that is built using Svelte.js for the front end and Flask(Python) for the back end. The purpose of this application is to fetch the data from two different sources for both Bitcoin and Ethereum and displays both buy and sell price for both sources. The application will also recommend the user on which exchange source to trade on along with the price difference between sources.

Screen Shot 2021-10-18 at 4 08 30 PM Screen Shot 2021-10-18 at 4 07 41 PM

*Note that you will need to have [Node.js], [Flask(Python)] and [Requests(Python)] installed. *

Exchange Sources

For Bitcoin:

https://www.bitfinex.com

https://www.blockchain.com

for Ethereum:

https://www.bitfinex.com

https://www.kraken.com

How It Works

The backend consists of 4 Api's that call onto its corresponding exchange rate api to fetch the exchange rate data in json format. The fron end calls on the backend api's and retreives the exchange rate data. The front end then parses the data and displays it accordingly.

Main code is in src/App.svelte

The server/api are in server.py for develppment server and server2.py for production server

Get started

*These installation an Deployment Instructions are meant for MAC OS * Download the Project

git clone https://github.com/humzahokadia/BTC-ETH-Exchange-Rate-APP-Svelte-Flask-.git

next navigate to the folder

cd BTC-ETH-Exchange-Rate-APP-Svelte-Flask-

How To Run:

To Run With Development Server:

first set up the environment

    export FLASK_APP=server.py
    export FLASK_ENV=development
    flask run

then start the server

python server.py

in a new terminal tab navigate to the public folder

cd public

next install dependencies

npm install

and finally deploy the front end

npm run build 

The application is now running...

Navigate to localhost:5000.

Screen Shot 2021-10-18 at 1 41 51 AM

To Run With Production Server:

*To Run this application with a production server you will need Waitress(python) installed onto your device *

*To Install Waitress please go to https://pypi.org/project/waitress/ *

first start the server

python server2.py

in a new terminal tab navigate to the public folder

cd public

next install dependencies

npm install

and finally deploy the front end

npm run build 

The application is now running...

Navigate to localhost:8080.

or

Navigate to 0.0.0.0:8080.

Screen Shot 2021-10-18 at 2 06 08 AM

Top categories

Loading Svelte Themes