Package org.knowm.xchange.okcoin
Interface OkCoin
@Path("v1")
@Produces("application/json")
public interface OkCoin
-
Method Summary
Modifier and TypeMethodDescriptionbatchTrade
(String apikey, String symbol, String type, String ordersData, si.mazi.rescu.ParamsDigest sign) cancelOrder
(String api_key, long orderId, String symbol, si.mazi.rescu.ParamsDigest sign) cancelOrders
(String api_key, String orderIds, String symbols, si.mazi.rescu.ParamsDigest sign) fundsTransfer
(String apikey, String symbol, String amount, int from, int to, si.mazi.rescu.ParamsDigest sign) futureBatchTrade
(String apiKey, String symbol, String contractType, String ordersData, si.mazi.rescu.ParamsDigest sign, String leverRate) futureExplosive
(String apiKey, String symbol, String contractType, String status, si.mazi.rescu.ParamsDigest sign, Integer currentPage, Integer pageNumber, Integer pageLength) futuresCancelOrder
(String api_key, String orderId, String symbol, String contract, si.mazi.rescu.ParamsDigest sign) futuresTrade
(String api_key, String symbol, String contract, String type, String price, String amount, int matchPrice, int leverRate, si.mazi.rescu.ParamsDigest sign) getAccountRecords
(String apikey, String symbol, String type, String currentPage, String pageLength, si.mazi.rescu.ParamsDigest sign) getFutureEstimatedPrice
(String ok, String symbol) getFutureHoldAmount
(String ok, String symbol, String contractType) getFutureKline
(String ok, String symbol, String type, String contractType, Integer size, Long timestamp) getFuturePriceLimit
(String ok, String symbol, String contractType) getFuturesDepth
(String ok, String symbol, String contract) getFuturesIndex
(String ok, String symbol) getFuturesOrder
(String api_key, long orderId, String symbol, String status, String currentPage, String pageLength, String contract, si.mazi.rescu.ParamsDigest sign) getFuturesOrders
(String api_key, String orderId, String symbol, String contract, si.mazi.rescu.ParamsDigest sign) getFuturesPositionsCross
(String api_key, String symbol, String contract, si.mazi.rescu.ParamsDigest sign) getFuturesPositionsFixed
(String api_key, String symbol, String contract, si.mazi.rescu.ParamsDigest sign) getFuturesPriceLimits
(String symbol, String contract) getFuturesTicker
(String symbol, String contract) 合约行情 API ***************getFuturesTradeHistory
(String api_key, long since, String symbol, String date, si.mazi.rescu.ParamsDigest sign) getFuturesTrades
(String ok, String symbol, String contract) getFuturesTrades
(String ok, String symbol, String contract, long since) 合约交易 API ***************getFuturesUserInfoCross
(String api_key, si.mazi.rescu.ParamsDigest sign) getFuturesUserInfoFixed
(String api_key, si.mazi.rescu.ParamsDigest sign) getOrderHistory
(String apikey, String symbol, String status, String currentPage, String pageLength, si.mazi.rescu.ParamsDigest sign) getOrders
(String api_key, Integer type, String orderIds, String symbol, si.mazi.rescu.ParamsDigest sign) 币币行情 API ***************getUserInfo
(String apikey, si.mazi.rescu.ParamsDigest sign) 币币交易 API ***************placeMarketOrderBuy
(String apikey, String symbol, String type, String price, si.mazi.rescu.ParamsDigest sign) placeMarketOrderSell
(String apikey, String symbol, String type, String amount, si.mazi.rescu.ParamsDigest sign) trade
(String apikey, String symbol, String type, String price, String amount, si.mazi.rescu.ParamsDigest sign) withdraw
(String api_key, String symbol, si.mazi.rescu.ParamsDigest sign, String chargefee, String trade_pwd, String withdraw_address, String withdraw_amount, String target)
-
Method Details
-
getTicker
@GET @Path("ticker.do") OkCoinTickerResponse getTicker(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol) throws IOException 币币行情 API ***************- Throws:
IOException
-
getDepth
@GET @Path("depth.do") OkCoinDepth getDepth(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol, @QueryParam("size") Integer size) throws IOException - Throws:
IOException
-
getTrades
@GET @Path("trades.do") OkCoinTrade[] getTrades(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol, @QueryParam("since") Long since) throws IOException - Throws:
IOException
-
getKlines
@GET @Path("kline.do") List<Object[]> getKlines(@QueryParam("symbol") String symbol, @QueryParam("type") String type, @QueryParam("size") Integer size, @QueryParam("since") Long timestamp) throws IOException - Throws:
IOException
-
getUserInfo
@POST @Path("userinfo.do") OkCoinUserInfo getUserInfo(@FormParam("api_key") String apikey, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException 币币交易 API ***************- Throws:
IOException
-
trade
@POST @Path("trade.do") OkCoinTradeResult trade(@FormParam("api_key") String apikey, @FormParam("symbol") String symbol, @FormParam("type") String type, @FormParam("price") String price, @FormParam("amount") String amount, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
placeMarketOrderBuy
@POST @Path("trade.do") OkCoinTradeResult placeMarketOrderBuy(@FormParam("api_key") String apikey, @FormParam("symbol") String symbol, @FormParam("type") String type, @FormParam("price") String price, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
placeMarketOrderSell
@POST @Path("trade.do") OkCoinTradeResult placeMarketOrderSell(@FormParam("api_key") String apikey, @FormParam("symbol") String symbol, @FormParam("type") String type, @FormParam("amount") String amount, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
batchTrade
@POST @Path("batch_trade.do") OkCoinMoreTradeResult batchTrade(@FormParam("api_key") String apikey, @FormParam("symbol") String symbol, @FormParam("type") String type, @FormParam("orders_data") String ordersData, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
cancelOrder
@POST @Path("cancel_order.do") OkCoinTradeResult cancelOrder(@FormParam("api_key") String api_key, @FormParam("order_id") long orderId, @FormParam("symbol") String symbol, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
cancelOrders
@POST @Path("cancel_order.do") OkCoinBatchTradeResult cancelOrders(@FormParam("api_key") String api_key, @FormParam("order_id") String orderIds, @FormParam("symbol") String symbols, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getOrder
@POST @Path("order_info.do") OkCoinOrderResult getOrder(@FormParam("api_key") String api_key, @FormParam("order_id") long orderId, @FormParam("symbol") String symbol, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getOrders
@POST @Path("order_info.do") OkCoinOrderResult getOrders(@FormParam("api_key") String api_key, @FormParam("type") Integer type, @FormParam("order_id") String orderIds, @FormParam("symbol") String symbol, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getFuturesTicker
@GET @Path("future_ticker.do") OkCoinTickerResponse getFuturesTicker(@QueryParam("symbol") String symbol, @QueryParam("contract_type") String contract) throws IOException 合约行情 API ***************- Throws:
IOException
-
getFuturesDepth
@GET @Path("future_depth.do") OkCoinDepth getFuturesDepth(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol, @QueryParam("contract_type") String contract) throws IOException - Throws:
IOException
-
getFuturesTrades
@GET @Path("future_trades.do") OkCoinTrade[] getFuturesTrades(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol, @QueryParam("contract_type") String contract) throws IOException - Throws:
IOException
-
getFuturesIndex
@GET @Path("future_index.do") OkCoinFutureComment getFuturesIndex(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol) throws IOException - Throws:
IOException
-
getExchangRate_US_CH
- Throws:
IOException
-
getFutureEstimatedPrice
@GET @Path("future_estimated_price.do") OkCoinFutureComment getFutureEstimatedPrice(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol) throws IOException - Throws:
IOException
-
getFutureKline
@GET @Path("future_kline.do") List<Object[]> getFutureKline(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol, @QueryParam("type") String type, @QueryParam("contract_type") String contractType, @QueryParam("size") Integer size, @QueryParam("since") Long timestamp) throws IOException - Throws:
IOException
-
getFutureHoldAmount
@GET @Path("future_hold_amount.do") OkCoinFutureHoldAmount[] getFutureHoldAmount(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol, @QueryParam("contract_type") String contractType) throws IOException - Throws:
IOException
-
getFuturePriceLimit
@GET @Path("future_price_limit.do") OkCoinFutureComment getFuturePriceLimit(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol, @QueryParam("contract_type") String contractType) throws IOException - Throws:
IOException
-
getFuturesTrades
@GET @Path("future_trades.do") OkCoinTrade[] getFuturesTrades(@QueryParam("ok") String ok, @QueryParam("symbol") String symbol, @QueryParam("contract_type") String contract, @QueryParam("since") long since) throws IOException 合约交易 API ***************- Throws:
IOException
-
getFuturesUserInfoFixed
@POST @Path("future_userinfo_4fix.do") OkCoinFuturesUserInfoFixed getFuturesUserInfoFixed(@FormParam("api_key") String api_key, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getFuturesUserInfoCross
@POST @Path("future_userinfo.do") OkCoinFuturesUserInfoCross getFuturesUserInfoCross(@FormParam("api_key") String api_key, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
futuresTrade
@POST @Path("future_trade.do") OkCoinTradeResult futuresTrade(@FormParam("api_key") String api_key, @FormParam("symbol") String symbol, @FormParam("contract_type") String contract, @FormParam("type") String type, @FormParam("price") String price, @FormParam("amount") String amount, @FormParam("match_price") int matchPrice, @FormParam("lever_rate") int leverRate, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
futuresCancelOrder
@POST @Path("future_cancel.do") OkCoinTradeResult futuresCancelOrder(@FormParam("api_key") String api_key, @FormParam("order_id") String orderId, @FormParam("symbol") String symbol, @FormParam("contract_type") String contract, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getFuturesOrder
@POST @Path("future_order_info.do") OkCoinFuturesOrderResult getFuturesOrder(@FormParam("api_key") String api_key, @FormParam("order_id") long orderId, @FormParam("symbol") String symbol, @FormParam("status") String status, @FormParam("current_page") String currentPage, @FormParam("page_length") String pageLength, @FormParam("contract_type") String contract, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getFuturesPriceLimits
@GET @Path("future_price_limit.do") OkCoinPriceLimit getFuturesPriceLimits(@QueryParam("symbol") String symbol, @QueryParam("contract_type") String contract) throws IOException - Throws:
IOException
-
getFuturesOrders
@POST @Path("future_orders_info.do") @Consumes("application/x-www-form-urlencoded") OkCoinFuturesOrderResult getFuturesOrders(@FormParam("api_key") String api_key, @FormParam("order_id") String orderId, @FormParam("symbol") String symbol, @FormParam("contract_type") String contract, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getFuturesTradeHistory
@POST @Path("future_trades_history.do") OkCoinFuturesTradeHistoryResult[] getFuturesTradeHistory(@FormParam("api_key") String api_key, @FormParam("since") long since, @FormParam("symbol") String symbol, @FormParam("date") String date, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getFuturesPositionsFixed
@POST @Path("future_position_4fix.do") OkCoinPositionResult getFuturesPositionsFixed(@FormParam("api_key") String api_key, @FormParam("symbol") String symbol, @FormParam("contract_type") String contract, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getFuturesPositionsCross
@POST @Path("future_position.do") OkCoinPositionResult getFuturesPositionsCross(@FormParam("api_key") String api_key, @FormParam("symbol") String symbol, @FormParam("contract_type") String contract, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
getOrderHistory
@POST @Path("order_history.do") OkCoinOrderResult getOrderHistory(@FormParam("api_key") String apikey, @FormParam("symbol") String symbol, @FormParam("status") String status, @FormParam("current_page") String currentPage, @FormParam("page_length") String pageLength, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
withdraw
@POST @Path("withdraw.do") OKCoinWithdraw withdraw(@FormParam("api_key") String api_key, @FormParam("symbol") String symbol, @FormParam("sign") si.mazi.rescu.ParamsDigest sign, @FormParam("chargefee") String chargefee, @FormParam("trade_pwd") String trade_pwd, @FormParam("withdraw_address") String withdraw_address, @FormParam("withdraw_amount") String withdraw_amount, @FormParam("target") String target) throws IOException - Throws:
IOException
-
getAccountRecords
@POST @Path("account_records.do") OkCoinAccountRecords getAccountRecords(@FormParam("api_key") String apikey, @FormParam("symbol") String symbol, @FormParam("type") String type, @FormParam("current_page") String currentPage, @FormParam("page_length") String pageLength, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-
futureBatchTrade
@POST @Path("future_batch_trade.do") OkCoinMoreTradeResult futureBatchTrade(@FormParam("api_key") String apiKey, @FormParam("symbol") String symbol, @FormParam("contract_type") String contractType, @FormParam("orders_data") String ordersData, @FormParam("sign") si.mazi.rescu.ParamsDigest sign, @FormParam("lever_rate") String leverRate) throws IOException - Throws:
IOException
-
futureExplosive
@POST @Path("future_explosive.do") OkCoinFutureExplosiveResult futureExplosive(@FormParam("api_key") String apiKey, @FormParam("symbol") String symbol, @FormParam("contract_type") String contractType, @FormParam("status") String status, @FormParam("sign") si.mazi.rescu.ParamsDigest sign, @FormParam("current_page") Integer currentPage, @FormParam("page_number") Integer pageNumber, @FormParam("page_length") Integer pageLength) -
fundsTransfer
@POST @Path("funds_transfer.do") OkCoinErrorResult fundsTransfer(@FormParam("api_key") String apikey, @FormParam("symbol") String symbol, @FormParam("amount") String amount, @FormParam("from") int from, @FormParam("to") int to, @FormParam("sign") si.mazi.rescu.ParamsDigest sign) throws IOException - Throws:
IOException
-