mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
Integrate more exchanges using knowm xchange
Add more exchange providers supported by the knowm xchange library. This extends support for a few new currencies.
This commit is contained in:
parent
7fc5191798
commit
637378b58a
30 changed files with 1114 additions and 6 deletions
13
build.gradle
13
build.gradle
|
@ -468,12 +468,25 @@ configure(project(':pricenode')) {
|
|||
implementation("org.apache.httpcomponents:httpclient:$httpclientVersion") {
|
||||
exclude(module: 'commons-codec')
|
||||
}
|
||||
compile("org.knowm.xchange:xchange-bitbay:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-bitcoinaverage:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-btcmarkets:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-binance:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-bitfinex:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-bitflyer:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-bitstamp:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-cexio:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-coinmate:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-coinmarketcap:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-coinone:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-exmo:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-independentreserve:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-kraken:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-luno:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-mercadobitcoin:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-paribu:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-poloniex:$knowmXchangeVersion")
|
||||
compile("org.knowm.xchange:xchange-quoine:$knowmXchangeVersion")
|
||||
compile("org.springframework.boot:spring-boot-starter-web:$springBootVersion")
|
||||
compile("org.springframework.boot:spring-boot-starter-actuator")
|
||||
testCompile "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.knowm.xchange.ExchangeFactory;
|
|||
import org.knowm.xchange.currency.Currency;
|
||||
import org.knowm.xchange.currency.CurrencyPair;
|
||||
import org.knowm.xchange.dto.marketdata.Ticker;
|
||||
import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException;
|
||||
import org.knowm.xchange.service.marketdata.MarketDataService;
|
||||
import org.knowm.xchange.service.marketdata.params.CurrencyPairsParam;
|
||||
import org.knowm.xchange.service.marketdata.params.Params;
|
||||
|
@ -35,6 +36,7 @@ import java.time.Duration;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
|
@ -129,7 +131,7 @@ public abstract class ExchangeRateProvider extends PriceProvider<Set<ExchangeRat
|
|||
// The benefits of this approach (vs polling each ticker) are twofold:
|
||||
// 1) the polling of the exchange is faster (one HTTP call vs several)
|
||||
// 2) it's easier to stay below any API rate limits the exchange might have
|
||||
List<Ticker> tickersRetrievedFromExchange;
|
||||
List<Ticker> tickersRetrievedFromExchange = new ArrayList<>();
|
||||
try {
|
||||
tickersRetrievedFromExchange = marketDataService.getTickers(new CurrencyPairsParam() {
|
||||
|
||||
|
@ -167,7 +169,49 @@ public abstract class ExchangeRateProvider extends PriceProvider<Set<ExchangeRat
|
|||
return Collections.emptyList();
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
|
||||
if (tickersRetrievedFromExchange.isEmpty()) {
|
||||
// If the bulk ticker retrieval went through, but no tickers were
|
||||
// retrieved, this is a strong indication that this specific exchange
|
||||
// needs a specific list of pairs given as argument, for bulk retrieval to
|
||||
// work. See requiresFilterDuringBulkTickerRetrieval()
|
||||
throw new IllegalArgumentException("No tickers retrieved, " +
|
||||
"exchange requires explicit filter argument during bulk retrieval?");
|
||||
}
|
||||
}
|
||||
catch (NotYetImplementedForExchangeException e) {
|
||||
// Thrown when a provider has no marketDataService.getTickers() implementation
|
||||
// either because the exchange API does not provide it, or because it has not
|
||||
// been implemented yet in the knowm xchange library
|
||||
|
||||
// In this case (retrieval of bulk tickers is not possible) retrieve the
|
||||
// tickers one by one
|
||||
List<Ticker> finalTickersRetrievedFromExchange = tickersRetrievedFromExchange;
|
||||
Stream.of(desiredFiatPairs, desiredCryptoPairs)
|
||||
.flatMap(Collection::stream)
|
||||
.collect(Collectors.toList())
|
||||
.forEach(cp -> {
|
||||
try {
|
||||
|
||||
// This is done in a loop, and can therefore result in a burst
|
||||
// of API calls. Some exchanges do not allow bursts
|
||||
// A simplistic solution is to delay every call by 1 second
|
||||
// TODO Switch to using a more elegant solution (per exchange)
|
||||
// like ResilienceSpecification (needs knowm xchange libs v5)
|
||||
if (getMarketDataCallDelay() > 0) {
|
||||
Thread.sleep(getMarketDataCallDelay());
|
||||
}
|
||||
|
||||
Ticker ticker = marketDataService.getTicker(cp);
|
||||
finalTickersRetrievedFromExchange.add(ticker);
|
||||
|
||||
} catch (IOException | InterruptedException ioException) {
|
||||
ioException.printStackTrace();
|
||||
log.error("Could not query tickers for " + getName(), e);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception e) {
|
||||
// If there was a problem with polling this exchange, return right away,
|
||||
// since there are no results to parse and process
|
||||
log.error("Could not query tickers for provider " + getName(), e);
|
||||
|
@ -209,6 +253,18 @@ public abstract class ExchangeRateProvider extends PriceProvider<Set<ExchangeRat
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies optional delay between certain kind of API calls that can result in
|
||||
* bursts. We want to avoid bursts, because this can cause certain exchanges to
|
||||
* temporarily restrict access to the pricenode IP.
|
||||
*
|
||||
* @return Amount of milliseconds of delay between marketDataService.getTicker calls.
|
||||
* By default 0, but can be overwritten by each provider.
|
||||
*/
|
||||
protected long getMarketDataCallDelay() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Whether or not the bulk retrieval of tickers from the exchange requires an
|
||||
* explicit filter (list of desired pairs) or not. If true, the
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.btcmarkets.BTCMarketsExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class BTCMarkets extends ExchangeRateProvider {
|
||||
|
||||
public BTCMarkets() {
|
||||
super("BTCMARKETS", "btcmarkets", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: AUD
|
||||
// Supported alts: ETH, LTC
|
||||
return doGet(BTCMarketsExchange.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -37,9 +37,9 @@ class Binance extends ExchangeRateProvider {
|
|||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: EUR, NGN, RUB, TRY, ZAR
|
||||
// Supported alts: BEAM, DASH, DCR, DOGE, ETC, ETH, LTC, NAV, PIVX, XMR, XZC, ZEC,
|
||||
// ZEN
|
||||
// Supported fiat: EUR, GBP, NGN, RUB, TRY, UAH, ZAR
|
||||
// Supported alts: BEAM, DAI, DASH, DCR, DOGE, ETC, ETH, LTC, NAV, PIVX, XMR, XZC,
|
||||
// ZEC, ZEN
|
||||
return doGet(BinanceExchange.class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.bitbay.BitbayExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class Bitbay extends ExchangeRateProvider {
|
||||
|
||||
public Bitbay() {
|
||||
super("BITBAY", "bitbay", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: EUR, GBP, PLN, USD
|
||||
// Supported alts: DASH, ETH, LTC
|
||||
return doGet(BitbayExchange.class);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.bitflyer.BitflyerExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class Bitflyer extends ExchangeRateProvider {
|
||||
|
||||
public Bitflyer() {
|
||||
super("BITFLYER", "bitflyer", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: JPY
|
||||
// Supported alts: ETH
|
||||
return doGet(BitflyerExchange.class);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.bitstamp.BitstampExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class Bitstamp extends ExchangeRateProvider {
|
||||
|
||||
public Bitstamp() {
|
||||
super("BITSTAMP", "bitstamp", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: EUR, GBP, USD
|
||||
// Supported alts: ETH, LTC
|
||||
return doGet(BitstampExchange.class);
|
||||
}
|
||||
}
|
49
pricenode/src/main/java/bisq/price/spot/providers/CexIO.java
Normal file
49
pricenode/src/main/java/bisq/price/spot/providers/CexIO.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.cexio.CexIOExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class CexIO extends ExchangeRateProvider {
|
||||
|
||||
public CexIO() {
|
||||
super("CexIO", "cexio", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: EUR, GBP, RUB, USD
|
||||
// Supported alts: DASH, ETH, LTC
|
||||
return doGet(CexIOExchange.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean requiresFilterDuringBulkTickerRetrieval() {
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.coinmate.CoinmateExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class Coinmate extends ExchangeRateProvider {
|
||||
|
||||
public Coinmate() {
|
||||
super("Coinmate", "coinmate", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: CZK, EUR
|
||||
// Supported alts: DASH, ETH, LTC
|
||||
return doGet(CoinmateExchange.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.coinone.CoinoneExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class Coinone extends ExchangeRateProvider {
|
||||
|
||||
public Coinone() {
|
||||
super("COINONE", "coinone", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: KRW
|
||||
// Supported alts: -
|
||||
return doGet(CoinoneExchange.class);
|
||||
}
|
||||
|
||||
}
|
46
pricenode/src/main/java/bisq/price/spot/providers/Exmo.java
Normal file
46
pricenode/src/main/java/bisq/price/spot/providers/Exmo.java
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.exmo.ExmoExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class Exmo extends ExchangeRateProvider {
|
||||
|
||||
public Exmo() {
|
||||
// API rate limit = 10 calls / second from the same IP ( see https://exmo.com/en/api )
|
||||
super("EXMO", "exmo", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: EUR, PLN, RUB, UAH (Ukrainian hryvnia), USD
|
||||
// Supported alts: DASH, DOGE, ETC, ETH, LTC, XMR, ZEC
|
||||
return doGet(ExmoExchange.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.independentreserve.IndependentReserveExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class IndependentReserve extends ExchangeRateProvider {
|
||||
|
||||
public IndependentReserve() {
|
||||
super("IndependentReserve", "independentreserve", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: AUD, NZD (New Zealand Dollar), USD
|
||||
// Supported alts: -
|
||||
return doGet(IndependentReserveExchange.class);
|
||||
}
|
||||
|
||||
}
|
52
pricenode/src/main/java/bisq/price/spot/providers/Luno.java
Normal file
52
pricenode/src/main/java/bisq/price/spot/providers/Luno.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.luno.LunoExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class Luno extends ExchangeRateProvider {
|
||||
|
||||
public Luno() {
|
||||
super("LUNO", "luno", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: IDR (Indonesian rupiah), MYR (Malaysian ringgit),
|
||||
// NGN (Nigerian Naira), ZAR (South African rand)
|
||||
// Supported alts: -
|
||||
return doGet(LunoExchange.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected long getMarketDataCallDelay() {
|
||||
// Luno allows only 1 MarketData call per second
|
||||
// (see https://www.luno.com/en/developers/api )
|
||||
return 1000;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.mercadobitcoin.MercadoBitcoinExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class MercadoBitcoin extends ExchangeRateProvider {
|
||||
|
||||
public MercadoBitcoin() {
|
||||
super("MercadoBitcoin", "mercadobitcoin", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: BRL (Brazilian Real)
|
||||
// Supported alts: -
|
||||
return doGet(MercadoBitcoinExchange.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.paribu.ParibuExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class Paribu extends ExchangeRateProvider {
|
||||
|
||||
public Paribu() {
|
||||
super("PARIBU", "paribu", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: TRY (Turkish Lira)
|
||||
// Supported alts: -
|
||||
return doGet(ParibuExchange.class);
|
||||
}
|
||||
}
|
|
@ -38,7 +38,7 @@ class Poloniex extends ExchangeRateProvider {
|
|||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: -
|
||||
// Supported alts: DASH, DCR, DOGE, ETC, ETH, GRIN, LTC, XMR, ZEC
|
||||
// Supported alts: DASH, DCR, DOGE, ETC, ETH, LTC, XMR, ZEC
|
||||
return doGet(PoloniexExchange.class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.spot.ExchangeRate;
|
||||
import bisq.price.spot.ExchangeRateProvider;
|
||||
|
||||
import org.knowm.xchange.quoine.QuoineExchange;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
class Quoine extends ExchangeRateProvider {
|
||||
|
||||
public Quoine() {
|
||||
super("QUOINE", "quoine", Duration.ofMinutes(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ExchangeRate> doGet() {
|
||||
// Supported fiat: AUD, CNY, EUR, HKD, IDR, INR, JPY, PHP, SGD, USD
|
||||
// Supported alts: ETH
|
||||
return doGet(QuoineExchange.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean requiresFilterDuringBulkTickerRetrieval() {
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class BTCMarketsTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new BTCMarkets());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class BitbayTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new Bitbay());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class BitflyerTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new Bitflyer());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class BitstampTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new Bitstamp());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class CexIOTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new CexIO());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class CoinmateTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new Coinmate());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class CoinoneTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new Coinone());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class ExmoTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new Exmo());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class IndependentReserveTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new IndependentReserve());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class LunoTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new Luno());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class MercadoBitcoinTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new MercadoBitcoin());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class ParibuTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new Paribu());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.spot.providers;
|
||||
|
||||
import bisq.price.AbstractExchangeRateProviderTest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class QuoineTest extends AbstractExchangeRateProviderTest {
|
||||
|
||||
@Test
|
||||
public void doGet_successfulCall() {
|
||||
doGet_successfulCall(new Quoine());
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue