Package org.knowm.xchange.okcoin
Interface OkexV3
@Path("/api")
@Produces("application/json")
public interface OkexV3
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncurrencyInformation(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) fundingAccountInformation(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) Funding Account API *********************************fundsTransfer(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, FundsTransferRequest req) futuresCancelMultipleOrders(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, OrderBatchCancellationRequest req) futuresCancelOrder(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, String orderId) futuresPlaceMultipleOrders(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, FuturesMultipleOrderPlacementRequest req) futuresPlaceOrder(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, FuturesOrderPlacementRequest req) Futures Trading API ***************************************************************** Perpetual SWAP Trading API *********************************getFuturesAccounts(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) getFuturesAccounts(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String currency) getFuturesBills(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String underlying, String after, String before, Integer limit, BillType type) Retrieve the bills of the futures account.getFuturesLeverage(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String currency) getFuturesOrderList(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, String from, String to, Integer limit, String state) getFuturesPositions(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) getFuturesTransactionDetails(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String orderId, String instrumentId, String from, String to, Integer limit) getMarginOrderList(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, String from, String to, Integer limit, String state) getMarginTransactionDetails(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String orderId, String instrumentId, String from, String to, Integer limit) getOrderBook(String instrumentId, int size) getSpotOrderDetails(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String orderId, String instrumentId) getSpotOrderList(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, String from, String to, Integer limit, String state) getSpotTicker(String instrumentId) getSpotTransactionDetails(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String orderId, String instrumentId, String from, String to, Integer limit) getSwapAccounts(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) getSwapOrderList(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, String from, String to, Integer limit, String state) getSwapPositions(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) getSwapTransactionDetails(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String orderId, String instrumentId, String from, String to, Integer limit) marginAccounts(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) Margin Trading API *********************************marginAccountsSettings(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) marginBorrow(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, MarginBorrowRequest req) marginCancelOrder(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, String orderId) marginPlaceOrder(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, SpotOrderPlacementRequest req) marginRepayment(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, MarginRepaymentRequest req) recentDepositHistory(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) recentWithdrawalHistory(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) setLeverage(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, MarginSetLeverageRequest req) spotCancelMultipleOrders(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, List<OrderBatchCancellationRequest> req) spotCancelOrder(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String orderId, OrderCancellationRequest req) spotPlaceMultipleOrders(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, List<SpotOrderPlacementRequest> req) spotPlaceOrder(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, SpotOrderPlacementRequest req) spotTradingAccount(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase) Spot Token Trading API *********************************swapCancelMultipleOrders(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, SwapOrderBatchCancellationRequest req) swapCancelOrder(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, String instrumentId, String orderId) swapPlaceMultipleOrders(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, SwapMultipleOrderPlacementRequest req) swapPlaceOrder(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, SwapOrderPlacementRequest req) withdrawal(String apiKey, si.mazi.rescu.ParamsDigest signature, String timestamp, String passphrase, OkexWithdrawalRequest req)
-
Field Details
-
OK_ACCESS_PASSPHRASE
- See Also:
-
OK_ACCESS_KEY
- See Also:
-
OK_ACCESS_SIGN
- See Also:
-
OK_ACCESS_TIMESTAMP
- See Also:
-
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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, Tokenamount- required, Transfer amountfrom- 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 nameinstrumentid- optional, margin token pair ID, for supported pairs only- Returns:
- Throws:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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 pairsfrom- [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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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 IDinstrumentId- required, trading pairfrom- 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:
IOExceptionOkexException
-
getAllSpotInstruments
@GET @Path("/spot/v3/instruments") List<OkexSpotInstrument> getAllSpotInstruments() throws IOException, OkexException- Throws:
IOExceptionOkexException
-
getAllSpotTickers
@GET @Path("/spot/v3/instruments/ticker") List<OkexSpotTicker> getAllSpotTickers() throws IOException, OkexException- Throws:
IOExceptionOkexException
-
getSpotTicker
@GET @Path("/spot/v3/instruments/{instrument_id}/ticker") OkexSpotTicker getSpotTicker(@PathParam("instrument_id") String instrumentId) throws IOException, OkexException - Throws:
IOExceptionOkexException
-
getOrderBook
@GET @Path("/spot/v3/instruments/{instrument_id}/book") OkexOrderBook getOrderBook(@PathParam("instrument_id") String instrumentId, @QueryParam("size") int size) throws IOException, OkexException - Throws:
IOExceptionOkexException
-
getAllFutureInstruments
@GET @Path("/futures/v3/instruments") List<OkexFutureInstrument> getAllFutureInstruments() throws IOException, OkexExceptionFutures Trading API *********************************- Throws:
IOExceptionOkexException
-
getAllFutureTickers
@GET @Path("/futures/v3/instruments/ticker") List<OkexFutureTicker> getAllFutureTickers() throws IOException, OkexException- Throws:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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-USDTafter- - optional, Pagination of data to return records earlier than the requested ledger_idbefore- - optional, Pagination of data to return records newer than the requested ledger_idlimit- - optional, Number of results per request. The maximum is 100; the default is 100type- - 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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
getAllSwapInstruments
@GET @Path("/swap/v3/instruments") List<OkexSwapInstrument> getAllSwapInstruments() throws IOException, OkexException******************************** Perpetual SWAP Trading API *********************************- Throws:
IOExceptionOkexException
-
getAllSwapTickers
@GET @Path("/swap/v3/instruments/ticker") List<OkexSwapTicker> getAllSwapTickers() throws IOException, OkexException- Throws:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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:
IOExceptionOkexException
-
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 pairsfrom- [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:
IOExceptionOkexException
-
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 IDinstrumentId- required, trading pairfrom- 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:
IOExceptionOkexException
-