Interface OkCoin


@Path("v1")
@Produces("application/json")
public interface OkCoin
  • 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

      @GET @Path("exchange_rate.do") OkCoinFutureComment getExchangRate_US_CH() throws IOException
      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