@alphafi/alphalend-sdk - v1.1.2
    Preparing search index...

    Interface UserPortfolio

    Represents a user's complete portfolio in the protocol Includes all positions, balances, rewards, and related metrics

    interface UserPortfolio {
        aggregatedBorrowApr: Decimal;
        aggregatedSupplyApr: Decimal;
        borrowedAmounts: Map<number, Decimal>;
        borrowLimitUsed: Decimal;
        dailyEarnings: Decimal;
        liquidationThreshold: Decimal;
        netApr: Decimal;
        netWorth: Decimal;
        positionId: string;
        rewardsToClaim: { coinType: string; rewardAmount: Decimal }[];
        rewardsToClaimUsd: Decimal;
        safeBorrowLimit: Decimal;
        suppliedAmounts: Map<number, Decimal>;
        totalBorrowedUsd: Decimal;
        totalSuppliedUsd: Decimal;
    }
    Index

    Properties

    aggregatedBorrowApr: Decimal

    Weighted average borrow APR across all markets

    aggregatedSupplyApr: Decimal

    Weighted average supply APR across all markets

    borrowedAmounts: Map<number, Decimal>

    Map of market IDs to borrowed amounts (in token's base units)

    borrowLimitUsed: Decimal

    Percentage of the borrow limit that is currently used (0.0 to 1.0)

    dailyEarnings: Decimal

    Daily earnings from lending and rewards (in USD)

    liquidationThreshold: Decimal

    Threshold at which the position becomes eligible for liquidation (in USD)

    netApr: Decimal

    Net annual percentage rate across all positions (weighted average)

    netWorth: Decimal

    Total value of assets minus liabilities (in USD)

    positionId: string

    Unique identifier for the user's position

    rewardsToClaim: { coinType: string; rewardAmount: Decimal }[]

    Detailed breakdown of rewards by token type

    rewardsToClaimUsd: Decimal

    Total USD value of all unclaimed rewards

    safeBorrowLimit: Decimal

    Maximum amount that can be borrowed without risk of liquidation (in USD)

    suppliedAmounts: Map<number, Decimal>

    Map of market IDs to supplied amounts (in token's base units)

    totalBorrowedUsd: Decimal

    Total value of all borrowed assets (in USD)

    totalSuppliedUsd: Decimal

    Total value of all supplied assets (in USD)