Interface AccountService
- All Superinterfaces:
BaseService
- All Known Implementing Classes:
AscendexAccountService
,BiboxAccountService
,BinanceAccountService
,BinanceUsAccountService
,BitbayAccountService
,BitbayAccountService
,BitcoinCoreAccountService
,BitcoindeAccountService
,BitcoindeAccountService
,BitcointoyouAccountService
,BitfinexAccountService
,BitflyerAccountService
,BithumbAccountService
,BitmexAccountService
,BitsoAccountService
,BitstampAccountService
,BittrexAccountService
,BityAccountService
,Bl3pAccountService
,BleutradeAccountService
,BlockchainAccountService
,BTCMarketsAccountService
,BTCTurkAccountService
,BybitAccountService
,CCEXAccountService
,CexIOAccountService
,CoinbaseAccountService
,CoinbaseAccountService
,CoinbaseProAccountService
,CoindealAccountService
,CoindirectAccountService
,CoinEggAccountService
,CoinexAccountService
,CoinfloorAccountService
,CoingiAccountService
,CoinjarAccountService
,CoinmateAccountService
,CoinoneAccountService
,CryptowatchAccountService
,DeribitAccountService
,EnigmaAccountService
,ExmoAccountService
,FtxAccountService
,GateioAccountService
,GeminiAccountService
,GlobitexAccountService
,HitbtcAccountService
,HuobiAccountService
,IdexAccountService
,IndependentReserveAccountService
,ItBitAccountService
,KrakenAccountService
,KrakenFuturesAccountService
,KucoinAccountService
,KunaAccountService
,LatokenAccountService
,LivecoinAccountService
,LunoAccountService
,LykkeAccountService
,MercadoBitcoinAccountService
,MEXCAccountService
,OkCoinAccountService
,OkCoinFuturesAccountService
,OkexAccountService
,OkexAccountService
,PaymiumAccountService
,PoloniexAccountService
,QuoineAccountService
,RippleAccountService
,SimulatedAccountService
,TheRockAccountService
,TradeOgreAccountService
,UpbitAccountService
,VaultoroAccountService
,YoBitAccountService
,YoBitAccountServiceRaw
Interface to provide the following to
Exchange
:
- Standard methods available to explore send/receive account-related data
The implementation of this service is expected to be based on a client polling mechanism of some kind
-
Method Summary
Modifier and TypeMethodDescriptiondefault TradeHistoryParams
CreateTradeHistoryParams
object specific to this exchange.default AccountInfo
Get account infodefault Map<Instrument,
Fee> Get the trading fees per instrument as determined by the given exchange's rules for adjusting fees by recent volume traded.default List<FundingRecord>
getFundingHistory
(TradeHistoryParams params) default String
requestDepositAddress
(Currency currency, String... args) Request a digital currency address to fund this account.default String
Request a digital currency address to fund this account.default AddressWithTag
requestDepositAddressData
(Currency currency, String... args) Request a digital currency address to fund this account.default AddressWithTag
Request a digital currency address to fund this account.default String
withdrawFunds
(Currency currency, BigDecimal amount, String address) Convenience method, typically just delegates to withdrawFunds(WithdrawFundsParams params)default String
withdrawFunds
(Currency currency, BigDecimal amount, AddressWithTag address) Convenience method, typically just delegates to withdrawFunds(WithdrawFundsParams params)default String
withdrawFunds
(WithdrawFundsParams params) Withdraw funds from this account.
-
Method Details
-
getAccountInfo
Get account info- Returns:
- the AccountInfo object, null if some sort of error occurred. Implementers should log the error.
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-
withdrawFunds
default String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException Convenience method, typically just delegates to withdrawFunds(WithdrawFundsParams params)- Parameters:
currency
- The currency to withdrawamount
- The amount to withdrawaddress
- The destination address- Returns:
- The result of the withdrawal (usually a transaction ID)
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-
withdrawFunds
default String withdrawFunds(Currency currency, BigDecimal amount, AddressWithTag address) throws IOException Convenience method, typically just delegates to withdrawFunds(WithdrawFundsParams params)- Parameters:
currency
- The currency to withdrawamount
- The amount to withdrawaddress
- The destination address- Returns:
- The result of the withdrawal (usually a transaction ID)
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-
withdrawFunds
Withdraw funds from this account. Allows to withdraw digital currency funds from the exchange account to an external address- Parameters:
params
- The withdrawl details- Returns:
- The result of the withdrawal (usually a transaction ID)
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-
requestDepositAddress
Request a digital currency address to fund this account. Allows to fund the exchange account with digital currency from an external address- Parameters:
currency
- The digital currency that corresponds to the desired deposit address.args
- Necessary argument(s) as aString
- Returns:
- the internal deposit address to send funds to
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-
requestDepositAddress
Request a digital currency address to fund this account. Allows to fund the exchange account with digital currency from an external address- Parameters:
params
- The deposit address request parameters- Returns:
- the internal deposit address to send funds to
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-
requestDepositAddressData
default AddressWithTag requestDepositAddressData(Currency currency, String... args) throws IOException Request a digital currency address to fund this account. Allows to fund the exchange account with digital currency from an external address- Parameters:
currency
- The digital currency that corresponds to the desired deposit address.- Returns:
- the internal deposit address to send funds to
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-
requestDepositAddressData
default AddressWithTag requestDepositAddressData(RequestDepositAddressParams params) throws IOException Request a digital currency address to fund this account. Allows to fund the exchange account with digital currency from an external address- Parameters:
params
- The deposit address request parameters- Returns:
- the internal deposit address to send funds to
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-
createFundingHistoryParams
CreateTradeHistoryParams
object specific to this exchange. Object created by this method may be used to discover supported and requiredgetFundingHistory(TradeHistoryParams)
parameters and should be passed only to the method in the same class as the createFundingHistoryParams that created the object. -
getFundingHistory
- Returns:
- list of funding history if available or an empty list otherwise. This should never return null.
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-
getDynamicTradingFeesByInstrument
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.- Returns:
- map between currency pairs and their fees at the time of invocation.
- Throws:
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been implementedIOException
- - Indication that a networking error occurred while fetching JSON data
-