getPosition
Description:
User position data
Arguments:
Name | Type | Required | Description |
---|---|---|---|
thresholdPercent | bigint | Yes | sdk.vault.getVault |
stakedAssets | bigint | Yes | sdk.vault.getStakeBalance |
userAddress | string | Yes | The user address |
vaultAddress | string | Yes | The address of the vault |
Returns:
type Output = {
minted: {
assets: bigint
shares: bigint
}
healthFactor: {
value: number
health: OsTokenPositionHealth
}
protocolFeePercent: bigint
}
Name | Description |
---|---|
minted.shares | Balance |
minted.assets | Balance in ETH |
healthFactor | sdk.osToken.getHealthFactor |
protocolFeePercent | Usage fee percent |
Example:
await sdk.osToken.getPosition({
stakedAssets: 0n,
userAddress: '0x...',
vaultAddress: '0x...',
thresholdPercent: 0n,
})