Function getBalance

  • Calculates the balance of a given token amount including any accumulated interest. This is the same as SpotPosition.scaledBalance.

    Returns

    the calculated balance, scaled by SPOT_MARKET_BALANCE_PRECISION

    Parameters

    • tokenAmount: BN

      the amount of tokens

    • spotMarket: SpotMarketAccount

      the spot market account

    • balanceType: SpotBalanceType

      the balance type ('deposit' or 'borrow')

    Returns BN

Generated using TypeDoc