All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kucoin.sdk.rest.adapter.OrderBookAPIAdapter Maven / Gradle / Ivy

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.OrderBookAPI;
import com.kucoin.sdk.rest.interfaces.retrofit.OrderBookAPIRetrofit;
import com.kucoin.sdk.rest.response.OrderBookResponse;

import java.io.IOException;

/**
 * Created by chenshiwei on 2019/1/22.
 */
public class OrderBookAPIAdapter extends PublicRetrofitAPIImpl implements OrderBookAPI {

    public OrderBookAPIAdapter(String baseUrl) {
        this.baseUrl = baseUrl;
    }

    @Override
    public OrderBookResponse getPartOrderBookAggregated(String symbol) throws IOException {
        return super.executeSync(getAPIImpl().getPartOrderBookAggregated(symbol));
    }

    @Override
    public OrderBookResponse getFullOrderBookAggregated(String symbol) throws IOException {
        return super.executeSync(getAPIImpl().getFullOrderBookAggregated(symbol));
    }

    @Override
    public OrderBookResponse getFullOrderBookAtomic(String symbol) throws IOException {
        return super.executeSync(getAPIImpl().getFullOrderBookAtomic(symbol));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy