Prices
Initialization
const afSdk = new Aftermath("MAINNET");
await afSdk.init(); // initialize provider
const prices = afSdk.Prices();Methods
getCoinPriceInfo()
const priceInfo = await prices.getCoinPriceInfo({
coin: "0x2::sui::SUI", // CoinType
});
console.log(priceInfo);
/*
{
price: 1.23, // Current price in USD
priceChange24HoursPercentage: 5.67 // 24h price change percentage
}
*/getCoinsToPriceInfo()
getCoinPrice()
getCoinsToPrice()
Types
Basic Types
Record Types
Example Usage
Last updated