From 1cbd76b010f55c16ef6ee412e8fba3d374c29dfc Mon Sep 17 00:00:00 2001 From: Dmitri Karpovich Date: Tue, 30 Apr 2024 16:12:18 +0200 Subject: [PATCH 1/4] [binance] Fix call with wrong parameters --- .../xchange/binance/service/BinanceMarketDataService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceMarketDataService.java b/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceMarketDataService.java index 15f3b6a01e8..52cf9f5aa3b 100644 --- a/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceMarketDataService.java +++ b/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceMarketDataService.java @@ -87,6 +87,12 @@ public List getTickers(Params params) throws IOException { } } + @Override + public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { + return getOrderBook((Instrument) currencyPair, args); + } + + @Override public OrderBook getOrderBook(Instrument instrument, Object... args) throws IOException { return getBinanceOrderBook(instrument, args); From ed33773726bace910c0a8dd92398c5a8a101a9cf Mon Sep 17 00:00:00 2001 From: Dmitri Karpovich Date: Tue, 30 Apr 2024 16:12:29 +0200 Subject: [PATCH 2/4] [binance] Add authorized request for idea http client --- xchange-binance/.gitignore | 1 + xchange-binance/README.md | 11 +++++++++++ .../example.http-client.private.env.json | 6 ++++++ xchange-binance/src/test/resources/rest/sign.js | 16 ++++++++++++++++ .../src/test/resources/rest/wallet.http | 8 ++++++++ 5 files changed, 42 insertions(+) create mode 100644 xchange-binance/.gitignore create mode 100644 xchange-binance/README.md create mode 100644 xchange-binance/example.http-client.private.env.json create mode 100644 xchange-binance/src/test/resources/rest/sign.js create mode 100644 xchange-binance/src/test/resources/rest/wallet.http diff --git a/xchange-binance/.gitignore b/xchange-binance/.gitignore new file mode 100644 index 00000000000..42c7d2cd0eb --- /dev/null +++ b/xchange-binance/.gitignore @@ -0,0 +1 @@ +http-client.private.env.json \ No newline at end of file diff --git a/xchange-binance/README.md b/xchange-binance/README.md new file mode 100644 index 00000000000..6f4d4742fa7 --- /dev/null +++ b/xchange-binance/README.md @@ -0,0 +1,11 @@ +## Using IntelliJ Idea HTTP client + +There are *.http files stored in `src/test/resources/rest` that can be used with IntelliJ Idea HTTP Client. + +Some requests need authorization, so the api credentials have to be stored in `http-client.private.env.json` in module's root. Sample content can be found in `example.http-client.private.env.json` + +> [!CAUTION] +> Never commit your api credentials to the repository! + + +[HTTP Client documentation](https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html) \ No newline at end of file diff --git a/xchange-binance/example.http-client.private.env.json b/xchange-binance/example.http-client.private.env.json new file mode 100644 index 00000000000..977c974ecbe --- /dev/null +++ b/xchange-binance/example.http-client.private.env.json @@ -0,0 +1,6 @@ +{ + "default": { + "api_key": "replace_me", + "api_secret": "replace_me" + } +} \ No newline at end of file diff --git a/xchange-binance/src/test/resources/rest/sign.js b/xchange-binance/src/test/resources/rest/sign.js new file mode 100644 index 00000000000..d4461c6b044 --- /dev/null +++ b/xchange-binance/src/test/resources/rest/sign.js @@ -0,0 +1,16 @@ +export function gen_sign(request) { + const pattern = RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"); + const url = request.url.tryGetSubstituted(); + const matches = url.match(pattern); + + const timestamp = Math.floor(Date.now()).toFixed(); + const query = matches[7] || ""; + + const payloadToSign = query.replace("&signature={{signature}}", "").replace("{{timestamp}}", timestamp); + + const apiSecret = request.environment.get("api_secret"); + const sign = crypto.hmac.sha256().withTextSecret(apiSecret).updateWithText(payloadToSign).digest().toHex(); + + request.variables.set("timestamp", timestamp); + request.variables.set("signature", sign); +} \ No newline at end of file diff --git a/xchange-binance/src/test/resources/rest/wallet.http b/xchange-binance/src/test/resources/rest/wallet.http new file mode 100644 index 00000000000..7d458981556 --- /dev/null +++ b/xchange-binance/src/test/resources/rest/wallet.http @@ -0,0 +1,8 @@ +### All Coins' Information (USER_DATA) +< {% + import {gen_sign} from 'sign.js' + gen_sign(request); +%} + +GET {{api_host}}/sapi/v1/capital/config/getall?timestamp={{timestamp}}&signature={{signature}} +X-MBX-APIKEY: {{api_key}} From f13b32dd1c11f61d642fa608b166d5244213c5e1 Mon Sep 17 00:00:00 2001 From: Dmitri Karpovich Date: Tue, 30 Apr 2024 16:12:41 +0200 Subject: [PATCH 3/4] [binance] Add currency infos endpoint --- .../xchange/binance/BinanceAuthenticated.java | 22 ++- .../converter/StringToCurrencyConverter.java | 13 ++ .../dto/account/BinanceCurrencyInfo.java | 138 ++++++++++++++++++ .../service/BinanceAccountServiceRaw.java | 21 ++- .../account/AccountServiceIntegration.java | 12 ++ 5 files changed, 204 insertions(+), 2 deletions(-) create mode 100644 xchange-binance/src/main/java/org/knowm/xchange/binance/config/converter/StringToCurrencyConverter.java create mode 100644 xchange-binance/src/main/java/org/knowm/xchange/binance/dto/account/BinanceCurrencyInfo.java diff --git a/xchange-binance/src/main/java/org/knowm/xchange/binance/BinanceAuthenticated.java b/xchange-binance/src/main/java/org/knowm/xchange/binance/BinanceAuthenticated.java index 3d6f88aa8c7..eddeaee6ccb 100644 --- a/xchange-binance/src/main/java/org/knowm/xchange/binance/BinanceAuthenticated.java +++ b/xchange-binance/src/main/java/org/knowm/xchange/binance/BinanceAuthenticated.java @@ -16,7 +16,16 @@ import java.util.List; import java.util.Map; import org.knowm.xchange.binance.dto.BinanceException; -import org.knowm.xchange.binance.dto.account.*; +import org.knowm.xchange.binance.dto.account.AssetDetail; +import org.knowm.xchange.binance.dto.account.AssetDividendResponse; +import org.knowm.xchange.binance.dto.account.BinanceAccountInformation; +import org.knowm.xchange.binance.dto.account.BinanceCurrencyInfo; +import org.knowm.xchange.binance.dto.account.BinanceDeposit; +import org.knowm.xchange.binance.dto.account.BinanceWithdraw; +import org.knowm.xchange.binance.dto.account.DepositAddress; +import org.knowm.xchange.binance.dto.account.TransferHistory; +import org.knowm.xchange.binance.dto.account.TransferSubUserHistory; +import org.knowm.xchange.binance.dto.account.WithdrawResponse; import org.knowm.xchange.binance.dto.trade.BinanceCancelledOrder; import org.knowm.xchange.binance.dto.trade.BinanceDustLog; import org.knowm.xchange.binance.dto.trade.BinanceListenKey; @@ -329,6 +338,17 @@ BinanceDustLog getDustLog( @QueryParam(SIGNATURE) ParamsDigest signature) throws IOException, BinanceException; + + @GET + @Path("/sapi/v1/capital/config/getall") + List getCurrencyInfos( + @QueryParam("recvWindow") Long recvWindow, + @QueryParam("timestamp") SynchronizedValueFactory timestamp, + @HeaderParam(X_MBX_APIKEY) String apiKey, + @QueryParam(SIGNATURE) ParamsDigest signature) + throws IOException, BinanceException; + + /** * Submit a withdraw request. * diff --git a/xchange-binance/src/main/java/org/knowm/xchange/binance/config/converter/StringToCurrencyConverter.java b/xchange-binance/src/main/java/org/knowm/xchange/binance/config/converter/StringToCurrencyConverter.java new file mode 100644 index 00000000000..d524e0ad889 --- /dev/null +++ b/xchange-binance/src/main/java/org/knowm/xchange/binance/config/converter/StringToCurrencyConverter.java @@ -0,0 +1,13 @@ +package org.knowm.xchange.binance.config.converter; + +import com.fasterxml.jackson.databind.util.StdConverter; +import org.knowm.xchange.currency.Currency; + +/** Converts string value {@code Currency} */ +public class StringToCurrencyConverter extends StdConverter { + + @Override + public Currency convert(String value) { + return Currency.getInstance(value); + } +} diff --git a/xchange-binance/src/main/java/org/knowm/xchange/binance/dto/account/BinanceCurrencyInfo.java b/xchange-binance/src/main/java/org/knowm/xchange/binance/dto/account/BinanceCurrencyInfo.java new file mode 100644 index 00000000000..99b7ada13c4 --- /dev/null +++ b/xchange-binance/src/main/java/org/knowm/xchange/binance/dto/account/BinanceCurrencyInfo.java @@ -0,0 +1,138 @@ +package org.knowm.xchange.binance.dto.account; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.math.BigDecimal; +import java.util.List; +import lombok.Builder; +import lombok.Data; +import lombok.extern.jackson.Jacksonized; +import org.knowm.xchange.binance.config.converter.StringToCurrencyConverter; +import org.knowm.xchange.currency.Currency; + +@Data +@Builder +@Jacksonized +public class BinanceCurrencyInfo { + + @JsonProperty("coin") + @JsonDeserialize(converter = StringToCurrencyConverter.class) + private Currency currency; + + @JsonProperty("depositAllEnable") + private Boolean depositEnabled; + + @JsonProperty("withdrawAllEnable") + private Boolean withdrawEnabled; + + @JsonProperty("name") + private String name; + + @JsonProperty("free") + private BigDecimal free; + + @JsonProperty("locked") + private BigDecimal locked; + + @JsonProperty("freeze") + private BigDecimal freeze; + + @JsonProperty("withdrawing") + private BigDecimal withdrawing; + + @JsonProperty("ipoing") + private BigDecimal ipoing; + + @JsonProperty("ipoable") + private BigDecimal ipoable; + + @JsonProperty("storage") + private BigDecimal storage; + + @JsonProperty("isLegalMoney") + private Boolean isLegalMoney; + + @JsonProperty("trading") + private Boolean trading; + + @JsonProperty("networkList") + private List networks; + + + @Data + @Builder + @Jacksonized + public static class Network { + + @JsonProperty("network") + private String id; + + @JsonProperty("coin") + @JsonDeserialize(converter = StringToCurrencyConverter.class) + private Currency currency; + + @JsonProperty("withdrawIntegerMultiple") + private BigDecimal withdrawIntegerMultiple; + + @JsonProperty("isDefault") + private Boolean isDefault; + + @JsonProperty("depositEnable") + private Boolean depositEnabled; + + @JsonProperty("withdrawEnable") + private Boolean withdrawEnabled; + + @JsonProperty("depositDesc") + private String depositDesc; + + @JsonProperty("withdrawDesc") + private String withdrawDesc; + + @JsonProperty("specialTips") + private String specialTips; + + @JsonProperty("name") + private String name; + + @JsonProperty("resetAddressStatus") + private Boolean resetAddressStatus; + + @JsonProperty("addressRegex") + private String addressRegex; + + @JsonProperty("memoRegex") + private String memoRegex; + + @JsonProperty("withdrawFee") + private BigDecimal withdrawFee; + + @JsonProperty("withdrawMin") + private BigDecimal withdrawMin; + + @JsonProperty("withdrawMax") + private BigDecimal withdrawMax; + + @JsonProperty("minConfirm") + private Integer minConfirm; + + @JsonProperty("unLockConfirm") + private Integer unLockConfirm; + + @JsonProperty("sameAddress") + private Boolean sameAddress; + + @JsonProperty("estimatedArrivalTime") + private Integer estimatedArrivalTime; + + @JsonProperty("busy") + private Boolean busy; + + @JsonProperty("contractAddressUrl") + private String contractAddressUrl; + + @JsonProperty("contractAddress") + private String contractAddress; + + } +} diff --git a/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceAccountServiceRaw.java b/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceAccountServiceRaw.java index db07456d675..b4a766a73f3 100644 --- a/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceAccountServiceRaw.java +++ b/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceAccountServiceRaw.java @@ -10,7 +10,16 @@ import org.knowm.xchange.binance.BinanceAdapters; import org.knowm.xchange.binance.BinanceExchange; import org.knowm.xchange.binance.dto.BinanceException; -import org.knowm.xchange.binance.dto.account.*; +import org.knowm.xchange.binance.dto.account.AssetDetail; +import org.knowm.xchange.binance.dto.account.AssetDividendResponse; +import org.knowm.xchange.binance.dto.account.BinanceAccountInformation; +import org.knowm.xchange.binance.dto.account.BinanceCurrencyInfo; +import org.knowm.xchange.binance.dto.account.BinanceDeposit; +import org.knowm.xchange.binance.dto.account.BinanceWithdraw; +import org.knowm.xchange.binance.dto.account.DepositAddress; +import org.knowm.xchange.binance.dto.account.TransferHistory; +import org.knowm.xchange.binance.dto.account.TransferSubUserHistory; +import org.knowm.xchange.binance.dto.account.WithdrawResponse; import org.knowm.xchange.binance.dto.account.futures.BinanceFutureAccountInformation; import org.knowm.xchange.client.ResilienceRegistries; import org.knowm.xchange.currency.Currency; @@ -30,6 +39,16 @@ public BinanceAccountInformation account() throws BinanceException, IOException .call(); } + + public List currencyInfos() throws BinanceException, IOException { + return decorateApiCall( + () -> binance.getCurrencyInfos(getRecvWindow(), getTimestampFactory(), apiKey, signatureCreator)) + .withRetry(retry("currencyInfo")) + .withRateLimiter(rateLimiter(REQUEST_WEIGHT_RATE_LIMITER), 5) + .call(); + } + + public BinanceFutureAccountInformation futuresAccount() throws BinanceException, IOException { return decorateApiCall( () -> diff --git a/xchange-binance/src/test/java/org/knowm/xchange/binance/service/account/AccountServiceIntegration.java b/xchange-binance/src/test/java/org/knowm/xchange/binance/service/account/AccountServiceIntegration.java index 1039d09aa63..a60c034fe82 100644 --- a/xchange-binance/src/test/java/org/knowm/xchange/binance/service/account/AccountServiceIntegration.java +++ b/xchange-binance/src/test/java/org/knowm/xchange/binance/service/account/AccountServiceIntegration.java @@ -1,5 +1,7 @@ package org.knowm.xchange.binance.service.account; +import static org.assertj.core.api.Assertions.assertThat; + import java.math.BigDecimal; import java.util.List; import java.util.Map; @@ -11,6 +13,7 @@ import org.junit.Test; import org.knowm.xchange.binance.BinanceExchangeIntegration; import org.knowm.xchange.binance.dto.account.AssetDetail; +import org.knowm.xchange.binance.dto.account.BinanceCurrencyInfo; import org.knowm.xchange.binance.dto.account.BinanceDeposit; import org.knowm.xchange.binance.dto.account.TransferHistory; import org.knowm.xchange.binance.service.BinanceAccountService; @@ -48,6 +51,15 @@ public void testAssetDetail() throws Exception { Assert.assertFalse(assetDetails.isEmpty()); } + + @Test + public void testCurrencyInfos() throws Exception { + assumeProduction(); + List currencyInfos = accountService.currencyInfos(); + assertThat(currencyInfos).isNotEmpty(); + } + + @Test public void testMetaData() { From 34523f8f65d463ee68543488518710d6055d2c15 Mon Sep 17 00:00:00 2001 From: Dmitri Karpovich Date: Fri, 10 May 2024 00:18:33 +0200 Subject: [PATCH 4/4] [general] Remove method implementation that just throw NotYetImplementedForExchangeException --- .../bibox/service/BiboxAccountService.java | 16 ---------- .../bibox/service/BiboxTradeService.java | 19 ----------- .../org/knowm/xchange/bitz/BitZExchange.java | 8 ----- .../bitz/service/BitZTradeServiceRaw.java | 16 ---------- .../service/BlockchainAccountService.java | 31 +++++++----------- .../service/BlockchainMarketDataService.java | 30 ----------------- .../service/BlockchainTradeService.java | 31 +++++++++++------- .../service/account/AccountServiceTest.java | 16 ---------- .../cexio/service/CexIOTradeService.java | 16 ---------- .../coingi/service/CoingiAccountService.java | 7 ---- .../coingi/service/CoingiTradeService.java | 13 -------- .../v2/service/DeribitTradeService.java | 20 ------------ .../service/GlobitexAccountService.java | 25 --------------- .../service/GlobitexTradeService.java | 18 ----------- .../lykke/service/LykkeAccountService.java | 32 ------------------- .../lykke/service/LykkeMarketDataService.java | 19 ----------- .../lykke/service/LykkeTradeService.java | 12 ------- .../service/OkCoinFuturesAccountService.java | 13 -------- .../service/OkCoinFuturesTradeService.java | 19 +++++------ .../okcoin/service/OkCoinTradeService.java | 7 ---- .../BTCMarketsStreamingAdapters.java | 6 ---- .../CexioStreamingMarketDataService.java | 6 ---- .../CoinbaseProStreamingExchange.java | 9 +----- .../CoinjarStreamingMarketDataService.java | 12 ------- .../v1/dydxStreamingMarketDataService.java | 12 ------- .../v3/dydxStreamingMarketDataService.java | 12 ------- .../GeminiStreamingMarketDataService.java | 12 ------- .../KucoinStreamingMarketDataService.java | 7 ---- .../lgo/LgoStreamingMarketDataService.java | 6 ---- .../yobit/service/YoBitTradeServiceRaw.java | 7 ---- 30 files changed, 43 insertions(+), 414 deletions(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java index 0eba0d8be80..48fe12efb96 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java @@ -1,7 +1,6 @@ package org.knowm.xchange.bibox.service; import java.io.IOException; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.knowm.xchange.Exchange; @@ -11,12 +10,10 @@ import org.knowm.xchange.dto.account.AccountInfo; import org.knowm.xchange.dto.account.FundingRecord; import org.knowm.xchange.dto.account.FundingRecord.Type; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.HistoryParamsFundingType; import org.knowm.xchange.service.trade.params.TradeHistoryParamCurrency; import org.knowm.xchange.service.trade.params.TradeHistoryParams; -import org.knowm.xchange.service.trade.params.WithdrawFundsParams; /** * @author odrotleff @@ -33,19 +30,6 @@ public AccountInfo getAccountInfo() throws IOException { return BiboxAdapters.adaptAccountInfo(getBiboxAccountInfo()); } - @Override - public String withdrawFunds(Currency currency, BigDecimal amount, String address) - throws IOException { - throw new NotYetImplementedForExchangeException( - "This operation is not yet implemented for this exchange"); - } - - @Override - public String withdrawFunds(WithdrawFundsParams params) throws IOException { - throw new NotYetImplementedForExchangeException( - "This operation is not yet implemented for this exchange"); - } - @Override public String requestDepositAddress(Currency currency, String... args) throws IOException { return requestBiboxDepositAddress(currency); diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index b577b0bbc14..690b58c0921 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -7,10 +7,8 @@ import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.MarketOrder; import org.knowm.xchange.dto.trade.OpenOrders; -import org.knowm.xchange.dto.trade.StopOrder; import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.ExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderByIdParams; import org.knowm.xchange.service.trade.params.CancelOrderParams; @@ -71,21 +69,4 @@ public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException return BiboxAdapters.adaptUserTrades(getBiboxOrderHistory()); } - @Override - public TradeHistoryParams createTradeHistoryParams() { - throw new NotYetImplementedForExchangeException( - "This operation is not yet implemented for this exchange"); - } - - @Override - public OpenOrdersParams createOpenOrdersParams() { - throw new NotYetImplementedForExchangeException( - "This operation is not yet implemented for this exchange"); - } - - @Override - public String placeStopOrder(StopOrder arg0) throws IOException { - throw new NotYetImplementedForExchangeException( - "This operation is not yet implemented for this exchange"); - } } diff --git a/xchange-bitz/src/main/java/org/knowm/xchange/bitz/BitZExchange.java b/xchange-bitz/src/main/java/org/knowm/xchange/bitz/BitZExchange.java index 76038184ec8..1106f2ec353 100644 --- a/xchange-bitz/src/main/java/org/knowm/xchange/bitz/BitZExchange.java +++ b/xchange-bitz/src/main/java/org/knowm/xchange/bitz/BitZExchange.java @@ -6,9 +6,7 @@ import org.knowm.xchange.bitz.service.BitZMarketDataService; import org.knowm.xchange.bitz.service.BitZTradeService; import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.account.AccountService; -import org.knowm.xchange.service.trade.TradeService; public class BitZExchange extends BaseExchange implements Exchange { @@ -31,12 +29,6 @@ public ExchangeSpecification getDefaultExchangeSpecification() { return exchangeSpecification; } - @Override - public TradeService getTradeService() { - throw new NotYetImplementedForExchangeException( - "Parital implementation due to partial implementation by the exchange"); - } - @Override public AccountService getAccountService() { throw new NotAvailableFromExchangeException(); diff --git a/xchange-bitz/src/main/java/org/knowm/xchange/bitz/service/BitZTradeServiceRaw.java b/xchange-bitz/src/main/java/org/knowm/xchange/bitz/service/BitZTradeServiceRaw.java index 08e74402bec..aee9f72f62f 100644 --- a/xchange-bitz/src/main/java/org/knowm/xchange/bitz/service/BitZTradeServiceRaw.java +++ b/xchange-bitz/src/main/java/org/knowm/xchange/bitz/service/BitZTradeServiceRaw.java @@ -2,20 +2,16 @@ import java.io.IOException; import java.math.BigDecimal; -import java.util.Date; import org.knowm.xchange.Exchange; import org.knowm.xchange.bitz.BitZ; import org.knowm.xchange.bitz.BitZAuthenticated; import org.knowm.xchange.bitz.dto.account.result.BitZUserAssetsResult; -import org.knowm.xchange.bitz.dto.marketdata.BitZPublicOrder; import org.knowm.xchange.bitz.dto.trade.result.BitZEntrustSheetInfoResult; import org.knowm.xchange.bitz.dto.trade.result.BitZTradeAddResult; import org.knowm.xchange.bitz.dto.trade.result.BitZTradeCancelListResult; import org.knowm.xchange.bitz.dto.trade.result.BitZTradeCancelResult; import org.knowm.xchange.bitz.dto.trade.result.BitZUserHistoryResult; import org.knowm.xchange.client.ExchangeRestProxyBuilder; -import org.knowm.xchange.currency.CurrencyPair; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import si.mazi.rescu.SynchronizedValueFactory; public class BitZTradeServiceRaw extends BitZBaseService { @@ -51,18 +47,6 @@ public BitZTradeServiceRaw(Exchange exchange) { this.nonce = nonceFactory.toString().substring(nonceFactory.toString().length() - 6); } - // TODO: Implement Method - public boolean cancelBitZTrade(int orderId) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - - // TODO: Implement Method - public BitZTradeAddResult placeBitZTrade( - CurrencyPair currencyPair, BitZPublicOrder limitOrder, Date time, boolean sell) - throws IOException { - throw new NotYetImplementedForExchangeException(); - } - private String getTimeStamp() { return String.valueOf(System.currentTimeMillis() / 1000); } diff --git a/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainAccountService.java b/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainAccountService.java index 36f70dc2440..75267baac3b 100644 --- a/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainAccountService.java +++ b/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainAccountService.java @@ -1,9 +1,9 @@ package org.knowm.xchange.blockchain.service; -import static org.knowm.xchange.blockchain.BlockchainConstants.*; +import static org.knowm.xchange.blockchain.BlockchainConstants.FUNDING_RECORD_TYPE_UNSUPPORTED; +import static org.knowm.xchange.blockchain.BlockchainConstants.WITHDRAWAL_EXCEPTION; import java.io.IOException; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -21,11 +21,18 @@ import org.knowm.xchange.client.ResilienceRegistries; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.currency.CurrencyPair; -import org.knowm.xchange.dto.account.*; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; +import org.knowm.xchange.dto.account.AccountInfo; +import org.knowm.xchange.dto.account.AddressWithTag; +import org.knowm.xchange.dto.account.Balance; +import org.knowm.xchange.dto.account.Fee; +import org.knowm.xchange.dto.account.FundingRecord; +import org.knowm.xchange.dto.account.Wallet; import org.knowm.xchange.instrument.Instrument; import org.knowm.xchange.service.account.AccountService; -import org.knowm.xchange.service.trade.params.*; +import org.knowm.xchange.service.trade.params.HistoryParamsFundingType; +import org.knowm.xchange.service.trade.params.TradeHistoryParams; +import org.knowm.xchange.service.trade.params.TradeHistoryParamsTimeSpan; +import org.knowm.xchange.service.trade.params.WithdrawFundsParams; public class BlockchainAccountService extends BlockchainAccountServiceRaw implements AccountService { @@ -57,20 +64,6 @@ public AccountInfo getAccountInfo() throws IOException { } } - /** Use {@link String withdrawFunds(WithdrawFundsParams params)} instead */ - @Override - public String withdrawFunds(Currency currency, BigDecimal amount, String address) - throws IOException { - throw new NotYetImplementedForExchangeException(NOT_IMPLEMENTED_YET); - } - - /** Use {@link String withdrawFunds(WithdrawFundsParams params)} instead */ - @Override - public String withdrawFunds(Currency currency, BigDecimal amount, AddressWithTag address) - throws IOException { - throw new NotYetImplementedForExchangeException(NOT_IMPLEMENTED_YET); - } - /** For more information see {@link WithdrawFundsParams} */ @Override public String withdrawFunds(WithdrawFundsParams params) throws IOException { diff --git a/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainMarketDataService.java b/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainMarketDataService.java index 5fb5ae64a37..4eaf97c0aa2 100644 --- a/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainMarketDataService.java +++ b/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainMarketDataService.java @@ -1,9 +1,7 @@ package org.knowm.xchange.blockchain.service; -import static org.knowm.xchange.blockchain.BlockchainConstants.NOT_IMPLEMENTED_YET; import java.io.IOException; -import java.util.List; import org.knowm.xchange.blockchain.BlockchainAdapters; import org.knowm.xchange.blockchain.BlockchainAuthenticated; import org.knowm.xchange.blockchain.BlockchainErrorAdapter; @@ -12,12 +10,8 @@ import org.knowm.xchange.client.ResilienceRegistries; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; -import org.knowm.xchange.dto.marketdata.Ticker; -import org.knowm.xchange.dto.marketdata.Trades; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.instrument.Instrument; import org.knowm.xchange.service.marketdata.MarketDataService; -import org.knowm.xchange.service.marketdata.params.Params; public class BlockchainMarketDataService extends BlockchainMarketDataServiceRaw implements MarketDataService { @@ -29,21 +23,6 @@ public BlockchainMarketDataService( super(exchange, blockchainApi, resilienceRegistries); } - @Override - public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException { - throw new NotYetImplementedForExchangeException(NOT_IMPLEMENTED_YET); - } - - @Override - public Ticker getTicker(Instrument instrument, Object... args) throws IOException { - throw new NotYetImplementedForExchangeException(NOT_IMPLEMENTED_YET); - } - - @Override - public List getTickers(Params params) { - throw new NotYetImplementedForExchangeException(NOT_IMPLEMENTED_YET); - } - @Override public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { try { @@ -63,13 +42,4 @@ public OrderBook getOrderBook(Instrument instrument, Object... args) throws IOEx } } - @Override - public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException { - throw new NotYetImplementedForExchangeException(NOT_IMPLEMENTED_YET); - } - - @Override - public Trades getTrades(Instrument instrument, Object... args) throws IOException { - throw new NotYetImplementedForExchangeException(NOT_IMPLEMENTED_YET); - } } diff --git a/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainTradeService.java b/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainTradeService.java index 3bcb29caf4a..eebd787b413 100644 --- a/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainTradeService.java +++ b/xchange-blockchain/src/main/java/org/knowm/xchange/blockchain/service/BlockchainTradeService.java @@ -1,6 +1,7 @@ package org.knowm.xchange.blockchain.service; -import static org.knowm.xchange.blockchain.BlockchainConstants.*; +import static org.knowm.xchange.blockchain.BlockchainConstants.CURRENCY_PAIR_EXCEPTION; +import static org.knowm.xchange.blockchain.BlockchainConstants.REJECTED; import java.io.IOException; import java.util.ArrayList; @@ -16,13 +17,26 @@ import org.knowm.xchange.client.ResilienceRegistries; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order; -import org.knowm.xchange.dto.account.OpenPositions; -import org.knowm.xchange.dto.trade.*; +import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.dto.trade.MarketOrder; +import org.knowm.xchange.dto.trade.OpenOrders; +import org.knowm.xchange.dto.trade.StopOrder; +import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.ExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; -import org.knowm.xchange.service.trade.params.*; -import org.knowm.xchange.service.trade.params.orders.*; +import org.knowm.xchange.service.trade.params.CancelOrderByCurrencyPair; +import org.knowm.xchange.service.trade.params.CancelOrderByIdParams; +import org.knowm.xchange.service.trade.params.CancelOrderParams; +import org.knowm.xchange.service.trade.params.TradeHistoryParamCurrencyPair; +import org.knowm.xchange.service.trade.params.TradeHistoryParamLimit; +import org.knowm.xchange.service.trade.params.TradeHistoryParams; +import org.knowm.xchange.service.trade.params.TradeHistoryParamsTimeSpan; +import org.knowm.xchange.service.trade.params.orders.DefaultOpenOrdersParamCurrencyPair; +import org.knowm.xchange.service.trade.params.orders.DefaultQueryOrderParam; +import org.knowm.xchange.service.trade.params.orders.OpenOrdersParamCurrencyPair; +import org.knowm.xchange.service.trade.params.orders.OpenOrdersParams; +import org.knowm.xchange.service.trade.params.orders.OrderQueryParamCurrencyPair; +import org.knowm.xchange.service.trade.params.orders.OrderQueryParams; public class BlockchainTradeService extends BlockchainTradeServiceRaw implements TradeService { @@ -119,11 +133,6 @@ public Class[] getRequiredCancelOrderParamClasses() { return new Class[] {CancelOrderByIdParams.class, CancelOrderByCurrencyPair.class}; } - @Override - public OpenPositions getOpenPositions() { - throw new NotYetImplementedForExchangeException(NOT_IMPLEMENTED_YET); - } - @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { try { diff --git a/xchange-blockchain/src/test/java/org/knowm/xchange/blockchain/service/account/AccountServiceTest.java b/xchange-blockchain/src/test/java/org/knowm/xchange/blockchain/service/account/AccountServiceTest.java index e43b9e86747..561f9e72208 100644 --- a/xchange-blockchain/src/test/java/org/knowm/xchange/blockchain/service/account/AccountServiceTest.java +++ b/xchange-blockchain/src/test/java/org/knowm/xchange/blockchain/service/account/AccountServiceTest.java @@ -3,14 +3,12 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.ACCOUNT_INFORMATION_JSON; -import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.ADDRESS; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.ADDRESS_DEPOSIT; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.BENEFICIARY; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.DEPOSIT_FAILURE_JSON; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.DEPOSIT_HISTORY_SUCCESS_JSON; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.DEPOSIT_SUCCESS_JSON; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.FEES_JSON; -import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.NOT_IMPLEMENTED_YET; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.STATUS_CODE_400; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.STATUS_CODE_401; import static org.knowm.xchange.blockchain.service.utils.BlockchainConstants.SYMBOL_JSON; @@ -41,7 +39,6 @@ import org.knowm.xchange.dto.account.FundingRecord; import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.exceptions.ExchangeSecurityException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.instrument.Instrument; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.HistoryParamsFundingType; @@ -76,14 +73,6 @@ public void withdrawFailure() { assertThat(exception).isInstanceOf(ExchangeSecurityException.class).hasMessage(STATUS_CODE_401); } - @Test(timeout = 2000) - public void withdrawException() { - Throwable exception = catchThrowable(this::withdrawExcept); - assertThat(exception) - .isInstanceOf(NotYetImplementedForExchangeException.class) - .hasMessage(NOT_IMPLEMENTED_YET); - } - @Test(timeout = 2000) public void requestDepositAddressSuccess() throws Exception { String response = requestDeposit(DEPOSIT_SUCCESS_JSON, 200); @@ -139,11 +128,6 @@ private String withdraw(String responseFileName, int statusCode) throws IOExcept return service.withdrawFunds(params); } - private void withdrawExcept() throws IOException { - stubPost(WITHDRAWAL_SUCCESS_JSON, 200, URL_WITHDRAWALS); - service.withdrawFunds(Currency.BTC, BigDecimal.valueOf(0.005), ADDRESS); - } - private String requestDeposit(String responseFileName, int statusCode) throws IOException { stubPost(responseFileName, statusCode, URL_DEPOSIT_BY_CURRENCY); diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOTradeService.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOTradeService.java index df9cb583195..e5642151d26 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOTradeService.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOTradeService.java @@ -13,12 +13,10 @@ import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.marketdata.Trades; import org.knowm.xchange.dto.trade.LimitOrder; -import org.knowm.xchange.dto.trade.MarketOrder; import org.knowm.xchange.dto.trade.OpenOrders; import org.knowm.xchange.dto.trade.UserTrade; import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderByCurrencyPair; import org.knowm.xchange.service.trade.params.CancelOrderByIdParams; @@ -59,20 +57,6 @@ public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { return CexIOAdapters.adaptOpenOrders(cexIOOrderList); } - @Override - public String placeMarketOrder(MarketOrder marketOrder) throws IOException { - /* - Only in market order! - Presently, the exchange is designed in such way that, depending on the BID/ASK the currency changes - (accordingly, you must specify the amount in another currency) - Example: CurrencyPair.BCH_USD, Order.OrderType.ASK, Amount = 0.02 (BCH) - Example: CurrencyPair.BCH_USD, Order.OrderType.BID, Amount = 20 (USD) - Сurrently cannot be implemented! - */ - - throw new NotYetImplementedForExchangeException(); - } - @Override public String placeLimitOrder(LimitOrder limitOrder) throws IOException { CexIOOrder order = placeCexIOLimitOrder(limitOrder); diff --git a/xchange-coingi/src/main/java/org/knowm/xchange/coingi/service/CoingiAccountService.java b/xchange-coingi/src/main/java/org/knowm/xchange/coingi/service/CoingiAccountService.java index 0da2e4ac571..b8455161014 100644 --- a/xchange-coingi/src/main/java/org/knowm/xchange/coingi/service/CoingiAccountService.java +++ b/xchange-coingi/src/main/java/org/knowm/xchange/coingi/service/CoingiAccountService.java @@ -2,7 +2,6 @@ import java.io.IOException; import java.math.BigDecimal; -import java.util.List; import org.knowm.xchange.Exchange; import org.knowm.xchange.coingi.CoingiAdapters; import org.knowm.xchange.coingi.CoingiErrorAdapter; @@ -14,7 +13,6 @@ import org.knowm.xchange.coingi.dto.trade.CoingiTransactionHistoryRequest; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.dto.account.AccountInfo; -import org.knowm.xchange.dto.account.FundingRecord; import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.account.AccountService; @@ -104,9 +102,4 @@ public CoingiUserTransactionList getTransactions(TradeHistoryParams p) throws IO } } - @Override - public List getFundingHistory(TradeHistoryParams params) - throws NotAvailableFromExchangeException, NotYetImplementedForExchangeException { - throw new NotYetImplementedForExchangeException(); - } } diff --git a/xchange-coingi/src/main/java/org/knowm/xchange/coingi/service/CoingiTradeService.java b/xchange-coingi/src/main/java/org/knowm/xchange/coingi/service/CoingiTradeService.java index 34c391625d2..bd3b27472e2 100644 --- a/xchange-coingi/src/main/java/org/knowm/xchange/coingi/service/CoingiTradeService.java +++ b/xchange-coingi/src/main/java/org/knowm/xchange/coingi/service/CoingiTradeService.java @@ -19,10 +19,8 @@ import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.trade.LimitOrder; -import org.knowm.xchange.dto.trade.MarketOrder; import org.knowm.xchange.dto.trade.OpenOrders; import org.knowm.xchange.dto.trade.UserTrades; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderByIdParams; import org.knowm.xchange.service.trade.params.CancelOrderParams; @@ -56,17 +54,6 @@ public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { } } - @Override - public String placeMarketOrder(MarketOrder order) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public String placeStopOrder(org.knowm.xchange.dto.trade.StopOrder stopOrder) - throws java.io.IOException { - throw new NotYetImplementedForExchangeException(); - } - @Override public String placeLimitOrder(LimitOrder order) throws IOException { try { diff --git a/xchange-deribit/src/main/java/org/knowm/xchange/deribit/v2/service/DeribitTradeService.java b/xchange-deribit/src/main/java/org/knowm/xchange/deribit/v2/service/DeribitTradeService.java index 1e4460f1e05..e1d53afed3f 100644 --- a/xchange-deribit/src/main/java/org/knowm/xchange/deribit/v2/service/DeribitTradeService.java +++ b/xchange-deribit/src/main/java/org/knowm/xchange/deribit/v2/service/DeribitTradeService.java @@ -25,10 +25,8 @@ import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.MarketOrder; import org.knowm.xchange.dto.trade.OpenOrders; -import org.knowm.xchange.dto.trade.StopOrder; import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.ExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.instrument.Instrument; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderByIdParams; @@ -107,24 +105,6 @@ public String placeLimitOrder(LimitOrder limitOrder) throws IOException { return placeOrder(OrderType.limit, limitOrder, limitOrder.getLimitPrice(), null, null); } - @Override - public String placeStopOrder(StopOrder stopOrder) throws IOException { - /* - // TBD: - // get "trigger", "price" and "trigger price" as follows: - Trigger trigger = findOrderFlagValue(order, Trigger.class); - BigDecimal price = stopOrder.getLimitPrice(); - BigDecimal triggerPrice = stopOrder.getStopPrice() - - // then adapt order type of the stop order (add corresponding adapter) - OrderType type = DeribitAdapters.adaptOrderType(stopOrder); - - // validate the values and then call placeOrder: - placeOrder(type, order, price, trigger, triggerPrice); - */ - throw new NotYetImplementedForExchangeException("placeStopOrder"); - } - private String placeOrder( OrderType type, Order order, BigDecimal price, Trigger trigger, BigDecimal triggerPrice) throws IOException { diff --git a/xchange-globitex/src/main/java/org/knowm/xchange/globitex/service/GlobitexAccountService.java b/xchange-globitex/src/main/java/org/knowm/xchange/globitex/service/GlobitexAccountService.java index d3addefea71..6a0203b5b60 100644 --- a/xchange-globitex/src/main/java/org/knowm/xchange/globitex/service/GlobitexAccountService.java +++ b/xchange-globitex/src/main/java/org/knowm/xchange/globitex/service/GlobitexAccountService.java @@ -1,18 +1,12 @@ package org.knowm.xchange.globitex.service; import java.io.IOException; -import java.math.BigDecimal; -import java.util.List; import org.knowm.xchange.Exchange; -import org.knowm.xchange.currency.Currency; import org.knowm.xchange.dto.account.AccountInfo; -import org.knowm.xchange.dto.account.FundingRecord; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.globitex.GlobitexAdapters; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.TradeHistoryParams; import org.knowm.xchange.service.trade.params.TradeHistoryParamsAll; -import org.knowm.xchange.service.trade.params.WithdrawFundsParams; public class GlobitexAccountService extends GlobitexAccountServiceRaw implements AccountService { @@ -25,28 +19,9 @@ public AccountInfo getAccountInfo() throws IOException { return GlobitexAdapters.adaptToAccountInfo(getGlobitexAccounts()); } - @Override - public String withdrawFunds(Currency currency, BigDecimal amount, String address) { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public String withdrawFunds(WithdrawFundsParams params) { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public String requestDepositAddress(Currency currency, String... args) { - throw new NotYetImplementedForExchangeException(); - } - @Override public TradeHistoryParams createFundingHistoryParams() { return new TradeHistoryParamsAll(); } - @Override - public List getFundingHistory(TradeHistoryParams params) { - throw new NotYetImplementedForExchangeException(); - } } diff --git a/xchange-globitex/src/main/java/org/knowm/xchange/globitex/service/GlobitexTradeService.java b/xchange-globitex/src/main/java/org/knowm/xchange/globitex/service/GlobitexTradeService.java index fd3f8a1ad13..5eb2ca50ec1 100644 --- a/xchange-globitex/src/main/java/org/knowm/xchange/globitex/service/GlobitexTradeService.java +++ b/xchange-globitex/src/main/java/org/knowm/xchange/globitex/service/GlobitexTradeService.java @@ -5,12 +5,9 @@ import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.MarketOrder; import org.knowm.xchange.dto.trade.OpenOrders; -import org.knowm.xchange.dto.trade.StopOrder; import org.knowm.xchange.dto.trade.UserTrades; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.globitex.GlobitexAdapters; import org.knowm.xchange.service.trade.TradeService; -import org.knowm.xchange.service.trade.params.CancelOrderParams; import org.knowm.xchange.service.trade.params.TradeHistoryParams; import org.knowm.xchange.service.trade.params.TradeHistoryParamsAll; import org.knowm.xchange.service.trade.params.orders.DefaultOpenOrdersParamCurrencyPair; @@ -55,26 +52,11 @@ public String placeLimitOrder(LimitOrder limitOrder) throws IOException { return placeGlobitexLimitOrder(limitOrder).getObject().getClientOrderId(); } - @Override - public String placeStopOrder(StopOrder stopOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public String changeOrder(LimitOrder limitOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - @Override public boolean cancelOrder(String orderId) throws IOException { return (globitexCancelOrder(orderId).getObject().getOrderStatus().equals("CANCELLED")); } - @Override - public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - @Override public OpenOrdersParams createOpenOrdersParams() { return new DefaultOpenOrdersParamCurrencyPair(); diff --git a/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeAccountService.java b/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeAccountService.java index b7599bc64d3..11397a675fb 100644 --- a/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeAccountService.java +++ b/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeAccountService.java @@ -1,17 +1,10 @@ package org.knowm.xchange.lykke.service; import java.io.IOException; -import java.math.BigDecimal; -import java.util.List; import org.knowm.xchange.Exchange; -import org.knowm.xchange.currency.Currency; import org.knowm.xchange.dto.account.AccountInfo; -import org.knowm.xchange.dto.account.FundingRecord; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.lykke.LykkeAdapter; import org.knowm.xchange.service.account.AccountService; -import org.knowm.xchange.service.trade.params.TradeHistoryParams; -import org.knowm.xchange.service.trade.params.WithdrawFundsParams; public class LykkeAccountService extends LykkeAccountServiceRaw implements AccountService { @@ -24,29 +17,4 @@ public AccountInfo getAccountInfo() throws IOException { return LykkeAdapter.adaptAccountInfo(getWallets()); } - @Override - public String withdrawFunds(Currency currency, BigDecimal amount, String address) - throws IOException { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public String withdrawFunds(WithdrawFundsParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public String requestDepositAddress(Currency currency, String... args) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public TradeHistoryParams createFundingHistoryParams() { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public List getFundingHistory(TradeHistoryParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); - } } diff --git a/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeMarketDataService.java b/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeMarketDataService.java index 22bab7fcaad..462f13bbc85 100644 --- a/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeMarketDataService.java +++ b/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeMarketDataService.java @@ -5,13 +5,9 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; -import org.knowm.xchange.dto.marketdata.Ticker; -import org.knowm.xchange.dto.marketdata.Trades; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.lykke.LykkeAdapter; import org.knowm.xchange.lykke.dto.marketdata.LykkeAssetPair; import org.knowm.xchange.service.marketdata.MarketDataService; -import org.knowm.xchange.service.marketdata.params.Params; public class LykkeMarketDataService extends LykkeMarketDataServiceRaw implements MarketDataService { @@ -19,26 +15,11 @@ public LykkeMarketDataService(Exchange exchange) { super(exchange); } - @Override - public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public List getTickers(Params params) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - @Override public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { return LykkeAdapter.adaptOrderBook(getLykkeOrderBook(currencyPair), currencyPair); } - @Override - public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - public List getAssetPairs() throws IOException { return lykke.getAssetPairs(); } diff --git a/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeTradeService.java b/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeTradeService.java index ddd1c06ab29..ac97371560b 100644 --- a/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeTradeService.java +++ b/xchange-lykke/src/main/java/org/knowm/xchange/lykke/service/LykkeTradeService.java @@ -4,9 +4,7 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.dto.marketdata.Trades; import org.knowm.xchange.dto.trade.LimitOrder; -import org.knowm.xchange.dto.trade.MarketOrder; import org.knowm.xchange.dto.trade.OpenOrders; -import org.knowm.xchange.dto.trade.StopOrder; import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.lykke.LykkeAdapter; @@ -38,21 +36,11 @@ public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { LykkeAdapter.adaptOpenOrders(exchange.getExchangeInstruments(), getLastOrders())); } - @Override - public String placeMarketOrder(MarketOrder marketOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - @Override public String placeLimitOrder(LimitOrder limitOrder) throws IOException { return placeLimitOrder(LykkeAdapter.adaptLykkeOrder(limitOrder)); } - @Override - public String placeStopOrder(StopOrder stopOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - @Override public boolean cancelOrder(String orderId) throws IOException { return cancelLykkeOrder(orderId); diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinFuturesAccountService.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinFuturesAccountService.java index 2a0b8bf32ce..25fe103ebf0 100644 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinFuturesAccountService.java +++ b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinFuturesAccountService.java @@ -2,17 +2,13 @@ import java.io.IOException; import java.math.BigDecimal; -import java.util.List; import org.knowm.xchange.Exchange; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.dto.account.AccountInfo; -import org.knowm.xchange.dto.account.FundingRecord; import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.okcoin.OkCoinAdapters; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.TradeHistoryParams; -import org.knowm.xchange.service.trade.params.WithdrawFundsParams; public class OkCoinFuturesAccountService extends OkCoinAccountServiceRaw implements AccountService { @@ -39,11 +35,6 @@ public String withdrawFunds(Currency currency, BigDecimal amount, String address throw new NotAvailableFromExchangeException(); } - @Override - public String withdrawFunds(WithdrawFundsParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - @Override public String requestDepositAddress(Currency currency, String... args) throws IOException { @@ -55,8 +46,4 @@ public TradeHistoryParams createFundingHistoryParams() { throw new NotAvailableFromExchangeException(); } - @Override - public List getFundingHistory(TradeHistoryParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); - } } diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinFuturesTradeService.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinFuturesTradeService.java index d21c57d197c..f671cf487c4 100644 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinFuturesTradeService.java +++ b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinFuturesTradeService.java @@ -16,10 +16,8 @@ import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.MarketOrder; import org.knowm.xchange.dto.trade.OpenOrders; -import org.knowm.xchange.dto.trade.StopOrder; import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.ExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.instrument.Instrument; import org.knowm.xchange.okcoin.FuturesContract; import org.knowm.xchange.okcoin.OkCoinAdapters; @@ -30,8 +28,16 @@ import org.knowm.xchange.okcoin.dto.trade.OkCoinPriceLimit; import org.knowm.xchange.okcoin.dto.trade.OkCoinTradeResult; import org.knowm.xchange.service.trade.TradeService; -import org.knowm.xchange.service.trade.params.*; -import org.knowm.xchange.service.trade.params.orders.*; +import org.knowm.xchange.service.trade.params.CancelOrderByInstrument; +import org.knowm.xchange.service.trade.params.CancelOrderParams; +import org.knowm.xchange.service.trade.params.DefaultCancelOrderParamId; +import org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamPaging; +import org.knowm.xchange.service.trade.params.TradeHistoryParamCurrencyPair; +import org.knowm.xchange.service.trade.params.TradeHistoryParams; +import org.knowm.xchange.service.trade.params.orders.DefaultQueryOrderParam; +import org.knowm.xchange.service.trade.params.orders.OpenOrdersParams; +import org.knowm.xchange.service.trade.params.orders.OrderQueryParamInstrument; +import org.knowm.xchange.service.trade.params.orders.OrderQueryParams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -158,11 +164,6 @@ public String placeLimitOrder(LimitOrder limitOrder) throws IOException { } } - @Override - public String placeStopOrder(StopOrder stopOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - /** Liquidate long or short contract using a limit order */ public String liquidateLimitOrder(LimitOrder limitOrder) throws IOException { diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeService.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeService.java index 1357cf02a8d..d438572e0e5 100644 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeService.java +++ b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeService.java @@ -17,10 +17,8 @@ import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.MarketOrder; import org.knowm.xchange.dto.trade.OpenOrders; -import org.knowm.xchange.dto.trade.StopOrder; import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.okcoin.OkCoinAdapters; import org.knowm.xchange.okcoin.dto.trade.OkCoinOrderResult; import org.knowm.xchange.okcoin.dto.trade.OkCoinTradeResult; @@ -165,11 +163,6 @@ public String placeBatchLimitOrder(LimitOrder... limitOrders) throws IOException } } - @Override - public String placeStopOrder(StopOrder stopOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - @Override public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { if (!(orderParams instanceof CancelOrderByIdParams) diff --git a/xchange-stream-btcmarkets/src/main/java/info/bitrich/xchangestream/btcmarkets/BTCMarketsStreamingAdapters.java b/xchange-stream-btcmarkets/src/main/java/info/bitrich/xchangestream/btcmarkets/BTCMarketsStreamingAdapters.java index 2f25b8cfa79..d14ab616ed4 100644 --- a/xchange-stream-btcmarkets/src/main/java/info/bitrich/xchangestream/btcmarkets/BTCMarketsStreamingAdapters.java +++ b/xchange-stream-btcmarkets/src/main/java/info/bitrich/xchangestream/btcmarkets/BTCMarketsStreamingAdapters.java @@ -15,7 +15,6 @@ import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.dto.marketdata.Trade; import org.knowm.xchange.dto.trade.LimitOrder; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.utils.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -78,9 +77,4 @@ public static Trade adaptTradeMessageToTrade(BTCMarketsWebSocketTradeMessage mes .build(); } - public static OrderBook adaptOrderUpdateMessageToOrderBook( - BTCMarketsWebSocketOrderbookMessage message) { - - throw new NotYetImplementedForExchangeException(); - } } diff --git a/xchange-stream-cexio/src/main/java/info/bitrich/xchangestream/cexio/CexioStreamingMarketDataService.java b/xchange-stream-cexio/src/main/java/info/bitrich/xchangestream/cexio/CexioStreamingMarketDataService.java index e24d2ccc524..395d4087f60 100644 --- a/xchange-stream-cexio/src/main/java/info/bitrich/xchangestream/cexio/CexioStreamingMarketDataService.java +++ b/xchange-stream-cexio/src/main/java/info/bitrich/xchangestream/cexio/CexioStreamingMarketDataService.java @@ -12,9 +12,7 @@ import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; -import org.knowm.xchange.dto.marketdata.Trade; import org.knowm.xchange.dto.trade.LimitOrder; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; public class CexioStreamingMarketDataService implements StreamingMarketDataService { @@ -115,8 +113,4 @@ public Observable getTicker(CurrencyPair currencyPair, Object... args) { && prev.getAsk().compareTo(next.getAsk()) == 0); } - @Override - public Observable getTrades(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException(); - } } diff --git a/xchange-stream-coinbasepro/src/main/java/info/bitrich/xchangestream/coinbasepro/CoinbaseProStreamingExchange.java b/xchange-stream-coinbasepro/src/main/java/info/bitrich/xchangestream/coinbasepro/CoinbaseProStreamingExchange.java index ecda42c04d6..901d2deb750 100644 --- a/xchange-stream-coinbasepro/src/main/java/info/bitrich/xchangestream/coinbasepro/CoinbaseProStreamingExchange.java +++ b/xchange-stream-coinbasepro/src/main/java/info/bitrich/xchangestream/coinbasepro/CoinbaseProStreamingExchange.java @@ -2,18 +2,16 @@ import info.bitrich.xchangestream.coinbasepro.dto.CoinbaseProOrderBookMode; import info.bitrich.xchangestream.core.ProductSubscription; -import info.bitrich.xchangestream.core.StreamingAccountService; import info.bitrich.xchangestream.core.StreamingExchange; import info.bitrich.xchangestream.service.netty.ConnectionStateModel.State; import info.bitrich.xchangestream.service.netty.WebSocketClientHandler; import io.reactivex.Completable; import io.reactivex.Observable; -import java.util.*; +import java.util.Arrays; import org.knowm.xchange.ExchangeSpecification; import org.knowm.xchange.coinbasepro.CoinbaseProExchange; import org.knowm.xchange.coinbasepro.dto.account.CoinbaseProWebsocketAuthData; import org.knowm.xchange.coinbasepro.service.CoinbaseProAccountServiceRaw; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; /** CoinbasePro Streaming Exchange. Connects to live WebSocket feed. */ public class CoinbaseProStreamingExchange extends CoinbaseProExchange implements StreamingExchange { @@ -157,11 +155,6 @@ public CoinbaseProStreamingMarketDataService getStreamingMarketDataService() { return streamingMarketDataService; } - @Override - public StreamingAccountService getStreamingAccountService() { - throw new NotYetImplementedForExchangeException(); - } - @Override public CoinbaseProStreamingTradeService getStreamingTradeService() { return streamingTradeService; diff --git a/xchange-stream-coinjar/src/main/java/info/bitrich/xchangestream/coinjar/CoinjarStreamingMarketDataService.java b/xchange-stream-coinjar/src/main/java/info/bitrich/xchangestream/coinjar/CoinjarStreamingMarketDataService.java index 10da1539251..6ed6d791666 100644 --- a/xchange-stream-coinjar/src/main/java/info/bitrich/xchangestream/coinjar/CoinjarStreamingMarketDataService.java +++ b/xchange-stream-coinjar/src/main/java/info/bitrich/xchangestream/coinjar/CoinjarStreamingMarketDataService.java @@ -14,10 +14,7 @@ import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.marketdata.OrderBook; -import org.knowm.xchange.dto.marketdata.Ticker; -import org.knowm.xchange.dto.marketdata.Trade; import org.knowm.xchange.dto.trade.LimitOrder; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -90,13 +87,4 @@ public Observable getOrderBook(CurrencyPair currencyPair, Object... a .filter(orderbook -> !orderbook.getBids().isEmpty() && !orderbook.getAsks().isEmpty()); } - @Override - public Observable getTicker(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public Observable getTrades(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException(); - } } diff --git a/xchange-stream-dydx/src/main/java/info/bitrich/xchangestream/dydx/service/v1/dydxStreamingMarketDataService.java b/xchange-stream-dydx/src/main/java/info/bitrich/xchangestream/dydx/service/v1/dydxStreamingMarketDataService.java index 9bb3d2f8ab5..fe3ea7d151b 100644 --- a/xchange-stream-dydx/src/main/java/info/bitrich/xchangestream/dydx/service/v1/dydxStreamingMarketDataService.java +++ b/xchange-stream-dydx/src/main/java/info/bitrich/xchangestream/dydx/service/v1/dydxStreamingMarketDataService.java @@ -18,9 +18,6 @@ import java.util.concurrent.ConcurrentHashMap; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; -import org.knowm.xchange.dto.marketdata.Ticker; -import org.knowm.xchange.dto.marketdata.Trade; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.instrument.Instrument; /** Author: Max Gao (gaamox@tutanota.com) Created: 20-02-2021 */ @@ -89,13 +86,4 @@ public Observable getOrderBook(CurrencyPair currencyPair, Object... a }); } - @Override - public Observable getTicker(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException("Not yet implemented!"); - } - - @Override - public Observable getTrades(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException("Not yet implemented!"); - } } diff --git a/xchange-stream-dydx/src/main/java/info/bitrich/xchangestream/dydx/service/v3/dydxStreamingMarketDataService.java b/xchange-stream-dydx/src/main/java/info/bitrich/xchangestream/dydx/service/v3/dydxStreamingMarketDataService.java index 27d4457f416..d50252b1f4d 100644 --- a/xchange-stream-dydx/src/main/java/info/bitrich/xchangestream/dydx/service/v3/dydxStreamingMarketDataService.java +++ b/xchange-stream-dydx/src/main/java/info/bitrich/xchangestream/dydx/service/v3/dydxStreamingMarketDataService.java @@ -18,9 +18,6 @@ import java.util.concurrent.ConcurrentHashMap; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; -import org.knowm.xchange.dto.marketdata.Ticker; -import org.knowm.xchange.dto.marketdata.Trade; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.instrument.Instrument; /** Author: Max Gao (gaamox@tutanota.com) Created: 20-02-2021 */ @@ -75,13 +72,4 @@ public Observable getOrderBook(CurrencyPair currencyPair, Object... a }); } - @Override - public Observable getTicker(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException("Not yet implemented!"); - } - - @Override - public Observable getTrades(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException("Not yet implemented!"); - } } diff --git a/xchange-stream-gemini-v2/src/main/java/info/bitrich/xchangestream/gemini/GeminiStreamingMarketDataService.java b/xchange-stream-gemini-v2/src/main/java/info/bitrich/xchangestream/gemini/GeminiStreamingMarketDataService.java index 76c1f597a57..02bbe65bee8 100644 --- a/xchange-stream-gemini-v2/src/main/java/info/bitrich/xchangestream/gemini/GeminiStreamingMarketDataService.java +++ b/xchange-stream-gemini-v2/src/main/java/info/bitrich/xchangestream/gemini/GeminiStreamingMarketDataService.java @@ -10,9 +10,6 @@ import java.util.concurrent.ConcurrentHashMap; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; -import org.knowm.xchange.dto.marketdata.Ticker; -import org.knowm.xchange.dto.marketdata.Trade; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; /** Adapted from V1 by Max Gao on 01-09-2021 */ public class GeminiStreamingMarketDataService implements StreamingMarketDataService { @@ -51,13 +48,4 @@ public Observable getOrderBook(CurrencyPair currencyPair, Object... a }); } - @Override - public Observable getTicker(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException("Not Yet Implemented!"); - } - - @Override - public Observable getTrades(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException("Not Yet Implemented!"); - } } diff --git a/xchange-stream-kucoin/src/main/java/info/bitrich/xchangestream/kucoin/KucoinStreamingMarketDataService.java b/xchange-stream-kucoin/src/main/java/info/bitrich/xchangestream/kucoin/KucoinStreamingMarketDataService.java index cd26529aff9..a87fb2e72e6 100644 --- a/xchange-stream-kucoin/src/main/java/info/bitrich/xchangestream/kucoin/KucoinStreamingMarketDataService.java +++ b/xchange-stream-kucoin/src/main/java/info/bitrich/xchangestream/kucoin/KucoinStreamingMarketDataService.java @@ -14,8 +14,6 @@ import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; -import org.knowm.xchange.dto.marketdata.Trade; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.kucoin.KucoinAdapters; import org.knowm.xchange.kucoin.KucoinMarketDataService; import org.knowm.xchange.kucoin.dto.response.OrderBookResponse; @@ -143,11 +141,6 @@ private Observable triggerObservableBody(Observable observable) { return observable; } - @Override - public Observable getTrades(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException(); - } - private final class OrderbookSubscription { final Observable stream; final AtomicLong lastUpdateId = new AtomicLong(); diff --git a/xchange-stream-lgo/src/main/java/info/bitrich/xchangestream/lgo/LgoStreamingMarketDataService.java b/xchange-stream-lgo/src/main/java/info/bitrich/xchangestream/lgo/LgoStreamingMarketDataService.java index ddb6ed16296..26b5499908d 100644 --- a/xchange-stream-lgo/src/main/java/info/bitrich/xchangestream/lgo/LgoStreamingMarketDataService.java +++ b/xchange-stream-lgo/src/main/java/info/bitrich/xchangestream/lgo/LgoStreamingMarketDataService.java @@ -6,9 +6,7 @@ import java.util.concurrent.ConcurrentHashMap; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; -import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.dto.marketdata.Trade; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; public class LgoStreamingMarketDataService implements StreamingMarketDataService { @@ -44,8 +42,4 @@ private LgoTradeBatchSubscription createTradeSubscription(CurrencyPair currencyP return LgoTradeBatchSubscription.create(service, currencyPair); } - @Override - public Observable getTicker(CurrencyPair currencyPair, Object... args) { - throw new NotYetImplementedForExchangeException(); - } } diff --git a/xchange-yobit/src/main/java/org/knowm/xchange/yobit/service/YoBitTradeServiceRaw.java b/xchange-yobit/src/main/java/org/knowm/xchange/yobit/service/YoBitTradeServiceRaw.java index 1a776feb298..497aa683c21 100644 --- a/xchange-yobit/src/main/java/org/knowm/xchange/yobit/service/YoBitTradeServiceRaw.java +++ b/xchange-yobit/src/main/java/org/knowm/xchange/yobit/service/YoBitTradeServiceRaw.java @@ -8,9 +8,7 @@ import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.trade.LimitOrder; -import org.knowm.xchange.dto.trade.OpenOrders; import org.knowm.xchange.exceptions.ExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderByIdParams; import org.knowm.xchange.service.trade.params.orders.OpenOrdersParamCurrencyPair; @@ -26,11 +24,6 @@ public YoBitTradeServiceRaw(YoBitExchange exchange) { super(YoBit.class, exchange); } - @Override - public OpenOrders getOpenOrders() throws IOException { - throw new NotYetImplementedForExchangeException("Need to specify OpenOrdersParams"); - } - public BaseYoBitResponse activeOrders(OpenOrdersParamCurrencyPair params) throws IOException { CurrencyPair currencyPair = params.getCurrencyPair();