Interface OkexV3


@Path("/api")
@Produces("application/json")
public interface OkexV3
  • Field Details

  • Method Details

    • fundingAccountInformation

      @GET @Path("/account/v3/wallet") List<OkexFundingAccountRecord> fundingAccountInformation​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Funding Account API *********************************
      Throws:
      IOException
      OkexException
    • currencyInformation

      @GET @Path("/account/v3/currencies") List<OkexCurrencyInformation> currencyInformation​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • fundsTransfer

      @POST @Path("/account/v3/transfer") @Consumes("application/json") FundsTransferResponse fundsTransfer​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, FundsTransferRequest req) throws IOException, OkexException
      Parameters:
      currency - required, Token
      amount - required, Transfer amount
      from - required, the remitting account (0: sub account 1: spot 3: futures 4:C2C 5: margin 6: Funding Account 8:PiggyBank 9:swap)
      to - required, the beneficiary account(0: sub account 1:spot 3: futures 4:C2C 5: margin 6: Funding Account 8:PiggyBank 9 :swap)
      subAccount - optional, sub account name
      instrumentid - optional, margin token pair ID, for supported pairs only
      Returns:
      Throws:
      IOException
      OkexException
    • withdrawal

      @POST @Path("/account/v3/withdrawal") @Consumes("application/json") OkexWithdrawalResponse withdrawal​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, OkexWithdrawalRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • recentWithdrawalHistory

      @GET @Path("/account/v3/withdrawal/history") List<OkexWithdrawalRecord> recentWithdrawalHistory​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • recentDepositHistory

      @GET @Path("/account/v3/deposit/history") List<OkexDepositRecord> recentDepositHistory​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • spotTradingAccount

      @GET @Path("/spot/v3/accounts") List<OkexSpotAccountRecord> spotTradingAccount​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Spot Token Trading API *********************************
      Throws:
      IOException
      OkexException
    • spotPlaceOrder

      @POST @Path("/spot/v3/orders") @Consumes("application/json") OrderPlacementResponse spotPlaceOrder​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, SpotOrderPlacementRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • spotPlaceMultipleOrders

      @POST @Path("/spot/v3/batch_orders") @Consumes("application/json") Map<String,​List<OrderPlacementResponse>> spotPlaceMultipleOrders​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, List<SpotOrderPlacementRequest> req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • spotCancelOrder

      @POST @Path("/spot/v3/cancel_orders/{order_id}") @Consumes("application/json") OrderCancellationResponse spotCancelOrder​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("order_id") String orderId, OrderCancellationRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • spotCancelMultipleOrders

      @POST @Path("/spot/v3/cancel_batch_orders") @Consumes("application/json") Map<String,​List<OrderCancellationResponse>> spotCancelMultipleOrders​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, List<OrderBatchCancellationRequest> req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getSpotOrderList

      @GET @Path("/spot/v3/orders") List<OkexOpenOrder> getSpotOrderList​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @QueryParam("instrument_id") String instrumentId, @QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("limit") Integer limit, @QueryParam("state") String state) throws IOException, OkexException
      Parameters:
      instrumentId - [required] list the orders of specific trading pairs
      from - [optional] request page after this id (latest information) (eg. 1, 2, 3, 4, 5. There is only a 5 "from 4", while there are 1, 2, 3 "to 4")
      to - [optional] request page after (newer) this id.
      limit - [optional] number of results per request. Maximum 100. (default 100)
      state - [required ] Order Status("-2":Failed,"-1":Cancelled,"0":Open ,"1":Partially Filled, "2":Fully Filled,"3":Submitting,"4":Cancelling,"6": Incomplete(open+partially filled),"7":Complete(cancelled+fully filled))
      Returns:
      Throws:
      IOException
      OkexException
    • getSpotOrderDetails

      @GET @Path("/spot/v3/orders/{order_id}") OkexOpenOrder getSpotOrderDetails​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("order_id") String orderId, @QueryParam("instrument_id") String instrumentId) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getSpotTransactionDetails

      @GET @Path("/spot/v3/fills") List<OkexTransaction> getSpotTransactionDetails​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @QueryParam("order_id") String orderId, @QueryParam("instrument_id") String instrumentId, @QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("limit") Integer limit) throws IOException, OkexException
      Parameters:
      orderId - required, order ID
      instrumentId - required, trading pair
      from - optional, Request page before (older) this pagination id,the parameter are order_id, ledger_id or trade_id of the endpoint, etc.
      to - optional, Request page after (newer) this pagination id,the parameter are order_id, ledger_id or trade_id of the endpoint, etc.
      limit - optional, Number of results per request. Maximum 100. (default 100)
      Returns:
      Throws:
      IOException
      OkexException
    • getAllSpotInstruments

      @GET @Path("/spot/v3/instruments") List<OkexSpotInstrument> getAllSpotInstruments() throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getAllSpotTickers

      @GET @Path("/spot/v3/instruments/ticker") List<OkexSpotTicker> getAllSpotTickers() throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getSpotTicker

      @GET @Path("/spot/v3/instruments/{instrument_id}/ticker") OkexSpotTicker getSpotTicker​(@PathParam("instrument_id") String instrumentId) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getOrderBook

      @GET @Path("/spot/v3/instruments/{instrument_id}/book") OkexOrderBook getOrderBook​(@PathParam("instrument_id") String instrumentId, @QueryParam("size") int size) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getAllFutureInstruments

      @GET @Path("/futures/v3/instruments") List<OkexFutureInstrument> getAllFutureInstruments() throws IOException, OkexException
      Futures Trading API *********************************
      Throws:
      IOException
      OkexException
    • getAllFutureTickers

      @GET @Path("/futures/v3/instruments/ticker") List<OkexFutureTicker> getAllFutureTickers() throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getFuturesPositions

      @GET @Path("/futures/v3/position") FuturesPositionsResponse getFuturesPositions​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getFuturesAccounts

      @GET @Path("/futures/v3/accounts") FuturesAccountsResponse getFuturesAccounts​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getFuturesAccounts

      @GET @Path("/futures/v3/accounts/{currency}") FuturesAccountsByCurrencyResponse getFuturesAccounts​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("currency") String currency) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getFuturesLeverage

      @GET @Path("/futures/v3/accounts/{currency}/leverage") FuturesLeverageResponse getFuturesLeverage​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("currency") String currency) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getFuturesBills

      @GET @Path("/futures/v3/accounts/{underlying}/ledger") List<FuturesBillsResponse> getFuturesBills​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("underlying") String underlying, @QueryParam("after") String after, @QueryParam("before") String before, @QueryParam("limit") Integer limit, @QueryParam("type") BillType type) throws IOException, OkexException
      Retrieve the bills of the futures account. The bill refers to all the records that results in changing the balance of an account. This API can retrieve data in the last 2 days.
      Parameters:
      underlying - - requierd,eg:BTC-USD BTC-USDT
      after - - optional, Pagination of data to return records earlier than the requested ledger_id
      before - - optional, Pagination of data to return records newer than the requested ledger_id
      limit - - optional, Number of results per request. The maximum is 100; the default is 100
      type - - optional, 1:Open Long 2:Open Short 3:Close Long 4:Close Short 5:Transaction Fee 6:Transfer In, 7:Transfer Out 8:Settled RPL 13: Full Liquidation of Long 14: Full Liquidation of Short 15: Delivery Long 16: Delivery Short 17:Settled UPL Long 18:Settled UPL Short 20:Partial Liquidation of Short 21:Partial Liquidation of Long
      Throws:
      IOException
      OkexException
    • getFuturesOrderList

      @GET @Path("/futures/v3/orders/{instrument_id}") FuturesOpenOrdersResponse getFuturesOrderList​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("instrument_id") String instrumentId, @QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("limit") Integer limit, @QueryParam("state") String state) throws IOException, OkexException
      Parameters:
      instrumentId -
      from -
      to -
      limit -
      state - Order Status("-2":Failed,"-1":Cancelled,"0":Open ,"1":Partially Filled, "2":Fully Filled,"3":Submitting,"4":Cancelling,"6": Incomplete(open+partially filled),"7":Complete(cancelled+fully filled))
      Returns:
      Throws:
      IOException
      OkexException
    • futuresPlaceOrder

      @POST @Path("/futures/v3/order") @Consumes("application/json") OrderPlacementResponse futuresPlaceOrder​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, FuturesOrderPlacementRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • futuresPlaceMultipleOrders

      @POST @Path("/futures/v3/orders") @Consumes("application/json") SwapFuturesMultipleOrderPlacementResponse futuresPlaceMultipleOrders​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, FuturesMultipleOrderPlacementRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • futuresCancelOrder

      @POST @Path("/futures/v3/cancel_order/{instrument_id}/{order_id}") @Consumes("application/json") OrderCancellationResponse futuresCancelOrder​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("instrument_id") String instrumentId, @PathParam("order_id") String orderId) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • futuresCancelMultipleOrders

      @POST @Path("/futures/v3/cancel_batch_orders/{instrument_id}") @Consumes("application/json") FuturesMultipleOrderCancellationResponse futuresCancelMultipleOrders​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("instrument_id") String instrumentId, OrderBatchCancellationRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getFuturesTransactionDetails

      @GET @Path("/futures/v3/fills") List<OkexFuturesTransaction> getFuturesTransactionDetails​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @QueryParam("order_id") String orderId, @QueryParam("instrument_id") String instrumentId, @QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("limit") Integer limit) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getAllSwapInstruments

      @GET @Path("/swap/v3/instruments") List<OkexSwapInstrument> getAllSwapInstruments() throws IOException, OkexException
      ******************************** Perpetual SWAP Trading API *********************************
      Throws:
      IOException
      OkexException
    • getAllSwapTickers

      @GET @Path("/swap/v3/instruments/ticker") List<OkexSwapTicker> getAllSwapTickers() throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getSwapOrderList

      @GET @Path("/swap/v3/orders/{instrument_id}") SwapOpenOrdersResponse getSwapOrderList​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("instrument_id") String instrumentId, @QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("limit") Integer limit, @QueryParam("state") String state) throws IOException, OkexException
      Parameters:
      instrumentId -
      from -
      to -
      limit -
      state - Yes Order Status("-2":Failed,"-1":Cancelled,"0":Open ,"1":Partially Filled, "2":Fully Filled,"3":Submitting,"4":Cancelling,"6": Incomplete(open+partially filled),"7":Complete(cancelled+fully filled))
      Returns:
      Throws:
      IOException
      OkexException
    • getSwapPositions

      @GET @Path("/swap/v3/position") List<SwapPositionsEntry> getSwapPositions​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getSwapAccounts

      @GET @Path("/swap/v3/accounts") SwapAccountsResponse getSwapAccounts​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • swapPlaceOrder

      @POST @Path("/swap/v3/order") @Consumes("application/json") OrderPlacementResponse swapPlaceOrder​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, SwapOrderPlacementRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • swapPlaceMultipleOrders

      @POST @Path("/swap/v3/orders") @Consumes("application/json") SwapFuturesMultipleOrderPlacementResponse swapPlaceMultipleOrders​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, SwapMultipleOrderPlacementRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • swapCancelOrder

      @POST @Path("/swap/v3/cancel_order/{instrument_id}/{order_id}") @Consumes("application/json") OrderCancellationResponse swapCancelOrder​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("instrument_id") String instrumentId, @PathParam("order_id") String orderId) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • swapCancelMultipleOrders

      @POST @Path("/swap/v3/cancel_batch_orders/{instrument_id}") @Consumes("application/json") SwapMultipleOrderCancellationResponse swapCancelMultipleOrders​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("instrument_id") String instrumentId, SwapOrderBatchCancellationRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getSwapTransactionDetails

      @GET @Path("/swap/v3/fills") List<OkexSwapTransaction> getSwapTransactionDetails​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @QueryParam("order_id") String orderId, @QueryParam("instrument_id") String instrumentId, @QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("limit") Integer limit) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • marginAccounts

      @GET @Path("/margin/v3/accounts") MarginAccountResponse[] marginAccounts​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Margin Trading API *********************************
      Throws:
      IOException
      OkexException
    • marginAccountsSettings

      @GET @Path("/margin/v3/accounts/availability") List<MarginAccountSettingsRecord> marginAccountsSettings​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • marginPlaceOrder

      @POST @Path("/margin/v3/orders") @Consumes("application/json") OrderPlacementResponse marginPlaceOrder​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, SpotOrderPlacementRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • setLeverage

      @POST @Path("/margin/v3/accounts/{instrument_id}/leverage") @Consumes("application/json") OkexResponse setLeverage​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("instrument_id") String instrumentId, MarginSetLeverageRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • marginBorrow

      @POST @Path("/margin/v3/accounts/borrow") @Consumes("application/json") MarginBorrowResponse marginBorrow​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, MarginBorrowRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • marginRepayment

      @POST @Path("/margin/v3/accounts/repayment") @Consumes("application/json") MarginRepaymentResponse marginRepayment​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, MarginRepaymentRequest req) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • marginCancelOrder

      @POST @Path("/margin/v3/cancel_order/{instrument_id}/{order_id}") @Consumes("application/json") OrderCancellationResponse marginCancelOrder​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @PathParam("instrument_id") String instrumentId, @PathParam("order_id") String orderId) throws IOException, OkexException
      Throws:
      IOException
      OkexException
    • getMarginOrderList

      @GET @Path("/margin/v3/orders") List<OkexOpenOrder> getMarginOrderList​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @QueryParam("instrument_id") String instrumentId, @QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("limit") Integer limit, @QueryParam("state") String state) throws IOException, OkexException
      Parameters:
      instrumentId - [required] list the orders of specific trading pairs
      from - [optional] request page after this id (latest information) (eg. 1, 2, 3, 4, 5. There is only a 5 "from 4", while there are 1, 2, 3 "to 4")
      to - [optional] request page after (newer) this id.
      limit - [optional] number of results per request. Maximum 100. (default 100)
      state - [required ] Order Status("-2":Failed,"-1":Cancelled,"0":Open ,"1":Partially Filled, "2":Fully Filled,"3":Submitting,"4":Cancelling,"6": Incomplete(open+partially filled),"7":Complete(cancelled+fully filled))
      Returns:
      Throws:
      IOException
      OkexException
    • getMarginTransactionDetails

      @GET @Path("/margin/v3/fills") List<OkexTransaction> getMarginTransactionDetails​(@HeaderParam("OK-ACCESS-KEY") String apiKey, @HeaderParam("OK-ACCESS-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("OK-ACCESS-TIMESTAMP") String timestamp, @HeaderParam("OK-ACCESS-PASSPHRASE") String passphrase, @QueryParam("order_id") String orderId, @QueryParam("instrument_id") String instrumentId, @QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("limit") Integer limit) throws IOException, OkexException
      Parameters:
      orderId - required, order ID
      instrumentId - required, trading pair
      from - optional, Request page before (older) this pagination id,the parameter are order_id, ledger_id or trade_id of the endpoint, etc.
      to - optional, Request page after (newer) this pagination id,the parameter are order_id, ledger_id or trade_id of the endpoint, etc.
      limit - optional, Number of results per request. Maximum 100. (default 100)
      Returns:
      Throws:
      IOException
      OkexException