Package com.jquestrade
Class Activity
java.lang.Object
com.jquestrade.Activity
Represents an account activity. Could be a cash transactions, dividends, trades, etc.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThe action.
Example types:
Buy (for orders)
Sell (for orders)
CON (for deposits)double
Returns the net change for the commission paid for the activity.Returns which currency was involved in the activity.Returns the description of the activity.double
Returns the gross amount.double
Returns the net amount for the account.double
getPrice()
Returns the price of the shares involved in the activity (if the activity was an order).double
Returns the quantity of shares involved in the activity (if applicable).The settlement date as a string in ISO 8601 format.Returns the stock symbol involved in this activity (if applicable).int
Returns a numeric stock ID for the particular stock involved in this activity (if applicable).The trade date as a string in ISO 8601 format.The transaction date as a string in ISO 8601 format.getType()
Returns the activity type.
-
Method Details
-
getTradeDate
The trade date as a string in ISO 8601 format.- Returns:
- The trade date
-
getTransactionDate
The transaction date as a string in ISO 8601 format.- Returns:
- The transaction date
-
getSettlementDate
The settlement date as a string in ISO 8601 format.- Returns:
- The settlement date.
-
getAction
The action.
Example types:
Buy (for orders)
Sell (for orders)
CON (for deposits)- Returns:
- The action.
-
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
Returns the description of the activity.- Returns:
- The description of the activity.
-
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
Returns the activity type. Possible values: Deposits, Dividends, Trades, etc.- Returns:
- The activity type.
-