Skip to main content

getStats

Description:

Getting the osToken stats collection. With the help of this data it is possible to build a chart.

Arguments:

NameTypeRequiredDescription
daysCountnumberYesThe limit in days

Returns:

type Output = {
apy: number
time: number
balance: number
rewards: number
}
NameDescription
timeDate and time for each data point
apyCurrent APY based on time, rewards and balance.
rewardsNumber of assets earned by the osToken during the interval
balanceTotal assets in the osToken at the moment of time

Example:

await sdk.osToken.getStats({
daysCount: 30
})