From 9c3e405fe08a2ab1772a8757674bb5ebb6ce13f2 Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 10 Nov 2024 17:33:18 -0500 Subject: [PATCH] get market price by currency code base e.g. usdt --- core/src/main/java/haveno/core/api/CorePriceService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/haveno/core/api/CorePriceService.java b/core/src/main/java/haveno/core/api/CorePriceService.java index 453236c5bc..ddd194ebab 100644 --- a/core/src/main/java/haveno/core/api/CorePriceService.java +++ b/core/src/main/java/haveno/core/api/CorePriceService.java @@ -72,7 +72,7 @@ class CorePriceService { * @return Price per 1 XMR in the given currency (traditional or crypto) */ public double getMarketPrice(String currencyCode) throws ExecutionException, InterruptedException, TimeoutException, IllegalArgumentException { - var marketPrice = priceFeedService.requestAllPrices().get(currencyCode); + var marketPrice = priceFeedService.requestAllPrices().get(CurrencyUtil.getCurrencyCodeBase(currencyCode)); if (marketPrice == null) { throw new IllegalArgumentException("Currency not found: " + currencyCode); // message sent to client }