Skip to content

Commit

Permalink
req nanonext 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Sep 2, 2023
1 parent f3af5bb commit 5bc19f7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ichimoku
Type: Package
Title: Visualization and Tools for Ichimoku Kinko Hyo Strategies
Version: 1.4.8
Version: 1.4.8.9000
Description: An implementation of 'Ichimoku Kinko Hyo', also commonly known as
'cloud charts'. Static and interactive visualizations with tools for
creating, backtesting and development of quantitative 'ichimoku' strategies.
Expand Down Expand Up @@ -30,7 +30,7 @@ Depends:
R (>= 3.3)
Imports:
ggplot2 (>= 3.4.0),
nanonext (>= 0.7.0),
nanonext (>= 0.10.0),
RcppSimdJson (>= 0.1.9),
shiny (>= 1.4.0),
xts,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ichimoku 1.4.8.9000 (development)

* Requires nanonext >= 0.10.0.

# ichimoku 1.4.8

#### Updates:
Expand Down
6 changes: 3 additions & 3 deletions R/oanda.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ getPrices <- function(instrument, granularity, count = NULL, from = NULL,
if (!is.null(from)) paste0("&from=", from),
if (!is.null(to)) paste0("&to=", to))
resp <- ncurl(url,
convert = TRUE,
convert = FALSE,
follow = TRUE,
headers = c(Authorization = paste0("Bearer ", apikey),
`Accept-Datetime-Format` = "UNIX",
Expand Down Expand Up @@ -1008,7 +1008,7 @@ oanda_positions <- function(instrument, time, server, apikey) {
url <- paste0("https://api-fx", switch(server, practice = "practice", live = "trade"),
".oanda.com/v3/instruments/", instrument, "/positionBook",
if (!missing(time)) paste0("?time=", unclass(as.POSIXct(time))))
resp <- ncurl(url, convert = TRUE, follow = TRUE,
resp <- ncurl(url, convert = FALSE, follow = TRUE,
headers = c(Authorization = paste0("Bearer ", apikey),
`Accept-Datetime-Format` = "UNIX", `User-Agent` = .user_agent))
resp[["status"]] == 200L ||
Expand Down Expand Up @@ -1100,7 +1100,7 @@ oanda_orders <- function(instrument, time, server, apikey) {
url <- paste0("https://api-fx", switch(server, practice = "practice", live = "trade"),
".oanda.com/v3/instruments/", instrument, "/orderBook",
if (!missing(time)) paste0("?time=", unclass(as.POSIXct(time))))
resp <- ncurl(url, convert = TRUE, follow = TRUE,
resp <- ncurl(url, convert = FALSE, follow = TRUE,
headers = c(Authorization = paste0("Bearer ", apikey),
`Accept-Datetime-Format` = "UNIX", `User-Agent` = .user_agent))
resp[["status"]] == 200L ||
Expand Down
6 changes: 3 additions & 3 deletions R/switch.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ do_ <- function() {
url <- switch(server,
practice = "https://api-fxpractice.oanda.com/v3/accounts",
live = "https://api-fxtrade.oanda.com/v3/accounts")
resp <- ncurl(url, convert = TRUE, follow = TRUE,
resp <- ncurl(url, convert = FALSE, follow = TRUE,
headers = c("Authorization" = paste0("Bearer ", apikey),
"User-Agent" = .user_agent))
parsed <- deserialize_json(resp[["data"]])
Expand All @@ -134,11 +134,11 @@ do_ <- function() {
url <- paste0("https://api-fx", switch(server, practice = "practice", live = "trade"),
".oanda.com/v3/accounts/", do_$getAccount(server = server, apikey = apikey),
"/instruments")
resp <- ncurl(url, convert = TRUE, follow = TRUE,
resp <- ncurl(url, convert = FALSE, follow = TRUE,
headers = c("Authorization" = paste0("Bearer ", apikey),
"User-Agent" = .user_agent))
if (resp[["status"]] != 200L) {
resp <- ncurl(url, convert = TRUE, follow = TRUE,
resp <- ncurl(url, convert = FALSE, follow = TRUE,
headers = c("Authorization" = paste0("Bearer ", apikey),
"User-Agent" = .user_agent))
}
Expand Down

0 comments on commit 5bc19f7

Please sign in to comment.