Class Activity

java.lang.Object
com.jquestrade.Activity

public class Activity extends Object
Represents an account activity. Could be a cash transactions, dividends, trades, etc.
See Also:
  • Method Details

    • getTradeDate

      public String getTradeDate()
      The trade date as a string in ISO 8601 format.
      Returns:
      The trade date
    • getTransactionDate

      public String getTransactionDate()
      The transaction date as a string in ISO 8601 format.
      Returns:
      The transaction date
    • getSettlementDate

      public String getSettlementDate()
      The settlement date as a string in ISO 8601 format.
      Returns:
      The settlement date.
    • getAction

      public String getAction()
      The action.
      Example types:
      Buy (for orders)
      Sell (for orders)
      CON (for deposits)
      Returns:
      The action.
    • getSymbol

      public String getSymbol()
      Returns the stock symbol involved in this activity (if applicable).
      Returns:
      Returns the stock symbol involved in this activity, Returns an empty string ("") if the activity isn't related to any particular security, like a desposit.
    • getSymbolId

      public int getSymbolId()
      Returns a numeric stock ID for the particular stock involved in this activity (if applicable).
      Returns:
      Returns the stock ID for the stock involved in this activity, Returns 0 if the activity isn't related to any particular security, like a desposit.
    • getDescription

      public String getDescription()
      Returns the description of the activity.
      Returns:
      The description of the activity.
    • getCurrency

      public String getCurrency()
      Returns which currency was involved in the activity.
      Returns:
      Which currency was involved in the activity (CAD or USD).
    • getQuantity

      public double getQuantity()
      Returns the quantity of shares involved in the activity (if applicable).
      Returns:
      Returns quantity of shares involved in the activity. Returns 0 if the activity isn't related to any particular security, like a desposit.
    • getPrice

      public double getPrice()
      Returns the price of the shares involved in the activity (if the activity was an order).
      Returns:
      Returns The price of the shares involved in the activity Returns 0 if the activity isn't related to any particular security, like a desposit.
    • getGrossAmount

      public double getGrossAmount()
      Returns the gross amount.
      Returns:
      Returns the gross amount. Returns 0 if the activity isn't related to any particular security, like a desposit.
    • getCommission

      public double getCommission()
      Returns the net change for the commission paid for the activity. For example, orders will often charge ECN fees, which are generally a few cents.
      Returns:
      The commission.
    • getNetAmount

      public double getNetAmount()
      Returns the net amount for the account. For example, deposits and sell orders will have a positive net amount and withdrawals and buy orders will have negative net amounts.
      Returns:
      The net amount.
    • getType

      public String getType()
      Returns the activity type. Possible values: Deposits, Dividends, Trades, etc.
      Returns:
      The activity type.