Skip to main content

getYieldPosition

Gets a wallet account’s share balance and asset value in an Earn vault. Reads on-chain, so the result always reflects the vault’s current state.
shares and assets are raw, undecimalized on-chain units — divide by the vault’s assetDecimals (from getYieldDetails) before displaying them.

Usage

Parameters

Returns

Promise<YieldVaultPosition> - The wallet’s share balance and asset value in the vault.

Examples

Format a position for display

React

useGetYieldPosition is a query hook that stays disabled until walletAccount is defined — safe to render before a wallet is connected.
Last modified on August 26, 2026