Get Price
const agile = new Agile(window.ethereum);
let price;
(async function () {
price = await agile.getPrice(Agile.WBTC);
console.log('WBTC in USD', price); // 6 decimals, see Open Price Feed docs
price = await agile.getPrice(Agile.ETH, Agile.USDC); // supports aTokens too
console.log('ETH in USDC', price);
})().catch(console.error);Last updated