Class OkexAccountService

All Implemented Interfaces:
AccountService, BaseService

public class OkexAccountService
extends OkexAccountServiceRaw
implements AccountService
  • Constructor Details

    • OkexAccountService

      public OkexAccountService​(OkexExchangeV3 exchange)
  • 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
    • 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 interface AccountService
      Parameters:
      currency - The currency to withdraw
      amount - The amount to withdraw
      address - 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
    • getStaticFee

      public BigDecimal getStaticFee​(String currency)
    • 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