Class BitfinexAccountService
java.lang.Object
org.knowm.xchange.service.BaseExchangeService<E>
org.knowm.xchange.service.BaseResilientExchangeService<BitfinexExchange>
org.knowm.xchange.bitfinex.service.BitfinexBaseService
org.knowm.xchange.bitfinex.service.BitfinexAccountServiceRaw
org.knowm.xchange.bitfinex.service.BitfinexAccountService
- All Implemented Interfaces:
AccountService
,BaseService
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Field Summary
Fields inherited from class org.knowm.xchange.bitfinex.service.BitfinexBaseService
apiKey, bitfinex, bitfinexV2, payloadCreator, signatureCreator, signatureV2
Fields inherited from class org.knowm.xchange.service.BaseResilientExchangeService
resilienceRegistries
Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange
-
Constructor Summary
ConstructorDescriptionBitfinexAccountService
(BitfinexExchange exchange, ResilienceRegistries resilienceRegistries) Constructor -
Method Summary
Modifier and TypeMethodDescriptionCreateTradeHistoryParams
object specific to this exchange.Get account infoGet the trading fees per instrument as determined by the given exchange's rules for adjusting fees by recent volume traded.getFundingHistory
(TradeHistoryParams params) requestDepositAddress
(Currency currency, String... arguments) Request a digital currency address to fund this account.withdrawFunds
(Currency currency, BigDecimal amount, String address) Withdrawal supportwithdrawFunds
(Currency currency, BigDecimal amount, String address, String tagOrPaymentId) Used for XRP withdrawalswithdrawFunds
(WithdrawFundsParams params) Withdraw funds from this account.Methods inherited from class org.knowm.xchange.bitfinex.service.BitfinexAccountServiceRaw
getAccountFees, getBitfinexAccountInfo, getBitfinexBalanceHistory, getBitfinexDynamicTradingFees, getBitfinexMarginInfos, getDepositWithdrawalHistory, getLedgerEntries, getMovementHistory, getWallets, requestDepositAddressRaw, transferBetweenWallets, updateCollateralDerivativePosition, withdraw, withdraw, withdraw
Methods inherited from class org.knowm.xchange.service.BaseResilientExchangeService
decorateApiCall, rateLimiter, rateLimiter, retry, retry
Methods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.knowm.xchange.service.account.AccountService
requestDepositAddress, requestDepositAddressData, requestDepositAddressData, withdrawFunds
-
Constructor Details
-
BitfinexAccountService
Constructor- Parameters:
exchange
-
-
-
Method Details
-
getAccountInfo
Description copied from interface:AccountService
Get account info- Specified by:
getAccountInfo
in interfaceAccountService
- Returns:
- the AccountInfo object, null if some sort of error occurred. Implementers should log the error.
- Throws:
IOException
- - Indication that a networking error occurred while fetching JSON data
-
withdrawFunds
public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException Withdrawal support- Specified by:
withdrawFunds
in interfaceAccountService
- Parameters:
currency
-amount
-address
-- Returns:
- Throws:
IOException
-
withdrawFunds
public String withdrawFunds(Currency currency, BigDecimal amount, String address, String tagOrPaymentId) throws IOException Used for XRP withdrawals- Parameters:
currency
-amount
-address
-tagOrPaymentId
-- Returns:
- Throws:
IOException
-
withdrawFunds
Description copied from interface:AccountService
Withdraw funds from this account. Allows to withdraw digital currency funds from the exchange account to an external address- Specified by:
withdrawFunds
in interfaceAccountService
- Parameters:
params
- The withdrawl details- Returns:
- The result of the withdrawal (usually a transaction ID)
- Throws:
IOException
- - Indication that a networking error occurred while fetching JSON data
-
requestDepositAddress
Description copied from interface:AccountService
Request a digital currency address to fund this account. Allows to fund the exchange account with digital currency from an external address- Specified by:
requestDepositAddress
in interfaceAccountService
- Parameters:
currency
- The digital currency that corresponds to the desired deposit address.arguments
- Necessary argument(s) as aString
- Returns:
- the internal deposit address to send funds to
- Throws:
IOException
- - Indication that a networking error occurred while fetching JSON data
-
createFundingHistoryParams
Description copied from interface:AccountService
CreateTradeHistoryParams
object specific to this exchange. Object created by this method may be used to discover supported and requiredAccountService.getFundingHistory(TradeHistoryParams)
parameters and should be passed only to the method in the same class as the createFundingHistoryParams that created the object.- Specified by:
createFundingHistoryParams
in interfaceAccountService
-
getFundingHistory
- Specified by:
getFundingHistory
in interfaceAccountService
- Returns:
- list of funding history if available or an empty list otherwise. This should never return null.
- Throws:
IOException
- - Indication that a networking error occurred while fetching JSON data
-
getDynamicTradingFeesByInstrument
Description copied from interface:AccountService
Get the trading fees per instrument as determined by the given exchange's rules for adjusting fees by recent volume traded. Some exchanges will provide the current fees per currency via a single API request, while others require more logic to compute by hand.- Specified by:
getDynamicTradingFeesByInstrument
in interfaceAccountService
- Returns:
- map between currency pairs and their fees at the time of invocation.
- Throws:
IOException
- - Indication that a networking error occurred while fetching JSON data
-