Skip to main content

getUserRewards

Description:

Daily rewards for the user who has made a deposit in the vault.

Arguments:

NameTypeRequiredDescription
dateFromnumberYesTime to start in milliseconds
dateTonumberYesTime to end in milliseconds
userAddressstringYesThe user address
vaultAddressstringYesThe address of the vault

Returns:

type Output = {
date: number
dailyRewards: number
dailyRewardsEur: number
dailyRewardsGbp: number
dailyRewardsUsd: number
}
NameDescription
dateСurrent rate date
dailyRewardsDaily reward asset in ETH
dailyRewardsEurDaily reward asset in EUR
dailyRewardsGbpDaily reward asset in GBP
dailyRewardsUsdDaily reward asset in USD

Example:

await sdk.vault.getUserRewards({
userAddress: '0x...',
vaultAddress: '0x...',
dateTo: 1727827200000,
dateFrom: 1721606400000,
})