Package org.knowm.xchange.gateio.service
Class GateioAccountService
java.lang.Object
org.knowm.xchange.service.BaseExchangeService<GateioExchange>
org.knowm.xchange.service.BaseResilientExchangeService<GateioExchange>
org.knowm.xchange.gateio.service.GateioBaseService
org.knowm.xchange.gateio.service.GateioAccountServiceRaw
org.knowm.xchange.gateio.service.GateioAccountService
- All Implemented Interfaces:
AccountService,BaseService
-
Field Summary
Fields inherited from class org.knowm.xchange.gateio.service.GateioBaseService
apiKey, gateio, gateioV4Authenticated, gateioV4ParamsDigestFields inherited from class org.knowm.xchange.service.BaseResilientExchangeService
resilienceRegistriesFields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange -
Constructor Summary
ConstructorsConstructorDescriptionGateioAccountService(GateioExchange exchange, ResilienceRegistries resilienceRegistries) -
Method Summary
Modifier and TypeMethodDescriptionGet account infogetDynamicTradingFeesByInstrument(String... category) Get the trading fees per instrument as determined by the given exchange's rules for adjusting fees by recent volume traded.getFundingHistory(TradeHistoryParams params) booleansetLeverage(Instrument instrument, int leverage, Object... args) set leverage for futures contract leverage ≠ 0: Isolated Margin Mode (Regardless of whether cross_leverage_limit is filled, this parameter will be ignored) leverage = 0: Cross Margin Mode (Use cross_leverage_limit to set the leverage multiple)withdrawFunds(WithdrawFundsParams params) Withdraw funds from this account.Methods inherited from class org.knowm.xchange.gateio.service.GateioAccountServiceRaw
getAccountBookRecords, getDepositAddress, getDeposits, getFuturesFee, getSavedAddresses, getSpotBalances, getSpotFee, getSubAccountTransfers, getWithdrawals, getWithdrawStatus, setLeverage, withdrawMethods inherited from class org.knowm.xchange.service.BaseResilientExchangeService
decorateApiCall, rateLimiter, rateLimiter, retry, retryMethods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.knowm.xchange.service.account.AccountService
createFundingHistoryParams, requestDepositAddress, requestDepositAddress, requestDepositAddressData, requestDepositAddressData, withdrawFunds, withdrawFunds
-
Constructor Details
-
GateioAccountService
-
-
Method Details
-
getAccountInfo
Description copied from interface:AccountServiceGet account info- Specified by:
getAccountInfoin 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
Description copied from interface:AccountServiceWithdraw funds from this account. Allows to withdraw digital currency funds from the exchange account to an external address- Specified by:
withdrawFundsin 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
-
getFundingHistory
- Specified by:
getFundingHistoryin 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
-
setLeverage
set leverage for futures contract leverage ≠ 0: Isolated Margin Mode (Regardless of whether cross_leverage_limit is filled, this parameter will be ignored) leverage = 0: Cross Margin Mode (Use cross_leverage_limit to set the leverage multiple)- Specified by:
setLeveragein interfaceAccountService- Parameters:
instrument- symbol to change leverageleverage- leverageargs- cross_leverage- Returns:
- is successful
- Throws:
IOException
-
getDynamicTradingFeesByInstrument
Description copied from interface:AccountServiceGet 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:
getDynamicTradingFeesByInstrumentin interfaceAccountService- Parameters:
category- Optional arguments - instrument category. Exchange-specific (SPOT, SWAP, etc...)- 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
-