Position Health Metrics
Leverage amplifies both gains and losses. When Current LTV approaches Liquidation LTV, the position risks partial liquidation. When borrow rates exceed collateral yield, Net APY turns negative and debt grows faster than earnings.
Regular monitoring enables integrations to alert users when conditions warrant position adjustment—whether through debt repayment, leverage reduction, or position closure.
Get Position Health Metrics
- SDK
- API
1
Import Dependencies
Import the required packages for Solana RPC communication and Kamino SDK operations.2
Load Market and Initialize RPC
Load the keypair, initialize RPC connection, and load the xStocks market.3
Fetch Multiply Obligations
Retrieve all multiply obligations for the wallet address using the obligation type filter.getUserObligationsByTag filters obligations by type. For example, use ObligationTypeTag.Multiply to retrieve only multiply positions.ObligationTypeTag Values:
4
Read Position Health Metrics
Access the position health statistics from each obligation’srefreshedStats.You now have access to all position health metrics including leverage, borrowing capacity, and liquidation thresholds.
Liquidation LTV by Asset Pair
For detailed leverage calculations and eMode mechanics, see LTV and Leverage Concepts.