rates-api / src/services/zelcoreRatesV2 / default
default:
object
Defined in: src/services/zelcoreRatesV2.ts:153
getAll: () =>
Promise<PricesResponse>
Fetches and aggregates cryptocurrency prices and fiat rates from multiple providers.
This function retrieves fiat rates from BitPay and cryptocurrency prices from CoinGecko,
CryptoCompare, and LiveCoinWatch. It handles errors from each provider and compiles the data
into a unified PricesResponse object.
Promise<PricesResponse>
An object containing crypto prices, fiat rates, and any errors encountered.
import zelcoreRatesV2 from './zelcoreRatesV2';
async function fetchPrices() {
const prices = await zelcoreRatesV2.getAll();
console.log('Prices:', prices);
}
fetchPrices();