Interface OrderBookAPI


@Produces("application/json") @Path("api") public interface OrderBookAPI
Based on code by chenshiwei on 2019/1/22.
  • Method Details

    • getPartOrderBookShallowAggregated

      @GET @Path("v1/market/orderbook/level2_20") KucoinResponse<OrderBookResponse> getPartOrderBookShallowAggregated(@QueryParam("symbol") String symbol) throws IOException
      Get a list of open orders for a symbol. Level-2 order book includes all bids and asks (aggregated by price), this level return only one size for each active price (as if there was only a single order for that size at the level). This API will return a part of Order Book within 20 depth for each side (ask or bid). It is provided to use if you don't need a depth of 100 (valid in some cases). To maintain up-to-date Order Book in real time, please use it with Websocket Feed.
      Parameters:
      symbol - The symbol whose order book should be fetched.
      Returns:
      The aggregated part order book.
      Throws:
      IOException
    • getPartOrderBookAggregated

      @GET @Path("v1/market/orderbook/level2_100") KucoinResponse<OrderBookResponse> getPartOrderBookAggregated(@QueryParam("symbol") String symbol) throws IOException
      Get a list of open orders for a symbol. Level-2 order book includes all bids and asks (aggregated by price), this level return only one size for each active price (as if there was only a single order for that size at the level). This API will return a part of Order Book within 100 depth for each side(ask or bid). It is recommended to use in most cases, it is the fastest Order Book API, and reduces traffic usage. To maintain up-to-date Order Book in real time, please use it with Websocket Feed.
      Parameters:
      symbol - The symbol whose order book should be fetched.
      Returns:
      The aggregated part order book.
      Throws:
      IOException
    • getFullOrderBookAggregated

      @GET @Path("v3/market/orderbook/level2") KucoinResponse<OrderBookResponse> getFullOrderBookAggregated(@QueryParam("symbol") String symbol, @HeaderParam("KC-API-KEY") String apiKey, @HeaderParam("KC-API-SIGN") si.mazi.rescu.ParamsDigest signature, @HeaderParam("KC-API-TIMESTAMP") si.mazi.rescu.SynchronizedValueFactory<Long> nonce, @HeaderParam("KC-API-PASSPHRASE") String apiPassphrase) throws IOException
      Get a list of open orders for a symbol. Level-2 order book includes all bids and asks (aggregated by price), this level return only one size for each active price (as if there was only a single order for that size at the level). This API will return data with full depth. It is generally used by professional traders because it uses more server resources and traffic, and we have strict access frequency control. To maintain up-to-date Order Book in real time, please use it with Websocket Feed.
      Parameters:
      symbol - The symbol whose order book should be fetched.
      Returns:
      The aggregated full order book.
      Throws:
      IOException
    • getFullOrderBookAtomic

      @GET @Path("v2/market/orderbook/level3") KucoinResponse<OrderBookResponse> getFullOrderBookAtomic(@QueryParam("symbol") String symbol) throws IOException
      Get a list of open orders for a symbol. Level-3 order book includes all bids and asks (non-aggregated, each item in Level-3 means a single order). Level 3 is non-aggregated and returns the entire order book. This API is generally used by professional traders because it uses more server resources and traffic, and we have strict access frequency control. To Maintain up-to-date Order Book in real time, please use it with Websocket Feed.
      Parameters:
      symbol - The symbol whose order book should be fetched.
      Returns:
      The full atomic order book.
      Throws:
      IOException