Package org.knowm.xchange.dto.account
Class AccountInfo
java.lang.Object
org.knowm.xchange.dto.account.AccountInfo
- All Implemented Interfaces:
Serializable
DTO representing account information
Account information is anything particular associated with the user's login
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAccountInfo(String username, BigDecimal tradingFee, Collection<Wallet> wallets) Constructs anAccountInfo.AccountInfo(String username, BigDecimal tradingFee, Collection<Wallet> wallets, Collection<OpenPosition> openPositions, Date timestamp) Constructs anAccountInfo.AccountInfo(String username, BigDecimal tradingFee, Collection<Wallet> wallets, Date timestamp) Constructs anAccountInfo.AccountInfo(String username, BigDecimal tradingFee, Wallet... wallets) AccountInfo(String username, Collection<Wallet> wallets) AccountInfo(String username, Wallet... wallets) AccountInfo(Collection<Wallet> wallets) AccountInfo(Date timestamp, Wallet... wallets) AccountInfo(Wallet... wallets) -
Method Summary
Modifier and TypeMethodDescriptionReturns the current trading feeGets wallet for accounts which don't use multiple wallets with idsGets the wallet with a specific idgetWallet(Wallet.WalletFeature feature) Get wallet with given featureGets all wallets in this accounttoString()
-
Constructor Details
-
AccountInfo
-
AccountInfo
-
AccountInfo
-
AccountInfo
-
AccountInfo
-
AccountInfo
Constructs anAccountInfo.- Parameters:
username- the user name.tradingFee- the trading fee.wallets- the user's wallets
-
AccountInfo
public AccountInfo(String username, BigDecimal tradingFee, Collection<Wallet> wallets, Date timestamp) Constructs anAccountInfo.- Parameters:
username- the user name.tradingFee- the trading fee.wallets- the user's walletstimestamp- the timestamp for the account snapshot.
-
AccountInfo
public AccountInfo(String username, BigDecimal tradingFee, Collection<Wallet> wallets, Collection<OpenPosition> openPositions, Date timestamp) Constructs anAccountInfo.- Parameters:
username- the user name.tradingFee- the trading fee.wallets- the user's walletsopenPositions- the users's open positionstimestamp- the timestamp for the account snapshot.
-
AccountInfo
-
-
Method Details
-
getWallets
Gets all wallets in this account -
getWallet
Gets wallet for accounts which don't use multiple wallets with ids -
getWallet
Gets the wallet with a specific id -
getWallet
Get wallet with given feature- Returns:
- null if no wallet on given exchange supports this feature
- Throws:
UnsupportedOperationException- if there are more then one wallets supporting the given feature
-
getUsername
- Returns:
- The user name
-
getTradingFee
Returns the current trading fee- Returns:
- The trading fee
-
getTimestamp
- Returns:
- The timestamp at which this account information was generated. May be null if not provided by the exchange.
-
getOpenPositions
-
toString
-