Package org.knowm.xchange.okcoin
Interface OkCoin
@Path("v1")
@Produces("application/json")
public interface OkCoin
-
Method Summary
Modifier and Type Method Description OkCoinMoreTradeResult
batchTrade(String apikey, String symbol, String type, String ordersData, si.mazi.rescu.ParamsDigest sign)
OkCoinTradeResult
cancelOrder(String api_key, long orderId, String symbol, si.mazi.rescu.ParamsDigest sign)
OkCoinBatchTradeResult
cancelOrders(String api_key, String orderIds, String symbols, si.mazi.rescu.ParamsDigest sign)
OkCoinErrorResult
fundsTransfer(String apikey, String symbol, String amount, int from, int to, si.mazi.rescu.ParamsDigest sign)
OkCoinMoreTradeResult
futureBatchTrade(String apiKey, String symbol, String contractType, String ordersData, si.mazi.rescu.ParamsDigest sign, String leverRate)
OkCoinFutureExplosiveResult
futureExplosive(String apiKey, String symbol, String contractType, String status, si.mazi.rescu.ParamsDigest sign, Integer currentPage, Integer pageNumber, Integer pageLength)
OkCoinTradeResult
futuresCancelOrder(String api_key, String orderId, String symbol, String contract, si.mazi.rescu.ParamsDigest sign)
OkCoinTradeResult
futuresTrade(String api_key, String symbol, String contract, String type, String price, String amount, int matchPrice, int leverRate, si.mazi.rescu.ParamsDigest sign)
OkCoinAccountRecords
getAccountRecords(String apikey, String symbol, String type, String currentPage, String pageLength, si.mazi.rescu.ParamsDigest sign)
OkCoinDepth
getDepth(String ok, String symbol, Integer size)
OkCoinFutureComment
getExchangRate_US_CH()
OkCoinFutureComment
getFutureEstimatedPrice(String ok, String symbol)
OkCoinFutureHoldAmount[]
getFutureHoldAmount(String ok, String symbol, String contractType)
List<Object[]>
getFutureKline(String ok, String symbol, String type, String contractType, Integer size, Long timestamp)
OkCoinFutureComment
getFuturePriceLimit(String ok, String symbol, String contractType)
OkCoinDepth
getFuturesDepth(String ok, String symbol, String contract)
OkCoinFutureComment
getFuturesIndex(String ok, String symbol)
OkCoinFuturesOrderResult
getFuturesOrder(String api_key, long orderId, String symbol, String status, String currentPage, String pageLength, String contract, si.mazi.rescu.ParamsDigest sign)
OkCoinFuturesOrderResult
getFuturesOrders(String api_key, String orderId, String symbol, String contract, si.mazi.rescu.ParamsDigest sign)
OkCoinPositionResult
getFuturesPositionsCross(String api_key, String symbol, String contract, si.mazi.rescu.ParamsDigest sign)
OkCoinPositionResult
getFuturesPositionsFixed(String api_key, String symbol, String contract, si.mazi.rescu.ParamsDigest sign)
OkCoinPriceLimit
getFuturesPriceLimits(String symbol, String contract)
OkCoinTickerResponse
getFuturesTicker(String symbol, String contract)
合约行情 API ***************OkCoinFuturesTradeHistoryResult[]
getFuturesTradeHistory(String api_key, long since, String symbol, String date, si.mazi.rescu.ParamsDigest sign)
OkCoinTrade[]
getFuturesTrades(String ok, String symbol, String contract)
OkCoinTrade[]
getFuturesTrades(String ok, String symbol, String contract, long since)
合约交易 API ***************OkCoinFuturesUserInfoCross
getFuturesUserInfoCross(String api_key, si.mazi.rescu.ParamsDigest sign)
OkCoinFuturesUserInfoFixed
getFuturesUserInfoFixed(String api_key, si.mazi.rescu.ParamsDigest sign)
List<Object[]>
getKlines(String symbol, String type, Integer size, Long timestamp)
OkCoinOrderResult
getOrder(String api_key, long orderId, String symbol, si.mazi.rescu.ParamsDigest sign)
OkCoinOrderResult
getOrderHistory(String apikey, String symbol, String status, String currentPage, String pageLength, si.mazi.rescu.ParamsDigest sign)
OkCoinOrderResult
getOrders(String api_key, Integer type, String orderIds, String symbol, si.mazi.rescu.ParamsDigest sign)
OkCoinTickerResponse
getTicker(String ok, String symbol)
币币行情 API ***************OkCoinTrade[]
getTrades(String ok, String symbol, Long since)
OkCoinUserInfo
getUserInfo(String apikey, si.mazi.rescu.ParamsDigest sign)
币币交易 API ***************OkCoinTradeResult
placeMarketOrderBuy(String apikey, String symbol, String type, String price, si.mazi.rescu.ParamsDigest sign)
OkCoinTradeResult
placeMarketOrderSell(String apikey, String symbol, String type, String amount, si.mazi.rescu.ParamsDigest sign)
OkCoinTradeResult
trade(String apikey, String symbol, String type, String price, String amount, si.mazi.rescu.ParamsDigest sign)
OKCoinWithdraw
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
-