com.kucoin.sdk.rest.adapter.HistoryAPIAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kucoin-java-sdk Show documentation
Show all versions of kucoin-java-sdk Show documentation
Fixed fork of the official Kucoin SDK
The newest version!
/**
* Copyright 2019 Mek Global Limited.
*/
package com.kucoin.sdk.rest.adapter;
import com.kucoin.sdk.rest.impl.retrofit.PublicRetrofitAPIImpl;
import com.kucoin.sdk.rest.interfaces.HistoryAPI;
import com.kucoin.sdk.rest.interfaces.retrofit.HistoryAPIRetrofit;
import com.kucoin.sdk.rest.response.TradeHistoryResponse;
import java.io.IOException;
import java.util.List;
/**
* Created by chenshiwei on 2019/1/22.
*/
public class HistoryAPIAdapter extends PublicRetrofitAPIImpl implements HistoryAPI {
public HistoryAPIAdapter(String baseUrl) {
this.baseUrl = baseUrl;
}
@Override
public List getTradeHistories(String symbol) throws IOException {
List executeSync = super.executeSync(getAPIImpl().getTradeHistories(symbol));
return executeSync;
}
@Override
public List> getHistoricRates(String symbol, long startAt, long endAt, String type) throws IOException {
List> executeSync = super.executeSync(getAPIImpl().getHistoricRates(symbol, startAt, endAt, type));
return executeSync;
}
}