Package org.knowm.xchange.dto.account
Class Wallet
java.lang.Object
org.knowm.xchange.dto.account.Wallet
- All Implemented Interfaces:
Serializable
DTO representing a wallet
A wallet has a set of current balances in various currencies held on the exchange.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionWallet
(String id, String name, Collection<Balance> balances, Set<Wallet.WalletFeature> features, BigDecimal maxLeverage, BigDecimal currentLeverage) Constructs aWallet
. -
Method Summary
-
Constructor Details
-
Wallet
public Wallet(String id, String name, Collection<Balance> balances, Set<Wallet.WalletFeature> features, BigDecimal maxLeverage, BigDecimal currentLeverage) Constructs aWallet
.- Parameters:
id
- the wallet idname
- a descriptive name for the walletbalances
- the balances, the currencies of the balances should not be duplicated.features
- all the features that wallet supportsmaxLeverage and currentLeverage are BigDecimal.ZERO for the default constructor
-
-
Method Details
-
getId
- Returns:
- The wallet id
-
getName
- Returns:
- A descriptive name for the wallet
-
balances
- Returns:
- The available colletion of balances
-
getBalances
- Returns:
- The available balances (amount and currency)
-
getFeatures
- Returns:
- All wallet operation features
-
getMaxLeverage
- Returns:
- Max leverage of wallet
-
getCurrentLeverage
- Returns:
- current leverage of wallet
-
getBalance
Returns the balance for the specified currency.- Parameters:
currency
- aCurrency
.- Returns:
- the balance of the specified currency, or a zero balance if currency not present
-
equals
-
hashCode
public int hashCode() -
toString
-