From 49d79f6538840a619478bf54aa395cb871c4be89 Mon Sep 17 00:00:00 2001 From: Morpheus1w3 <103072607+Morpheus1w3@users.noreply.github.com> Date: Sun, 3 Dec 2023 06:21:21 +0100 Subject: [PATCH] Update FinnhubQuoteFeed --- .../abuchen/portfolio/online/impl/FinnhubQuoteFeed.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/name.abuchen.portfolio/src/name/abuchen/portfolio/online/impl/FinnhubQuoteFeed.java b/name.abuchen.portfolio/src/name/abuchen/portfolio/online/impl/FinnhubQuoteFeed.java index 4b9caf9697..7d8692a323 100644 --- a/name.abuchen.portfolio/src/name/abuchen/portfolio/online/impl/FinnhubQuoteFeed.java +++ b/name.abuchen.portfolio/src/name/abuchen/portfolio/online/impl/FinnhubQuoteFeed.java @@ -92,7 +92,7 @@ private QuoteFeedData getHistoricalQuotes(Security security, boolean collectRawR try { @SuppressWarnings("nls") - WebAccess webaccess = new WebAccess("finnhub.io", "/api/v1/stock/candle") + WebAccess webaccess = new WebAccess("finnhub.io", "/api/v1/quote") .addParameter("symbol", security.getTickerSymbol()) // .addParameter("resolution", "D") // .addParameter("from", @@ -117,7 +117,6 @@ private QuoteFeedData getHistoricalQuotes(Security security, boolean collectRawR JSONArray high = (JSONArray) json.get("h"); //$NON-NLS-1$ JSONArray low = (JSONArray) json.get("l"); //$NON-NLS-1$ JSONArray close = (JSONArray) json.get("c"); //$NON-NLS-1$ - JSONArray volume = (JSONArray) json.get("v"); //$NON-NLS-1$ if (timestamps == null) { @@ -148,9 +147,6 @@ private QuoteFeedData getHistoricalQuotes(Security security, boolean collectRawR Number l = (Number) low.get(index); price.setLow(l == null ? LatestSecurityPrice.NOT_AVAILABLE : Values.Quote.factorize(l.doubleValue())); - Number v = (Number) volume.get(index); - price.setVolume(v == null ? LatestSecurityPrice.NOT_AVAILABLE : v.longValue()); - if (price.getValue() > 0) data.addPrice(price); }