Package org.knowm.xchange.kucoin.service
Interface HistoryAPI
@Path("/api/v1/market")
@Produces("application/json")
public interface HistoryAPI
Based on code by chenshiwei on 2019/1/22.
-
Method Summary
Modifier and TypeMethodDescriptionKucoinResponse<List<Object[]>>
Gets the kline of the specified symbol.getTradeHistories
(String symbol) List the latest trades for a symbol.
-
Method Details
-
getTradeHistories
@GET @Path("/histories") KucoinResponse<List<TradeHistoryResponse>> getTradeHistories(@QueryParam("symbol") String symbol) throws IOException List the latest trades for a symbol.- Parameters:
symbol
- The symbol whose trades should be fetched.- Returns:
- The trades for the symbol.
- Throws:
IOException
-
getKlines
@GET @Path("/candles") KucoinResponse<List<Object[]>> getKlines(@QueryParam("symbol") String symbol, @QueryParam("startAt") Long startAt, @QueryParam("endAt") Long endAt, @QueryParam("type") String type) throws IOException Gets the kline of the specified symbol. Data are returned in grouped buckets based on requested type.- Parameters:
symbol
- The symbol whose trades should be fetched.startAt
- The start time (in seconds) - defaults to 0, optionalendAt
- The end time (in seconds) - defaults to 0, optionaltype
- The type of kline- Returns:
- The klines for the symbol and params.
- Throws:
IOException
-