Package com.jquestrade
Class Balances
java.lang.Object
com.jquestrade.Balances
Represents the overall encompassing balance for an account. Has methods to access per-currency blalances and combined balances.
- See Also:
-
- Accounts balances API documentation for more insight.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongetCombinedBalances
(Balances.Currency currency) Returns an account's total balance in the given currency.getPerCurrencyBalances
(Balances.Currency currency) Returns the balance for a particular currency's side of the account.
i.e.getSodCombinedBalances
(Balances.Currency currency) Returns the account's total balance in the given currency at the start-of-day of the most recent trading day.
Example: If you get an accounts balances at 3PM EST on a weekday, this start-of-day balance will represent the balance at the beginning of that day (in other words, your closing balance of the previous trading day).getSodPerCurrencyBalances
(Balances.Currency currency) Returns the balance for a particular currency's side of the account at the start-of-day of the most recent trading day.
Example: If you get an accounts balances at 3PM EST on a weekday, this start-of-day balance will represent the balance at the beginning of that day (in other words, your closing balance of the previous trading day).
-
Method Details
-
getPerCurrencyBalances
Returns the balance for a particular currency's side of the account.
i.e.getPerCurrencyBalances(Currency.CAD)
would return aBalance
object that represents only the CAD in the account.- Parameters:
currency
- Which currency to get the account balance for.- Returns:
- A
Balance
object representing only the account's balance that is in the given currency.
-
getCombinedBalances
Returns an account's total balance in the given currency.- Parameters:
currency
- Which currency to get the total account balance for.- Returns:
- A
Balance
object representing the account's total balance, displayed the given currency.
-
getSodPerCurrencyBalances
Returns the balance for a particular currency's side of the account at the start-of-day of the most recent trading day.
Example: If you get an accounts balances at 3PM EST on a weekday, this start-of-day balance will represent the balance at the beginning of that day (in other words, your closing balance of the previous trading day).- Parameters:
currency
- Which currency to get the start-of-day account balance for.- Returns:
- A
Balance
object representing only the account's start-of-day balance that is in the given currency.
-
getSodCombinedBalances
Returns the account's total balance in the given currency at the start-of-day of the most recent trading day.
Example: If you get an accounts balances at 3PM EST on a weekday, this start-of-day balance will represent the balance at the beginning of that day (in other words, your closing balance of the previous trading day).- Parameters:
currency
- Which currency to represent the start-of-day total account balance in.- Returns:
- A
Balance
object representing the account's start-of-day total balance, displayed the given currency.
-