samplecrypto
v1.0.0
Published
**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
Downloads
3
Readme
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:
- BTC->ETH
- ETH->BNB
- USDT->BTC
- BNB->BTC
- LTC->BTC
Running the Application The function takes only 3 parameters:
- from: the crypto coin you want to exchange from.
- to: the crypto coin you want to get after exchange.
- 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
- 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.
- 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