Error while using quantmod GetQuote() function

by suresh vignesh   Last Updated August 14, 2019 05:26 AM - source

In Rversion(3.4.2) , Quantmode Getquote() function is throwing below error.

code has been provided in the below.

loading libraries

require(TTR) require(zoo) require(xts) library(quantmod) library('ROracle')

loading currencies

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("", : cannot open URL ',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("", : cannot open URL ',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' >

Tags : r currency

Related Questions

How to implement currency conversion

Updated January 18, 2018 06:26 AM

Currency Pipe in Angular 2

Updated April 29, 2017 00:26 AM

How to convert decimal value to string type

Updated March 03, 2018 16:26 PM