Skip to main content

getPosition

Description:

User position data

Arguments:

NameTypeRequiredDescription
thresholdPercentbigintYessdk.vault.getVault
stakedAssetsbigintYessdk.vault.getStakeBalance
userAddressstringYesThe user address
vaultAddressstringYesThe address of the vault

Returns:

type Output = {
minted: {
assets: bigint
shares: bigint
}
healthFactor: {
value: number
health: OsTokenPositionHealth
}
protocolFeePercent: bigint
}
NameDescription
minted.sharesBalance
minted.assetsBalance in ETH
healthFactorsdk.osToken.getHealthFactor
protocolFeePercentUsage fee percent

Example:

await sdk.osToken.getPosition({
stakedAssets: 0n,
userAddress: '0x...',
vaultAddress: '0x...',
thresholdPercent: 0n,
})