Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.positions.finance/llms.txt

Use this file to discover all available pages before exploring further.

Get a comprehensive overview of the user’s financial position, including Health Factor and Loan-to-Value (LTV).
const portfolio = await sdk.getPortfolio();

console.log("Total Deposits (USD):", portfolio.deposit.total);
console.log("Total Debt (USD):", portfolio.borrow.total);
console.log("Health Factor:", portfolio.healthFactor); // Should be > 1.0
console.log("LTV:", portfolio.LTV, "%");

// Inspect individual assets
const usdcData = portfolio.deposit.assets[usdcAddress];
if (usdcData) {
    console.log("USDC Deposited:", usdcData.amount);
}