Class GateioAccountService

All Implemented Interfaces:
AccountService, BaseService

public class GateioAccountService extends GateioAccountServiceRaw implements AccountService
  • Constructor Details

  • Method Details

    • getAccountInfo

      public AccountInfo getAccountInfo() throws IOException
      Description copied from interface: AccountService
      Get account info
      Specified by:
      getAccountInfo in interface AccountService
      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(WithdrawFundsParams params) throws IOException
      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 interface AccountService
      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

      public List<FundingRecord> getFundingHistory(TradeHistoryParams params) throws IOException
      Specified by:
      getFundingHistory in interface AccountService
      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

      public boolean setLeverage(Instrument instrument, int leverage, Object... args) throws IOException
      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:
      setLeverage in interface AccountService
      Parameters:
      instrument - symbol to change leverage
      leverage - leverage
      args - cross_leverage
      Returns:
      is successful
      Throws:
      IOException
    • getDynamicTradingFeesByInstrument

      public Map<Instrument,Fee> getDynamicTradingFeesByInstrument(String... category) throws IOException
      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 interface AccountService
      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