Class BinanceUsAccountService
java.lang.Object
org.knowm.xchange.service.BaseExchangeService<E>
org.knowm.xchange.service.BaseResilientExchangeService<BinanceExchange>
org.knowm.xchange.binance.service.BinanceBaseService
org.knowm.xchange.binance.service.BinanceAccountServiceRaw
org.knowm.xchange.binance.service.BinanceAccountService
org.knowm.xchange.binance.service.BinanceUsAccountService
- All Implemented Interfaces:
AccountService
,BaseService
-
Field Summary
Fields inherited from class org.knowm.xchange.binance.service.BinanceBaseService
apiKey, binance, binanceFutures, inverseBinanceFutures, signatureCreator
Fields inherited from class org.knowm.xchange.service.BaseResilientExchangeService
resilienceRegistries
Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange
-
Constructor Summary
ConstructorDescriptionBinanceUsAccountService
(BinanceExchange exchange, ResilienceRegistries resilienceRegistries) -
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... args) Request a digital currency address to fund this account.requestDepositAddressData
(Currency currency, String... args) Request a digital currency address to fund this account.withdrawFunds
(Currency currency, BigDecimal amount, String address) Convenience method, typically just delegates to withdrawFunds(WithdrawFundsParams params)withdrawFunds
(Currency currency, BigDecimal amount, AddressWithTag address) Convenience method, typically just delegates to withdrawFunds(WithdrawFundsParams params)withdrawFunds
(WithdrawFundsParams params) Withdraw funds from this account.Methods inherited from class org.knowm.xchange.binance.service.BinanceAccountServiceRaw
account, depositHistory, futuresAccount, getAssetDividend, getAssetDividend, getSubUserHistory, getTransferHistory, requestAssetDetail, requestDepositAddress, withdraw, withdraw, withdrawHistory
Methods inherited from class org.knowm.xchange.binance.service.BinanceBaseService
getExchangeInfo, getFutureExchangeInfo, getRecvWindow, getTimestampFactory
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
-
Field Details
-
LOG
protected final org.slf4j.Logger LOG
-
-
Constructor Details
-
BinanceUsAccountService
-
-
Method Details
-
getAccountInfo
Description copied from interface:AccountService
Get account info- Specified by:
getAccountInfo
in interfaceAccountService
- Overrides:
getAccountInfo
in classBinanceAccountService
- 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
-
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
- Overrides:
getDynamicTradingFeesByInstrument
in classBinanceAccountService
- 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
-
withdrawFunds
public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException Description copied from interface:AccountService
Convenience method, typically just delegates to withdrawFunds(WithdrawFundsParams params)- Specified by:
withdrawFunds
in interfaceAccountService
- Overrides:
withdrawFunds
in classBinanceAccountService
- Parameters:
currency
- The currency to withdrawamount
- The amount to withdrawaddress
- The destination address- Returns:
- The result of the withdrawal (usually a transaction ID)
- Throws:
IOException
- - Indication that a networking error occurred while fetching JSON data
-
withdrawFunds
public String withdrawFunds(Currency currency, BigDecimal amount, AddressWithTag address) throws IOException Description copied from interface:AccountService
Convenience method, typically just delegates to withdrawFunds(WithdrawFundsParams params)- Specified by:
withdrawFunds
in interfaceAccountService
- Overrides:
withdrawFunds
in classBinanceAccountService
- Parameters:
currency
- The currency to withdrawamount
- The amount to withdrawaddress
- The destination address- Returns:
- The result of the withdrawal (usually a transaction ID)
- Throws:
IOException
- - Indication that a networking error occurred while fetching JSON data
-
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
- Overrides:
withdrawFunds
in classBinanceAccountService
- 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
- Overrides:
requestDepositAddress
in classBinanceAccountService
- 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:
IOException
- - Indication that a networking error occurred while fetching JSON data
-
requestDepositAddressData
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:
requestDepositAddressData
in interfaceAccountService
- Overrides:
requestDepositAddressData
in classBinanceAccountService
- Parameters:
currency
- The digital currency that corresponds to the desired deposit address.- Returns:
- the internal deposit address to send funds to
-
getAssetDetails
- Overrides:
getAssetDetails
in classBinanceAccountService
-
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
- Overrides:
createFundingHistoryParams
in classBinanceAccountService
-
getFundingHistory
- Specified by:
getFundingHistory
in interfaceAccountService
- Overrides:
getFundingHistory
in classBinanceAccountService
- Returns:
- list of funding history if available or an empty list otherwise. This should never return null.
-
getSystemStatus
- Overrides:
getSystemStatus
in classBinanceBaseService
-