Package org.knowm.xchange.dto.account
Class AccountInfo
java.lang.Object
org.knowm.xchange.dto.account.AccountInfo
- All Implemented Interfaces:
Serializable
public final class AccountInfo extends Object implements Serializable
DTO representing account information
Account information is anything particular associated with the user's login
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description AccountInfo(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 Type Method Description Collection<OpenPosition>
getOpenPositions()
Date
getTimestamp()
BigDecimal
getTradingFee()
Returns the current trading feeString
getUsername()
Wallet
getWallet()
Gets wallet for accounts which don't use multiple wallets with idsWallet
getWallet(String id)
Gets the wallet with a specific idWallet
getWallet(Wallet.WalletFeature feature)
Get wallet with given featureMap<String,Wallet>
getWallets()
Gets all wallets in this accountString
toString()
-
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
-