Package org.knowm.xchange.kraken.service
Class KrakenAccountServiceRaw
java.lang.Object
org.knowm.xchange.service.BaseExchangeService
org.knowm.xchange.kraken.service.KrakenBaseService
org.knowm.xchange.kraken.service.KrakenAccountServiceRaw
- All Implemented Interfaces:
BaseService
- Direct Known Subclasses:
KrakenAccountService
public class KrakenAccountServiceRaw extends KrakenBaseService
- Author:
- jamespedwards42
-
Field Summary
Fields inherited from class org.knowm.xchange.kraken.service.KrakenBaseService
kraken, signatureCreator
Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange
-
Constructor Summary
Constructors Constructor Description KrakenAccountServiceRaw(Exchange exchange)
Constructor -
Method Summary
Modifier and Type Method Description KrakenDepositAddress[]
getDepositAddresses(String currency, String method, boolean newAddress)
KrakenDepositMethods[]
getDepositMethods(String assetPairs, String assets)
List<DepostitStatus>
getDepositStatus(String assetPairs, String assets, String method)
Map<String,BigDecimal>
getKrakenBalance()
To avoid having to map to Kraken currency codes (e.g., ZUSD) useKrakenAccountService.getAccountInfo()
instead.Map<String,KrakenLedger>
getKrakenLedgerInfo()
Retrieves the full account Ledger which represents all account asset activity.Map<String,KrakenLedger>
getKrakenLedgerInfo(LedgerType ledgerType, Date start, Date end, Long offset, Currency... assets)
Retrieves all ledger entries between the start date and the end date.Map<String,KrakenLedger>
getKrakenPartialLedgerInfo(LedgerType ledgerType, String startTime, String endTime, Long offset, Currency... assets)
Retrieves a fraction of the ledger entries (usually a "page" of 50 entries) between the start date and the end date.KrakenTradeBalanceInfo
getKrakenTradeBalance()
Retrieves the user's trade balance using the default currency ZUSD to determine the balance.KrakenTradeBalanceInfo
getKrakenTradeBalance(Currency valuationCurrency)
KrakenWebsocketToken
getKrakenWebsocketToken()
KrakenTradeVolume
getTradeVolume(CurrencyPair... currencyPairs)
WithdrawInfo
getWithdrawInfo(String assetPairs, String assets, String key, BigDecimal amount)
List<WithdrawStatus>
getWithdrawStatus(String assetPairs, String assets, String method)
Map<String,KrakenLedger>
queryKrakenLedger(String... ledgerIds)
Withdraw
withdraw(String assetPairs, String assets, String key, BigDecimal amount)
Methods inherited from class org.knowm.xchange.kraken.service.KrakenBaseService
checkResult, createDelimitedString, delimitAssetPairs, delimitAssets, delimitSet, getAssetPairScale, getKrakenAssets, getServerTime
Methods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrder
-
Constructor Details
-
KrakenAccountServiceRaw
Constructor- Parameters:
exchange
-
-
-
Method Details
-
getKrakenBalance
To avoid having to map to Kraken currency codes (e.g., ZUSD) useKrakenAccountService.getAccountInfo()
instead.- Returns:
- Map of Kraken Assets to account balance
- Throws:
IOException
-
getDepositAddresses
public KrakenDepositAddress[] getDepositAddresses(String currency, String method, boolean newAddress) throws IOException- Throws:
IOException
-
getDepositMethods
public KrakenDepositMethods[] getDepositMethods(String assetPairs, String assets) throws IOException- Throws:
IOException
-
getWithdrawInfo
public WithdrawInfo getWithdrawInfo(String assetPairs, String assets, String key, BigDecimal amount) throws IOException- Throws:
IOException
-
withdraw
public Withdraw withdraw(String assetPairs, String assets, String key, BigDecimal amount) throws IOException- Throws:
IOException
-
getDepositStatus
public List<DepostitStatus> getDepositStatus(String assetPairs, String assets, String method) throws IOException- Throws:
IOException
-
getWithdrawStatus
public List<WithdrawStatus> getWithdrawStatus(String assetPairs, String assets, String method) throws IOException- Throws:
IOException
-
getKrakenTradeBalance
- Parameters:
valuationCurrency
- - Base asset used to determine balance (can be null, defaults to USD). The asset should be provided in the form of a standard currency code, i.e., EUR. It will be converted to the appropriate Kraken Asset code.- Returns:
- KrakenTradeBalanceInfo
- Throws:
IOException
-
getKrakenTradeBalance
Retrieves the user's trade balance using the default currency ZUSD to determine the balance.- Returns:
- KrakenTradeBalanceInfo
- Throws:
IOException
-
getKrakenLedgerInfo
Retrieves the full account Ledger which represents all account asset activity.- Returns:
- Throws:
IOException
-
getKrakenPartialLedgerInfo
public Map<String,KrakenLedger> getKrakenPartialLedgerInfo(LedgerType ledgerType, String startTime, String endTime, Long offset, Currency... assets) throws IOExceptionRetrieves a fraction of the ledger entries (usually a "page" of 50 entries) between the start date and the end date. The ledger records the activity (trades, deposit, withdrawals) of the account for all assets.- Parameters:
assets
- Set of assets to restrict output to (can be null, defaults to all)ledgerType
-LedgerType
to retrieve (can be null, defaults to all types)startTime
- Start Unix timestamp or ledger id of results (can be null)endTime
- End Unix timestamp or ledger id of results (can be null)offset
- Result offset (can be null)- Returns:
- Throws:
IOException
-
getKrakenLedgerInfo
public Map<String,KrakenLedger> getKrakenLedgerInfo(LedgerType ledgerType, Date start, Date end, Long offset, Currency... assets) throws IOExceptionRetrieves all ledger entries between the start date and the end date. This method iterates over ledger pages until it has retrieved all entries between the start date and the end date. The ledger records the activity (trades, deposit, withdrawals) of the account for all assets.- Parameters:
assets
- Set of assets to restrict output to (can be null, defaults to all)ledgerType
-LedgerType
to retrieve (can be null, defaults to all types)start
- Start unix timestamp or ledger id of results (can be null)end
- End unix timestamp or ledger id of results (can be null)offset
- Result offset (can be null)- Returns:
- Throws:
IOException
-
getKrakenWebsocketToken
- Throws:
IOException
-
queryKrakenLedger
- Throws:
IOException
-
getTradeVolume
- Throws:
IOException
-