@renegade-fi/core
Version:
VanillaJS library for Renegade
10 lines • 572 B
JavaScript
import { PRICE_REPORTER_ROUTE } from '../constants.js';
import { getDefaultQuoteToken } from '../types/token.js';
import { getRelayerRaw } from '../utils/http.js';
export async function getPriceFromPriceReporter(config, parameters) {
const { exchange = 'binance', base, quote = getDefaultQuoteToken(exchange).address, } = parameters;
const { getPriceReporterHTTPBaseUrl } = config;
const res = await getRelayerRaw(getPriceReporterHTTPBaseUrl(PRICE_REPORTER_ROUTE(exchange, base, quote)));
return res;
}
//# sourceMappingURL=getPriceFromPriceReporter.js.map