TypeScript repository to get exchange rate for cryptocurrencies. The rate is determined with an average of four exchanges coinbase, crypto.com, kucoin and coinbase.
$ npm install
# unit tests
$ npm run test
const cotiExchangeRate = await getAvgCotiExchangeRate();
// Expected object as input for any other coin or token
BTC_SYMBOLS_OBJ = {
binanceSymbol: 'BTCUSDT',
kuCoinSymbol: 'BTC-USDT',
cryptoComSymbol: 'btcusdc',
coinBaseSymbol: 'BTC-USD',
}
const cotiExchangeRate = await getAvgSymbolExchangeRate(BTC_SYMBOLS_OBJ);