1.0.0 • Published 2 years ago

samplecrypto v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

CryptoCalculator

DESCRIPTION This is a backend SDK for calculating crypto pairs price. It is built completely from scratch using Nodejs as one of the high performing and versatile javascript backend framework.This calculator uses realtime crypto market data inspired by coinCap api This SDK can be used together with frontend to build a full crypto calculator.

Trades supported Currently this calulator supports over 100 crypto coins.But we have highlighted the main five: 1. BTC->ETH 2. ETH->BNB 3. USDT->BTC 4. BNB->BTC 5. LTC->BTC

Running the Application The function takes only 3 parameters: 1. from: the crypto coin you want to exchange from. 2. to: the crypto coin you want to get after exchange. 3. ampunt: Amount of coins you want to exchange. To run the application you just need to call these functions and pass in those three parameters Example: pairCalculator("BTC","ETH",1000); sample result: 1000 BTC=16785.670855657092 ETH

Practices used for optimisation 1. asynchronous: I used asynchronous call to the crypto market api called coinCap to get realtime data. This increases the performance and responsiveness of the application. 2. Realtime crypto market data: I used an online api called coinCap(https://api.coincap.io/v2/assets) which helped me to get realtime crypto market data rather than using outdated data. This increased dynamism of the application to adapt to any market change.

credits axios:Thanks to axios package which helped me during api call to crypto market.https://axios-http.com/docs/intro npm: Thanks to node package manager which helped me to initialise the project and install packages.https://www.npmjs.com/ coincap: Thanks to coincap which supplied me with real time crypto trade market data for the application.https://coincap.io