From df5c565b10c9909281239192e20cc24bb8d6d114 Mon Sep 17 00:00:00 2001 From: Serkan Korkmaz <77464572+serkor1@users.noreply.github.com> Date: Fri, 15 Mar 2024 06:07:28 +0100 Subject: [PATCH] CRAN Release (#8) Created release for version 1.3.0. Added playground to .gitignore. --- .gitignore | 1 + CRAN-SUBMISSION | 3 --- playground/playground.R | 42 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 38 insertions(+), 8 deletions(-) delete mode 100644 CRAN-SUBMISSION diff --git a/.gitignore b/.gitignore index 198e17e9..09bebba5 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ inst/doc /doc/ /Meta/ docs +/playground diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION deleted file mode 100644 index b46710aa..00000000 --- a/CRAN-SUBMISSION +++ /dev/null @@ -1,3 +0,0 @@ -Version: 1.3.0 -Date: 2024-03-12 13:27:45 UTC -SHA: bf44f201890e6609a885b3538cf5101026e1eb59 diff --git a/playground/playground.R b/playground/playground.R index 3116b039..be2c1301 100644 --- a/playground/playground.R +++ b/playground/playground.R @@ -9,13 +9,45 @@ # setup; rm(list = ls()); gc(); devtools::load_all() -DOGE <- cryptoQuotes::get_quote( - ticker = 'DOGEUSDTM', - interval = '1m', - source = 'kucoin', - futures = TRUE +BTC <- cryptoQuotes::get_quote( + ticker = 'BTCUSD', + interval = '1d', + source = 'kraken', + futures = FALSE, + from = Sys.Date() - 1000, + to = Sys.Date() ) +nrow(BTC) +head(BTC) +head(BTC) + + + +length( + seq( + from = coerce_date(Sys.Date() - 10), + to = coerce_date(Sys.Date() - 1), + by = "+15 mins" + ) +) + + +default_dates( + interval = "15m", + from = coerce_date(Sys.Date() - 10), + to = coerce_date(Sys.Date() - 1) +) + # script end; + + +origin_date <- '1970-01-01' + +as.POSIXct( + trunc(as.double(coerce_date(Sys.Date() - 10))/(15*60))*(15*60), + tz = 'UTC', + origin = origin_date +)