|
|
|
@ -10,7 +10,6 @@ import com.sigmaflare.binancej.exceptions.BinanceServiceException;
|
|
|
|
|
import com.sigmaflare.binancej.exceptions.BinanceServiceUnreachableException; |
|
|
|
|
import com.sigmaflare.binancej.exceptions.UnexpectedErrorException; |
|
|
|
|
import lombok.Builder; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.http.HttpEntity; |
|
|
|
|
import org.apache.http.StatusLine; |
|
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse; |
|
|
|
@ -28,7 +27,6 @@ import static com.sigmaflare.binancej.Constant.NO_RESPONSE_TEXT_FORMATTED;
|
|
|
|
|
import static com.sigmaflare.binancej.Constant.SYMBOL_AND_INTERVAL_MUST_BE_SUPPLIED; |
|
|
|
|
import static com.sigmaflare.binancej.HttpRequests.buildGetRequestFromEndpoint; |
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
|
|
public class MarketData extends BaseBinanceApi { |
|
|
|
|
private static final String ORDER_BOOK_URL = "/api/v1/depth"; |
|
|
|
|
private static final String CANDLESTICK_URL = "/api/v1/klines"; |
|
|
|
@ -95,7 +93,6 @@ public class MarketData extends BaseBinanceApi {
|
|
|
|
|
HttpEntity httpEntity = closeableHttpResponse.getEntity(); |
|
|
|
|
|
|
|
|
|
if (httpEntity == null) { |
|
|
|
|
log.error(NO_RESPONSE_TEXT, request.getURI().toASCIIString()); |
|
|
|
|
throw new BinanceServiceUnreachableException( |
|
|
|
|
String.format(NO_RESPONSE_TEXT_FORMATTED, request.getURI().toASCIIString()), null); |
|
|
|
|
} |
|
|
|
@ -337,7 +334,6 @@ public class MarketData extends BaseBinanceApi {
|
|
|
|
|
HttpEntity httpEntity = closeableHttpResponse.getEntity(); |
|
|
|
|
|
|
|
|
|
if (httpEntity == null) { |
|
|
|
|
log.error(NO_RESPONSE_TEXT, request.getURI().toASCIIString()); |
|
|
|
|
throw new BinanceServiceUnreachableException( |
|
|
|
|
String.format(NO_RESPONSE_TEXT_FORMATTED, request.getURI().toASCIIString()), null); |
|
|
|
|
} |
|
|
|
@ -378,7 +374,6 @@ public class MarketData extends BaseBinanceApi {
|
|
|
|
|
HttpEntity httpEntity = closeableHttpResponse.getEntity(); |
|
|
|
|
|
|
|
|
|
if (httpEntity == null) { |
|
|
|
|
log.error(NO_RESPONSE_TEXT, request.getURI().toASCIIString()); |
|
|
|
|
throw new BinanceServiceUnreachableException( |
|
|
|
|
String.format(NO_RESPONSE_TEXT_FORMATTED, request.getURI().toASCIIString()), null); |
|
|
|
|
} |
|
|
|
@ -422,7 +417,6 @@ public class MarketData extends BaseBinanceApi {
|
|
|
|
|
HttpEntity httpEntity = closeableHttpResponse.getEntity(); |
|
|
|
|
|
|
|
|
|
if (httpEntity == null) { |
|
|
|
|
log.error(NO_RESPONSE_TEXT, request.getURI().toASCIIString()); |
|
|
|
|
throw new BinanceServiceUnreachableException( |
|
|
|
|
String.format(NO_RESPONSE_TEXT_FORMATTED, request.getURI().toASCIIString()), null); |
|
|
|
|
} |
|
|
|
|