diff --git a/name.abuchen.portfolio/src/name/abuchen/portfolio/online/impl/AlphavantageQuoteFeed.java b/name.abuchen.portfolio/src/name/abuchen/portfolio/online/impl/AlphavantageQuoteFeed.java index 073b2dbdb4..d95be69ed8 100644 --- a/name.abuchen.portfolio/src/name/abuchen/portfolio/online/impl/AlphavantageQuoteFeed.java +++ b/name.abuchen.portfolio/src/name/abuchen/portfolio/online/impl/AlphavantageQuoteFeed.java @@ -193,7 +193,7 @@ private QuoteFeedData getHistoricalQuotes(Security security, boolean collectRawR { @SuppressWarnings("nls") WebAccess webaccess = new WebAccess("www.alphavantage.co", "/query") // - .addParameter("function", "TIME_SERIES_DAILY_ADJUSTED") // + .addParameter("function", "TIME_SERIES_DAILY") // .addParameter("symbol", security.getTickerSymbol()) // .addParameter("apikey", apiKey) // .addParameter("datatype", "csv") // @@ -208,8 +208,7 @@ private QuoteFeedData getHistoricalQuotes(Security security, boolean collectRawR return data; // poor man's check - if (!"timestamp,open,high,low,close,adjusted_close,volume,dividend_amount,split_coefficient" //$NON-NLS-1$ - .equals(lines[0])) + if (!"timestamp,open,high,low,close,volume".equals(lines[0])) //$NON-NLS-1$ { data.addError(new IOException(MessageFormat.format(Messages.MsgUnexpectedHeader, html))); return data; @@ -222,7 +221,7 @@ private QuoteFeedData getHistoricalQuotes(Security security, boolean collectRawR String line = lines[ii]; String[] values = line.split(","); //$NON-NLS-1$ - if (values.length != 9) + if (values.length != 6) throw new IOException(MessageFormat.format(Messages.MsgUnexpectedValue, line)); LatestSecurityPrice price = new LatestSecurityPrice(); @@ -235,7 +234,7 @@ private QuoteFeedData getHistoricalQuotes(Security security, boolean collectRawR price.setHigh(asPrice(values[2])); price.setLow(asPrice(values[3])); - price.setVolume(Long.parseLong(values[6])); + price.setVolume(Long.parseLong(values[5])); if (price.getValue() != 0) data.addPrice(price);