Class Balance

java.lang.Object
com.jquestrade.Balance

public class Balance extends Object
Represents a per-currency or combined balances for a specified account.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the buying power for that particular currency side of the account.
    double
    Returns how much cash (non-invested money) is in this balance.
    Returns this balance's currency.
    double
    Returns the maintenance excess for that particular currency side of the account.
    double
    Returns the market value of all securities in the account in this balance's currency.
    double
    Returns the total equity for this balance (cash + market value).
    boolean
    Whether or not real-time data was used to calculate this balance's values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getCurrency

      public String getCurrency()
      Returns this balance's currency.
      Returns:
      Which currency was involved in the activity (CAD or USD).
      See Also:
    • getCash

      public double getCash()
      Returns how much cash (non-invested money) is in this balance.
      Returns:
      How much cash is in this balance.
    • getMarketValue

      public double getMarketValue()
      Returns the market value of all securities in the account in this balance's currency.
      Returns:
      The market value of all securities in the account in this balance's currency.
    • getTotalEquity

      public double getTotalEquity()
      Returns the total equity for this balance (cash + market value).
      Returns:
      The total equity for this balance.
    • getBuyingPower

      public double getBuyingPower()
      Returns the buying power for that particular currency side of the account.
      Returns:
      The buying power for that particular currency side of the account.
    • getMaintenanceExcess

      public double getMaintenanceExcess()
      Returns the maintenance excess for that particular currency side of the account.
      Returns:
      The maintenance excess
    • isRealTime

      public boolean isRealTime()
      Whether or not real-time data was used to calculate this balance's values.
      Returns:
      Whether real-time data was used to calculate this balance's values.