In Rversion(3.4.2) , Quantmode Getquote() function is throwing below error.
code has been provided in the below.
require(TTR) require(zoo) require(xts) library(quantmod) library('ROracle')
from <- c("CAD", "ALL", "AFN", "ARS", "AWG", "AUD", "AZN", "BSD", "BBD", "BYN", "BZD") to <- c("USD", "USD", "USD", "USD", "USD", "USD", "USD", "USD", "USD", "USD", "USD") df <- data.frame(getQuote(paste0(from, to, "=x")))
Getting Error as below
df <- data.frame(getQuote(paste0(from, to, "=x"))) Error in download.file(paste0("https://query1.finance.yahoo.com/v7/finance/quote?symbols=", : cannot open URL 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=CADUSD=x,ALLUSD=x,AFNUSD=x,ARSUSD=x,AWGUSD=x,AUDUSD=x,AZNUSD=x,BSDUSD=x,BBDUSD=x,BYNUSD=x,BZDUSD=x&fields=regularMarketPrice,regularMarketChange,regularMarketChangePercent,regularMarketOpen,regularMarketDayHigh,regularMarketDayLow,regularMarketVolume' In addition: Warning message: In download.file(paste0("https://query1.finance.yahoo.com/v7/finance/quote?symbols=", : cannot open URL 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=CADUSD=x,ALLUSD=x,AFNUSD=x,ARSUSD=x,AWGUSD=x,AUDUSD=x,AZNUSD=x,BSDUSD=x,BBDUSD=x,BYNUSD=x,BZDUSD=x&fields=regularMarketPrice,regularMarketChange,regularMarketChangePercent,regularMarketOpen,regularMarketDayHigh,regularMarketDayLow,regularMarketVolume': HTTP status was '403 Forbidden' >