Skip to content

Commit

Permalink
Update Oanda URL
Browse files Browse the repository at this point in the history
The previous URL was returning HTTP 404 errors.

Fixes #225.
  • Loading branch information
joshuaulrich committed Apr 5, 2018
1 parent 934fc04 commit 3c07421
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions R/getSymbols.R
Original file line number Diff line number Diff line change
Expand Up @@ -1200,16 +1200,15 @@ function(Symbols,env,return.class='xts',
" Symbol: ", Symbols[[i]])
}
oanda.URL <- paste0("https://www.oanda.com/fx-for-business/",
"historical-rates/api/update/?&widget=1",
"&source=OANDA&display=absolute&adjustment=0",
"&data_range=c",
"&quote_currency=", currency.pair[1],
"historical-rates/api/data/update/",
"?&source=OANDA&adjustment=0",
"&base_currency=", currency.pair[1],
"&start_date=", from,
"&end_date=", to,
"&period=daily",
"&price=mid",
"&view=table",
"&base_currency_0=", currency.pair[2])
"&quote_currency_0=", currency.pair[2])
# Fetch data (jsonlite::fromJSON will handle connection)
tbl <- jsonlite::fromJSON(oanda.URL, simplifyVector = FALSE)
Data <- tbl[[1]][[1]]$data
Expand Down

0 comments on commit 3c07421

Please sign in to comment.