com.kucoin.sdk.rest.adapter.SymbolAPIAdaptor 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.SymbolAPI;
import com.kucoin.sdk.rest.interfaces.retrofit.SymbolAPIRetrofit;
import com.kucoin.sdk.rest.response.SymbolResponse;
import com.kucoin.sdk.rest.response.SymbolTickResponse;
import com.kucoin.sdk.rest.response.TickerResponse;
import java.io.IOException;
import java.util.List;
/**
* Created by chenshiwei on 2019/1/18.
*/
public class SymbolAPIAdaptor extends PublicRetrofitAPIImpl implements SymbolAPI {
public SymbolAPIAdaptor(String baseUrl) {
this.baseUrl = baseUrl;
}
@Override
public List getSymbols() throws IOException {
return super.executeSync(getAPIImpl().getSymbols());
}
@Override
public TickerResponse getTicker(String symbol) throws IOException {
return super.executeSync(getAPIImpl().getTicker(symbol));
}
@Override
public SymbolTickResponse get24hrStats(String symbol) throws IOException {
return super.executeSync(getAPIImpl().getMarketStats(symbol));
}
}