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KySHArq!vcZXmX3K>h+L81gX}mcKAp_LcDSxDT-MP
z@-pWasUt5nKyole=ZDK3{8wG`bhhu|I~VYnw@rs%x=!mLto9ZeCcW~+2mL=|JLy`N
zWtjxyFlPiv!3XEpQ@oUq`cAsb@Thnt`)-N1vu@Har7rIyd^A-vmff9)9+@kB;Z2i!
zww#&JlD20b@l}X0q4n@78OrI`UlC%4|3O0vG?`tlwnbdFq$d
zJz7ct{lSM7H!D98sBL#FGNpsL!{!4?O6u}J*MLOxAIe`34NJ(FC>#JH(+3zSZ}Zvt
zJMqqU&CznBK}~v6x`YOn5^Yix6_@19ri2oK%U#6UAlJ`*p_tbIP{q&e<7sL~&tCM7
z1>o>=SN)-$bVbUZOPp+f@0wcI`l|w;QB^N@^^FEn&i5KaxT*0<75bSY+v1UF&FGge
zPB#zaeN^|Ddh>(L$=n@3MTmf&9#|C60z{72k9~7O`qMz9T2<@SENmeC-c4>m9#%)A
zg;sJ6d>tahKOLv2myY<68Y*3={u@lcqrum~e^>;bTQ>XEw`r@n6PS8jAf+_Y^97kBseC2q51Cl+tvJpY
ly;}K@tc-|0;VH3>-7@aOKHej~-uY%&Nqd(p=ufKFe*q&P@M-`6
literal 0
HcmV?d00001
diff --git a/R/utils.R b/R/utils.R
index ef32628c..c948d611 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -204,8 +204,8 @@ endPoint <- function(
#' @param ... additional parameters passed down the endpoint
#'
#' @details
-#' This function can only be used to fetch time-based objects, and can therefore
-#' not be used to get, for example, [available_tickers()].
+#' This function can only be used to fetch time-based objects,
+#' and can therefore not be used to get, for example, [available_tickers()].
#'
#' @family development tools
#'
@@ -280,7 +280,6 @@ fetch <- function(
type = type,
futures = futures,
...
-
),
query = parameters$query,
path = parameters$path
@@ -304,7 +303,6 @@ fetch <- function(
what = c('array', 'matrix', 'data.frame')
)
-
# 2.2) extract data
# from reponse:
#
@@ -312,13 +310,17 @@ fetch <- function(
# then it is likely
# that we are dealing with
# an error, or Kraken
- response <- tryCatch(
- expr = {
- response[[which(idx)]]
+ #
+ # This could be done using do.call
+ # maybe
+ switch (source,
+ kraken = {
+ response <- do.call(
+ data.frame,
+ response
+ )
},
- error = function(error){
- as.data.frame(response)
- }
+ response <- response[[which(idx)]]
)
diff --git a/R/zzz.R b/R/zzz.R
index 8b713af1..badfd941 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -4,7 +4,6 @@
# objective:
# script start;
-# 1) on attach
.onAttach <- function(
libname,
pkgname,
@@ -17,36 +16,28 @@
xts_check_TZ = FALSE
)
- # 1) package
- # header
- rlang::inform(
- header(
- pkgname = pkgname,
- pkgversion = utils::packageVersion(
- pkgname
- )
+
+ cli::cli_inform(
+ message = pkg_header(
+ pkgname
),
...,
class = "packageStartupMessage"
)
- # 2) package information
- # to the user
- rlang::inform(
- pkg_information(),
+ cli::cli_inform(
+ message = pkg_information(),
...,
class = "packageStartupMessage"
)
-}
+}
-# 1) on detach
.onDetach <- function(
libpath,
...) {
-
# 1) reset options
# for xts suppressing
# timezone messages
@@ -55,4 +46,5 @@
)
}
+
# script end;
diff --git a/README.Rmd b/README.Rmd
index 09263f3e..dff5a4b6 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -2,36 +2,79 @@
output: github_document
always_allow_html: true
---
-
-
```{r setup, include = FALSE}
# set options
+Sys.setenv(OPENSSL_CONF="/dev/null")
+
knitr::opts_chunk$set(
collapse = FALSE,
- comment = "#>",
+ comment = "#>",
fig.path = "man/figures/README-",
- message = FALSE,
- warning = FALSE
+ message = FALSE,
+ warning = FALSE
)
```
-# cryptoQuotes: A streamlined access to OHLC-V market data and sentiment indicators in R
+# cryptoQuotes: Open access to cryptocurrency market data
-[![CRAN status](https://www.r-pkg.org/badges/version/cryptoQuotes)](https://www.cran-e.com/package/cryptoQuotes)
-[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/last-month/cryptoQuotes?color=blue)](https://www.cran-e.com/package/cryptoQuotes)
+[![CRAN status](https://www.r-pkg.org/badges/version/cryptoQuotes)](https://CRAN.R-project.org/package=cryptoQuotes)
+[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/last-month/cryptoQuotes?color=blue)](https://r-pkg.org/pkg/cryptoQuotes)
[![R-CMD-check](https://github.com/serkor1/cryptoQuotes/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/serkor1/cryptoQuotes/actions/workflows/R-CMD-check.yaml)
-[![Codecov test coverage](https://codecov.io/gh/serkor1/cryptoQuotes/branch/main/graph/badge.svg)](https://app.codecov.io/gh/serkor1/cryptoQuotes?branch=main)
-[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
+[![codecov](https://codecov.io/gh/serkor1/cryptoQuotes/graph/badge.svg?token=D7NF1BPVL5)](https://app.codecov.io/gh/serkor1/cryptoQuotes)
+[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
+![GitHub last commit (branch)](https://img.shields.io/github/last-commit/serkor1/cryptoQuotes/development)
+## :information_source: About
+
+The `cryptoQuotes`-package is a high-level API client for accessing public market data endpoints on major cryptocurrency exchanges. It supports open, high, low, close and volume (OHLC-V) data and a variety of sentiment indicators; the market data is high quality and can be retrieved in intervals ranging from *seconds* to *months*. All the market data is accessed and processed without relying on crawlers, or API keys, ensuring an open, and reliable, access for researchers, traders and students alike. There are currently `r length(invisible(cryptoQuotes::available_exchanges(type = "ohlc")))` supported cryptocurrency exchanges,
+
+
+```{r, echo=FALSE}
+## available exchanges
+invisible(
+ all_exchanges <- cryptoQuotes::available_exchanges()
+)
+
+# Convert the character vector to a single-row data frame
+exchanges_df <- data.frame(t(all_exchanges))
+
+# Set column names to be the exchange names
+colnames(exchanges_df) <- all_exchanges
+
+# Create a horizontal table
+kableExtra::kable_styling(
+ knitr::kable(
+ x = exchanges_df,
+ digits = 2,
+ col.names = NULL,
+ caption = 'Supported exchanges',
+ align = 'c',
+ table.attr = "style='width:100%;'",
+ format = 'html'
+ ),
+ full_width = TRUE,
+ position = 'center'
+)
+```
+
+
+All data is returned as [`xts`](https://github.com/joshuaulrich/xts)-objects which enables seamless interaction with with [`quantmod`](https://github.com/joshuaulrich/quantmod) and [`TTR`](https://github.com/joshuaulrich/TTR), for developing and evaluating trading strategies or general purpose cryptocurrency market analysis with a historical or temporal perspective.
+
## :information_source: Overview
-The `cryptoQuotes`-package is a high-level API-client to get current, and historical, cryptocurrency OHLC-V market and sentiment data in ```R```, without using web-crawlers or API keys. This ```R```-package uses `xts` and `zoo` under the hood and are compatible with `quantmod` and `TTR` out of the box.
+The `cryptoQuotes`-package has *two* main features; retrieving cryptocurrency market data, and charting. The market data consists of *OHLC-V* data and sentiment indicators; including, but not limited to, cryptocurrency *fear and greed index*, *long-short ratio* and *open interest*. All market data is retrieved using the family of `get_*`-functions. To get a full overview of the package and functionality please see the documentation on [pkgdown](https://serkor1.github.io/cryptoQuotes/).
+
+> **Note:** Given the nature of crypotcurrency data and general legislative restrictions, some `exchanges` may not work in your geolocation.
+
+Below is a quick overview of the package and basic usage examples on retrieving and charting Bitcoin (BTC) *OHLC-V* and *long-short ratio* in 30 minute intervals.
+
+### :information_source: Cryptocurrency market data
-### Supported exchanges and markets
+#### OHLC-V
All supported exchanges and markets are listed in the table below, alongside the available range of intervals available from the respective exchanges,
@@ -189,8 +232,8 @@ kableExtra::kable_styling(
x = data.frame(
row.names = NULL,
Exchange = exchange,
- Spot = rep(x = cli::symbol$tick,length(exchange)),
- Futures = rep(x = cli::symbol$tick,length(exchange)),
+ Spot = rep(x = ":white_check_mark:",length(exchange)),
+ Futures = rep(x = ":white_check_mark:",length(exchange)),
`Available Intervals` = c(intervals),
`Smallest Interval` = c(granularity(TRUE)),
`Biggest Interval` = c(granularity(FALSE))
@@ -203,22 +246,21 @@ kableExtra::kable_styling(
```
-### :information_source: Basic Usage
+
+Example: Bitcoin OHLC-V
-#### OHLC-V Market Data
-
-Get USDT denominated Bitcoin spot market price from Binance with `30m`-intervals using the `get_quote()`-function,
+Get USDT denominated Bitcoin (BTC) on the spot market from Binance in `30m`-intervals using the `get_quote()`-function,
```{r cryptocurrency market data in R, eval=TRUE}
## BTC OHLC prices
## from Binance spot market
## in 30 minute intervals
BTC <- cryptoQuotes::get_quote(
- ticker = 'BTCUSDT',
- source = 'binance',
- futures = FALSE,
+ ticker = 'BTCUSDT',
+ source = 'binance',
+ futures = FALSE,
interval = '30m',
- from = Sys.Date() - 1
+ from = Sys.Date() - 1
)
```
@@ -226,12 +268,12 @@ BTC <- cryptoQuotes::get_quote(
```{r print table, echo=FALSE, fig.alt="cryptocurrency prices in R"}
kableExtra::kable_styling(
knitr::kable(
- caption = 'Bitcoin (BTC) OHLC-prices',
+ caption = 'Bitcoin (BTC) OHLC-V data',
align = 'lcccc',
table.attr = "style='width:100%;'",
x = data.frame(
cbind(
- Index = paste(tail(zoo::index(BTC))),
+ index = paste(tail(zoo::index(BTC))),
tail(zoo::coredata(BTC))
),row.names = NULL
),
@@ -242,12 +284,112 @@ kableExtra::kable_styling(
)
```
+__________
+
-#### Charting OHLC-V
+#### Sentiment indicators
-The `BTC`-object can be charted using the `chart()`-function,
+The sentiment indicators available in the `cryptoQuotes`-package can be divided in two; *derived indicators* and *market indicators*. The former is calculated based on, for example, the price actions such as the *Moving Average Convergence Divergence* (MACD) indicator. The latter are public indicators such as the *long-short ratio* or *fear and greed index*; these are retrieved using the family of `get_*`-functions, while the derived indicators can be created using, for example, [`TTR`](https://github.com/joshuaulrich/TTR).
-```{r chartquote, fig.align='center',fig.dpi=180, fig.alt="cryptocurrency charts in R"}
+In this overview we are focusing on *market indicators* made public by the cryptocurrency exchanges. For a full overview of sentiment indicators please refer to the documentation on [pkgdown](https://serkor1.github.io/cryptoQuotes/). All supported *market indicators* by exchange are listed in the table below,
+
+
+```{r, echo = FALSE}
+## 1) list all available
+## exchanges and the links
+available_endpoint <- data.frame(
+ Endpoint = c(
+ "Long-Short Ratio",
+ "Open Interest",
+ "Funding Rate"
+ ),
+ Binance = c(
+ ":white_check_mark:",
+ ":white_check_mark:",
+ ":white_check_mark:"
+ ),
+ Bitmart = c(
+ ":x:",
+ ":x:",
+ ":x:"
+ ),
+ Bybit = c(
+ ":white_check_mark:",
+ ":white_check_mark:",
+ ":white_check_mark:"
+ ),
+ Kraken = c(
+ ":white_check_mark:",
+ ":white_check_mark:",
+ ":x:"
+ ),
+ Kucoin = c(
+ ":x:",
+ ":x:",
+ ":white_check_mark:"
+ )
+)
+
+## 4) present table
+## for as is
+kableExtra::kable_styling(
+ knitr::kable(
+ digits = 0,
+ caption = 'Available sentiment indicators by exchange',
+ align = 'lccccc',
+ table.attr = "style='width:100%;'",
+ x = available_endpoint,
+ format = 'markdown'
+ ),
+ full_width = TRUE,
+ position = 'center'
+)
+```
+
+
+
+Example: Bitcoin Long-Short Ratio
+
+Get the *long-short ratio* on Bitcoin (BTC) using the `get_lsratio()`-function,
+
+```{r cryptocurrency sentiment indicators in R, eval=TRUE}
+## BTC OHLC prices
+## from Binance spot market
+## in 30 minute intervals
+BTC_LS <- cryptoQuotes::get_lsratio(
+ ticker = 'BTCUSDT',
+ source = 'binance',
+ interval = '30m',
+ from = Sys.Date() - 1
+)
+```
+
+
+```{r print LS table, echo=FALSE, fig.alt="cryptocurrency prices in R"}
+kableExtra::kable_styling(
+ knitr::kable(
+ caption = 'Long-Short Ratio on Bitcoin (BTC)',
+ align = 'lccc',
+ table.attr = "style='width:100%;'",
+ x = data.frame(
+ cbind(
+ index = paste(tail(zoo::index(BTC_LS))),
+ tail(zoo::coredata(round(BTC_LS,3)))
+ ),row.names = NULL
+ ),
+ format = 'html'
+ ),
+ full_width = TRUE,
+ position = 'center'
+)
+```
+
+__________
+
+
+### :information_source: Charting
+
+```{r, echo=FALSE, include=FALSE}
## Chart BTC
## using klines, SMA,
## MACD and Bollinger Bands
@@ -255,8 +397,8 @@ cryptoQuotes::chart(
ticker = BTC,
main = cryptoQuotes::kline(),
sub = list(
- cryptoQuotes::volume(),
- cryptoQuotes::macd()
+ cryptoQuotes::lsr(ratio = BTC_LS),
+ cryptoQuotes::volume()
),
indicator = list(
cryptoQuotes::sma(n = 7),
@@ -267,30 +409,85 @@ cryptoQuotes::chart(
)
```
+Charting in the `cryptoQuotes`-package is built on [`plotly`](https://github.com/plotly/plotly.R) for interactivity. It supports *light* and *dark* themes, and accounts for *color-deficiency* via the `options`-argument in the `chart()`-function.
+
+#### Charting with indicators
+
+The OHLC-V data and the sentiment indicator can be charted using the `chart()`-function,
+
+```{r chartquote, fig.align='center',fig.dpi=180, fig.alt="cryptocurrency charts in R"}
+## Chart BTC
+## using klines, SMA
+## Bollinger Bands and
+## long-short ratio
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = cryptoQuotes::kline(),
+ sub = list(
+ cryptoQuotes::lsr(ratio = BTC_LS),
+ cryptoQuotes::volume()
+ ),
+ indicator = list(
+ cryptoQuotes::sma(n = 7),
+ cryptoQuotes::sma(n = 14),
+ cryptoQuotes::sma(n = 21),
+ cryptoQuotes::bollinger_bands()
+ )
+)
+```
+
+
+
+Colorblind friendly version
+#### Charting with indicators (colorblind friendly)
+
+```{r chartquote(deficiency), fig.align='center', fig.dpi=180, fig.alt="cryptocurrency charts in R"}
+## Chart BTC
+## using klines, SMA
+## Bollinger Bands and
+## ling-short ratio with color-deficiency
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = cryptoQuotes::kline(),
+ sub = list(
+ cryptoQuotes::lsr(ratio = BTC_LS),
+ cryptoQuotes::volume()
+ ),
+ indicator = list(
+ cryptoQuotes::sma(n = 7),
+ cryptoQuotes::sma(n = 14),
+ cryptoQuotes::sma(n = 21),
+ cryptoQuotes::bollinger_bands()
+ ),
+ options = list(
+ deficiency = TRUE
+ )
+)
+```
+
+__________
+
+
## :information_source: Installation
-### Stable version
+### :shield: Stable version
```{r stable version guide, eval = FALSE}
-# install from CRAN
+## install from CRAN
install.packages(
pkgs = 'cryptoQuotes',
dependencies = TRUE
)
```
-### Development version
+### :hammer_and_wrench: Development version
```{r development version guide, eval = FALSE}
-# install from github
+## install from github
devtools::install_github(
repo = 'https://github.com/serkor1/cryptoQuotes/',
ref = 'development'
)
```
-## :warning: Disclaimer
-
-This `library` is still considered `experimental` but no breaking changes will be made on functions labelled as `stable` without appropriate action; please refer to the [release notes](NEWS.md), or submit an [issue](https://github.com/serkor1/cryptoQuotes/issues) if that promise is broken.
-
## :information_source: Code of Conduct
Please note that the `cryptoQuotes` project is released with a [Contributor Code of Conduct](https://serkor1.github.io/cryptoQuotes/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
diff --git a/README.md b/README.md
index 48293dbe..9ab287fd 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,93 @@
-# cryptoQuotes: A streamlined access to OHLC-V market data and sentiment indicators in R
+# cryptoQuotes: Open access to cryptocurrency market data
[![CRAN
-status](https://www.r-pkg.org/badges/version/cryptoQuotes)](https://www.cran-e.com/package/cryptoQuotes)
+status](https://www.r-pkg.org/badges/version/cryptoQuotes)](https://CRAN.R-project.org/package=cryptoQuotes)
[![CRAN RStudio mirror
-downloads](https://cranlogs.r-pkg.org/badges/last-month/cryptoQuotes?color=blue)](https://www.cran-e.com/package/cryptoQuotes)
+downloads](https://cranlogs.r-pkg.org/badges/last-month/cryptoQuotes?color=blue)](https://r-pkg.org/pkg/cryptoQuotes)
[![R-CMD-check](https://github.com/serkor1/cryptoQuotes/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/serkor1/cryptoQuotes/actions/workflows/R-CMD-check.yaml)
-[![Codecov test
-coverage](https://codecov.io/gh/serkor1/cryptoQuotes/branch/main/graph/badge.svg)](https://app.codecov.io/gh/serkor1/cryptoQuotes?branch=main)
+[![codecov](https://codecov.io/gh/serkor1/cryptoQuotes/graph/badge.svg?token=D7NF1BPVL5)](https://app.codecov.io/gh/serkor1/cryptoQuotes)
[![Lifecycle:
-experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
+stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
+![GitHub last commit
+(branch)](https://img.shields.io/github/last-commit/serkor1/cryptoQuotes/development)
+## :information_source: About
+
+The `cryptoQuotes`-package is a high-level API client for accessing
+public market data endpoints on major cryptocurrency exchanges. It
+supports open, high, low, close and volume (OHLC-V) data and a variety
+of sentiment indicators; the market data is high quality and can be
+retrieved in intervals ranging from *seconds* to *months*. All the
+market data is accessed and processed without relying on crawlers, or
+API keys, ensuring an open, and reliable, access for researchers,
+traders and students alike. There are currently 5 supported
+cryptocurrency exchanges,
+
+
+
+
+
+Supported exchanges
+
+
+
+
+binance
+ |
+
+bitmart
+ |
+
+bybit
+ |
+
+kraken
+ |
+
+kucoin
+ |
+
+
+
+
+
+
+All data is returned as
+[`xts`](https://github.com/joshuaulrich/xts)-objects which enables
+seamless interaction with with
+[`quantmod`](https://github.com/joshuaulrich/quantmod) and
+[`TTR`](https://github.com/joshuaulrich/TTR), for developing and
+evaluating trading strategies or general purpose cryptocurrency market
+analysis with a historical or temporal perspective.
+
## :information_source: Overview
-The `cryptoQuotes`-package is a high-level API-client to get current,
-and historical, cryptocurrency OHLC-V market and sentiment data in `R`,
-without using web-crawlers or API keys. This `R`-package uses `xts` and
-`zoo` under the hood and are compatible with `quantmod` and `TTR` out of
-the box.
+The `cryptoQuotes`-package has *two* main features; retrieving
+cryptocurrency market data, and charting. The market data consists of
+*OHLC-V* data and sentiment indicators; including, but not limited to,
+cryptocurrency *fear and greed index*, *long-short ratio* and *open
+interest*. All market data is retrieved using the family of
+`get_*`-functions. To get a full overview of the package and
+functionality please see the documentation on
+[pkgdown](https://serkor1.github.io/cryptoQuotes/).
+
+> **Note:** Given the nature of crypotcurrency data and general
+> legislative restrictions, some `exchanges` may not work in your
+> geolocation.
-### Supported exchanges and markets
+Below is a quick overview of the package and basic usage examples on
+retrieving and charting Bitcoin (BTC) *OHLC-V* and *long-short ratio* in
+30 minute intervals.
+
+### :information_source: Cryptocurrency market data
+
+#### OHLC-V
All supported exchanges and markets are listed in the table below,
alongside the available range of intervals available from the respective
@@ -32,7 +95,7 @@ exchanges,
-
+
Supported exchanges, markets and intervals.
@@ -64,10 +127,10 @@ Biggest Interval
Binance
-âś”
+:white_check_mark:
|
-âś”
+:white_check_mark:
|
16
@@ -84,10 +147,10 @@ Binance
Bitmart
|
-âś”
+:white_check_mark:
|
-âś”
+:white_check_mark:
|
13
@@ -104,10 +167,10 @@ Bitmart
Bybit
|
-âś”
+:white_check_mark:
|
-âś”
+:white_check_mark:
|
13
@@ -124,10 +187,10 @@ Bybit
Kraken
|
-âś”
+:white_check_mark:
|
-âś”
+:white_check_mark:
|
10
@@ -144,10 +207,10 @@ Kraken
Kucoin
|
-âś”
+:white_check_mark:
|
-âś”
+:white_check_mark:
|
13
@@ -164,11 +227,12 @@ Kucoin
-### :information_source: Basic Usage
-
-#### OHLC-V Market Data
+
+
+Example: Bitcoin OHLC-V
+
-Get USDT denominated Bitcoin spot market price from Binance with
+Get USDT denominated Bitcoin (BTC) on the spot market from Binance in
`30m`-intervals using the `get_quote()`-function,
``` r
@@ -176,24 +240,24 @@ Get USDT denominated Bitcoin spot market price from Binance with
## from Binance spot market
## in 30 minute intervals
BTC <- cryptoQuotes::get_quote(
- ticker = 'BTCUSDT',
- source = 'binance',
- futures = FALSE,
+ ticker = 'BTCUSDT',
+ source = 'binance',
+ futures = FALSE,
interval = '30m',
- from = Sys.Date() - 1
+ from = Sys.Date() - 1
)
```
-
+
-Bitcoin (BTC) OHLC-prices
+Bitcoin (BTC) OHLC-V data
-Index
+index
|
open
@@ -215,122 +279,237 @@ volume
|
-2024-03-12 10:30:00
+2024-05-31 18:00:00
|
-71978.46
+67215.58
|
-72085.06
+67352.41
|
-71850.01
+66670
|
-71936
+67000.01
|
-818.1898
+2093.77494
|
-2024-03-12 11:00:00
+2024-05-31 18:30:00
|
-71936
+67000.01
|
-71959.12
+67221.53
|
-71647.14
+66876.8
|
-71705.63
+67200.01
|
-587.18566
+788.25693
|
-2024-03-12 11:30:00
+2024-05-31 19:00:00
|
-71705.63
+67200.01
|
-71999
+67459.66
|
-71705.62
+67160.3
|
-71864
+67417.98
|
-642.93822
+598.68095
|
-2024-03-12 12:00:00
+2024-05-31 19:30:00
|
-71864
+67417.98
|
-72376
+67455.93
|
-71860
+67287.97
|
-72062.98
+67342.77
|
-1368.19948
+287.26257
|
-2024-03-12 12:30:00
+2024-05-31 20:00:00
|
-72062.99
+67342.77
|
-72257.56
+67444.47
|
-72012.72
+67288.2
|
-72023.82
+67305.5
|
-673.04693
+383.04002
+ |
+
+
+
+2024-05-31 20:30:00
+ |
+
+67305.5
+ |
+
+67427.68
+ |
+
+67170
+ |
+
+67400
+ |
+
+468.98276
+ |
+
+
+
+
+
+
+------------------------------------------------------------------------
+
+
+
+#### Sentiment indicators
+
+The sentiment indicators available in the `cryptoQuotes`-package can be
+divided in two; *derived indicators* and *market indicators*. The former
+is calculated based on, for example, the price actions such as the
+*Moving Average Convergence Divergence* (MACD) indicator. The latter are
+public indicators such as the *long-short ratio* or *fear and greed
+index*; these are retrieved using the family of `get_*`-functions, while
+the derived indicators can be created using, for example,
+[`TTR`](https://github.com/joshuaulrich/TTR).
+
+In this overview we are focusing on *market indicators* made public by
+the cryptocurrency exchanges. For a full overview of sentiment
+indicators please refer to the documentation on
+[pkgdown](https://serkor1.github.io/cryptoQuotes/). All supported
+*market indicators* by exchange are listed in the table below,
+
+
+
+
+
+Available sentiment indicators by exchange
+
+
+
+
+Endpoint
+ |
+
+Binance
+ |
+
+Bitmart
+ |
+
+Bybit
+ |
+
+Kraken
+ |
+
+Kucoin
+ |
+
+
+
+
+
+Long-Short Ratio
+ |
+
+:white_check_mark:
+ |
+
+:x:
+ |
+
+:white_check_mark:
+ |
+
+:white_check_mark:
+ |
+
+:x:
|
-2024-03-12 13:00:00
+Open Interest
|
-72023.82
+:white_check_mark:
|
-72144.14
+:x:
|
-71576
+:white_check_mark:
|
-71628.53
+:white_check_mark:
|
+
+:x:
+ |
+
+
-1283.8762
+Funding Rate
+ |
+
+:white_check_mark:
+ |
+
+:x:
+ |
+
+:white_check_mark:
+ |
+
+:x:
+ |
+
+:white_check_mark:
|
@@ -338,20 +517,165 @@ volume
-#### Charting OHLC-V
+
+
+Example: Bitcoin Long-Short Ratio
+
-The `BTC`-object can be charted using the `chart()`-function,
+Get the *long-short ratio* on Bitcoin (BTC) using the
+`get_lsratio()`-function,
+
+``` r
+## BTC OHLC prices
+## from Binance spot market
+## in 30 minute intervals
+BTC_LS <- cryptoQuotes::get_lsratio(
+ ticker = 'BTCUSDT',
+ source = 'binance',
+ interval = '30m',
+ from = Sys.Date() - 1
+)
+```
+
+
+
+
+
+Long-Short Ratio on Bitcoin (BTC)
+
+
+
+
+index
+ |
+
+long
+ |
+
+short
+ |
+
+ls_ratio
+ |
+
+
+
+
+
+2024-05-31 18:00:00
+ |
+
+0.679
+ |
+
+0.321
+ |
+
+2.114
+ |
+
+
+
+2024-05-31 18:30:00
+ |
+
+0.687
+ |
+
+0.313
+ |
+
+2.199
+ |
+
+
+
+2024-05-31 19:00:00
+ |
+
+0.696
+ |
+
+0.304
+ |
+
+2.289
+ |
+
+
+
+2024-05-31 19:30:00
+ |
+
+0.699
+ |
+
+0.301
+ |
+
+2.323
+ |
+
+
+
+2024-05-31 20:00:00
+ |
+
+0.696
+ |
+
+0.304
+ |
+
+2.288
+ |
+
+
+
+2024-05-31 20:30:00
+ |
+
+0.696
+ |
+
+0.304
+ |
+
+2.293
+ |
+
+
+
+
+
+
+------------------------------------------------------------------------
+
+
+
+### :information_source: Charting
+
+Charting in the `cryptoQuotes`-package is built on
+[`plotly`](https://github.com/plotly/plotly.R) for interactivity. It
+supports *light* and *dark* themes, and accounts for *color-deficiency*
+via the `options`-argument in the `chart()`-function.
+
+#### Charting with indicators
+
+The OHLC-V data and the sentiment indicator can be charted using the
+`chart()`-function,
``` r
## Chart BTC
-## using klines, SMA,
-## MACD and Bollinger Bands
+## using klines, SMA
+## Bollinger Bands and
+## long-short ratio
cryptoQuotes::chart(
ticker = BTC,
main = cryptoQuotes::kline(),
sub = list(
- cryptoQuotes::volume(),
- cryptoQuotes::macd()
+ cryptoQuotes::lsr(ratio = BTC_LS),
+ cryptoQuotes::volume()
),
indicator = list(
cryptoQuotes::sma(n = 7),
@@ -364,36 +688,65 @@ cryptoQuotes::chart(
+
+
+Colorblind friendly version
+
+
+#### Charting with indicators (colorblind friendly)
+
+``` r
+## Chart BTC
+## using klines, SMA
+## Bollinger Bands and
+## ling-short ratio with color-deficiency
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = cryptoQuotes::kline(),
+ sub = list(
+ cryptoQuotes::lsr(ratio = BTC_LS),
+ cryptoQuotes::volume()
+ ),
+ indicator = list(
+ cryptoQuotes::sma(n = 7),
+ cryptoQuotes::sma(n = 14),
+ cryptoQuotes::sma(n = 21),
+ cryptoQuotes::bollinger_bands()
+ ),
+ options = list(
+ deficiency = TRUE
+ )
+)
+```
+
+
+
+------------------------------------------------------------------------
+
+
+
## :information_source: Installation
-### Stable version
+### :shield: Stable version
``` r
-# install from CRAN
+## install from CRAN
install.packages(
pkgs = 'cryptoQuotes',
dependencies = TRUE
)
```
-### Development version
+### :hammer_and_wrench: Development version
``` r
-# install from github
+## install from github
devtools::install_github(
repo = 'https://github.com/serkor1/cryptoQuotes/',
ref = 'development'
)
```
-## :warning: Disclaimer
-
-This `library` is still considered `experimental` but no breaking
-changes will be made on functions labelled as `stable` without
-appropriate action; please refer to the [release notes](NEWS.md), or
-submit an [issue](https://github.com/serkor1/cryptoQuotes/issues) if
-that promise is broken.
-
## :information_source: Code of Conduct
Please note that the `cryptoQuotes` project is released with a
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 96c27a1e..6fc6aeaf 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -4,43 +4,87 @@ home:
title: Cryptocurrency with R
# description for google
- description: A high-level API client to fetch historical cryptocurrency OHLC-V market data, and sentiment indicators, in R.
+ description: >
+ An open and unified access to cryptocurrency market data in R.
navbar:
type: inverse
+ structure:
+ left: [intro, usecase, custom-indicators, reference, articles, news]
+ right: [github]
+
+ components:
+ usecase:
+ text: Usecase
+ href: articles/usecase.html
+ custom-indicators:
+ text: Custom Indicators
+ href: articles/custom_indicators.html
+ articles:
+ text: Articles
+ menu:
+ - text: Cryptocurrency Market Data
+ href: articles/01-article.html
+ - text: Cryptocurrency Charts
+ href: articles/02-article.html
+ - text: Time Zones
+ href: articles/03-article.html
+ - text: Converting xts-objects
+ href: articles/04-article.html
+ - text: cryptoQuotes x quantmod and TTR
+ href: articles/05-article.html
+
url: https://serkor1.github.io/cryptoQuotes/
+
template:
bootstrap: 5
bootswatch: flatly
reference:
-- title: Cryptocurrency sentiment and price data
- desc: Functions that return cryptocurrency market data
-- contents: has_concept('get-function')
-- title: Supported calls
- desc: All available API parameters
+- title: Cryptocurrency Market Data
+ desc: >
+ The collection of functions to retrieve OHLC-V and sentiment data.
+- contents: has_concept('get-functions')
+
+- title: Supported Calls
+ desc: >
+ The collection of functions to list available argument values in the
+ `interval`-, `source`- and `interval`-arguments.
- contents: has_concept('supported calls')
-- title: Main charts
- desc: The main charts
-- contents: has_concept(c('charting','price charts'))
-- title: Subcharts
- desc: The family of chart suited for subcharts
-- contents:
- - has_concept('subcharts')
-- title: Charting indicators
- desc: Adding indicators to charts
-- contents:
- - has_concept('chart indicators')
- - -has_concept('price charts')
- - -has_concept('subcharts')
-- title: Convinience functions
+
+- title: Charting
+ desc: >
+ The collection of `chart`-functions are split 3; main charts (price chart), main chart
+ indicators and subchart indicators. All `charts` are initialised using the `chart`-function.
+ contents:
+ - chart
+
+- subtitle: Main Charts
+ desc: >
+ The collection of main chart functions for charting prices.
+ contents:
+ - kline
+ - ohlc
+ - pline
+
+- subtitle: Main Chart Indicators
+ desc: >
+ The collection of main chart indicators which are overlaid the main chart.
+ contents:
+ - has_concept('main chart indicators')
+
+- subtitle: Subchart Indicators
+ desc: >
+ The collection of subchart indicators which are charted as a subchart.
+ contents:
+ - has_concept('subchart indicators')
+
+- title: Utilities
desc: Manipulate and calibrate objects
-- contents: has_concept('convinience')
+- contents: has_concept('utility')
+
- title: Datasets
desc: Sample datasets returned by ```get_quote()``` and ```get_fgindex()```
-- contents: has_concept('data')
-- title: Decprecated functions
- desc: These functions has been deprecated since version 1.3.0, and will be permanently deleted in the subsequent versions
-- contents: has_concept('deprecated')
-
+- contents:
+ - has_keyword('datasets')
diff --git a/codemeta.json b/codemeta.json
new file mode 100644
index 00000000..2e5c5836
--- /dev/null
+++ b/codemeta.json
@@ -0,0 +1,266 @@
+{
+ "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
+ "@type": "SoftwareSourceCode",
+ "identifier": "cryptoQuotes",
+ "description": " This high-level API client offers a streamlined access to public cryptocurrency market data and sentiment indicators. It features OHLC-V (Open, High, Low, Close, Volume) that comes with granularity ranging from seconds to months and essential sentiment indicators to develop and backtest trading strategies, or conduct detailed market analysis. By interacting directly with the major cryptocurrency exchanges this package ensures a reliable, and stable, flow of market information, eliminating the need for complex, low-level API interactions or webcrawlers.",
+ "name": "cryptoQuotes: A Streamlined Access to Cryptocurrency OHLC-V Market Data and Sentiment Indicators",
+ "relatedLink": ["https://serkor1.github.io/cryptoQuotes/", "https://CRAN.R-project.org/package=cryptoQuotes"],
+ "codeRepository": "https://github.com/serkor1/cryptoQuotes",
+ "issueTracker": "https://github.com/serkor1/cryptoQuotes/issues",
+ "license": "https://spdx.org/licenses/GPL-2.0",
+ "version": "1.3.1",
+ "programmingLanguage": {
+ "@type": "ComputerLanguage",
+ "name": "R",
+ "url": "https://r-project.org"
+ },
+ "runtimePlatform": "R version 4.4.0 (2024-04-24)",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "author": [
+ {
+ "@type": "Person",
+ "givenName": "Serkan",
+ "familyName": "Korkmaz",
+ "email": "serkor1@duck.com",
+ "@id": "https://orcid.org/0000-0002-5052-0982"
+ }
+ ],
+ "contributor": [
+ {
+ "@type": "Person",
+ "givenName": "Serkan",
+ "familyName": "Korkmaz",
+ "email": "serkor1@duck.com",
+ "@id": "https://orcid.org/0000-0002-5052-0982"
+ },
+ {
+ "@type": "Person",
+ "givenName": "Jonas",
+ "familyName": "Cuzulan Hirani",
+ "email": "jjh@vive.dk",
+ "@id": "https://orcid.org/0000-0002-9512-1993"
+ }
+ ],
+ "copyrightHolder": [
+ {
+ "@type": "Person",
+ "givenName": "Serkan",
+ "familyName": "Korkmaz",
+ "email": "serkor1@duck.com",
+ "@id": "https://orcid.org/0000-0002-5052-0982"
+ }
+ ],
+ "maintainer": [
+ {
+ "@type": "Person",
+ "givenName": "Serkan",
+ "familyName": "Korkmaz",
+ "email": "serkor1@duck.com",
+ "@id": "https://orcid.org/0000-0002-5052-0982"
+ }
+ ],
+ "softwareSuggestions": [
+ {
+ "@type": "SoftwareApplication",
+ "identifier": "data.table",
+ "name": "data.table",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=data.table"
+ },
+ {
+ "@type": "SoftwareApplication",
+ "identifier": "knitr",
+ "name": "knitr",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=knitr"
+ },
+ {
+ "@type": "SoftwareApplication",
+ "identifier": "quantmod",
+ "name": "quantmod",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=quantmod"
+ },
+ {
+ "@type": "SoftwareApplication",
+ "identifier": "rmarkdown",
+ "name": "rmarkdown",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
+ },
+ {
+ "@type": "SoftwareApplication",
+ "identifier": "testthat",
+ "name": "testthat",
+ "version": ">= 3.0.0",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=testthat"
+ },
+ {
+ "@type": "SoftwareApplication",
+ "identifier": "tidyverse",
+ "name": "tidyverse",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=tidyverse"
+ }
+ ],
+ "softwareRequirements": {
+ "1": {
+ "@type": "SoftwareApplication",
+ "identifier": "cli",
+ "name": "cli",
+ "version": ">= 3.6.2",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=cli"
+ },
+ "2": {
+ "@type": "SoftwareApplication",
+ "identifier": "curl",
+ "name": "curl",
+ "version": ">= 5.2.1",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=curl"
+ },
+ "3": {
+ "@type": "SoftwareApplication",
+ "identifier": "jsonlite",
+ "name": "jsonlite",
+ "version": ">= 1.8.8",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=jsonlite"
+ },
+ "4": {
+ "@type": "SoftwareApplication",
+ "identifier": "lifecycle",
+ "name": "lifecycle",
+ "version": ">= 1.0.4",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=lifecycle"
+ },
+ "5": {
+ "@type": "SoftwareApplication",
+ "identifier": "plotly",
+ "name": "plotly",
+ "version": ">= 4.10.4",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=plotly"
+ },
+ "6": {
+ "@type": "SoftwareApplication",
+ "identifier": "TTR",
+ "name": "TTR",
+ "version": ">= 0.24.4",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=TTR"
+ },
+ "7": {
+ "@type": "SoftwareApplication",
+ "identifier": "utils",
+ "name": "utils"
+ },
+ "8": {
+ "@type": "SoftwareApplication",
+ "identifier": "xts",
+ "name": "xts",
+ "version": ">= 0.13.2",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=xts"
+ },
+ "9": {
+ "@type": "SoftwareApplication",
+ "identifier": "zoo",
+ "name": "zoo",
+ "version": ">= 1.8-12",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=zoo"
+ },
+ "10": {
+ "@type": "SoftwareApplication",
+ "identifier": "R",
+ "name": "R",
+ "version": ">= 4.0.0"
+ },
+ "SystemRequirements": null
+ },
+ "fileSize": "808.095KB",
+ "releaseNotes": "https://github.com/serkor1/cryptoQuotes/blob/master/NEWS.md",
+ "readme": "https://github.com/serkor1/cryptoQuotes/blob/main/README.md",
+ "contIntegration": ["https://github.com/serkor1/cryptoQuotes/actions/workflows/R-CMD-check.yaml", "https://codecov.io/gh/serkor1/cryptoQuotes"],
+ "developmentStatus": "https://lifecycle.r-lib.org/articles/stages.html#experimental",
+ "keywords": ["cryptocurrencies", "cryptocurrency", "cryptocurrency-exchanges", "r", "binance", "binance-api", "kucoin", "kucoin-api", "kraken-api", "kraken-exchange-api", "bitmart", "bybit", "bybit-api", "rstats", "rstats-package"]
+}
diff --git a/cran-comments.md b/cran-comments.md
index 42ef5b0f..85b962e4 100644
--- a/cran-comments.md
+++ b/cran-comments.md
@@ -2,22 +2,10 @@
0 errors âś” | 0 warnings âś” | 1 note âś–
-### The note
-
-```
- The Title field should be in title case. Current version is:
- 'A Streamlined Access to Cryptocurrency OHLC-V Market Data and Sentiment Indicators'
- In title case that is:
- 'A Streamlined Access to Cryptocurrency OHLC-v Market Data and Sentiment Indicators'
-```
-
-This `note` is related to `OHLC-V`, and since `OHLC-V` is an accepted shorthand for Open, High, Low, Close and Volume I believe this `note` should
-be ignored.
-
-## Resubmission
-
-This is a resubmission. In this version I have updated many elements in the library, but
-most importantly the unittests are being conducted in a manner that is robust to timing
-errors.
-
-
+❯ checking installed package size ... NOTE
+ installed size is 13.1Mb
+ sub-directories of 1Mb or more:
+ doc 11.9Mb
+
+This is beyond my technical knowledge, but here is a related SO-post:
+https://stackoverflow.com/questions/38639266/r-cmd-check-unusual-checking-installed-package-size-note
diff --git a/data-raw/ATOM.R b/data-raw/ATOM.R
index 2afd7088..57e60323 100644
--- a/data-raw/ATOM.R
+++ b/data-raw/ATOM.R
@@ -1,11 +1,10 @@
## code to prepare `ATOM` dataset goes here
-
# 1) generate ATOM
# with 15 minute candles
ATOM <- cryptoQuotes::get_quote(
ticker = "ATOMUSDT",
- source = "binance",
+ source = "bybit",
futures = FALSE,
interval = "15m",
from = "2023-12-30",
diff --git a/data-raw/BTC.R b/data-raw/BTC.R
index 4ee652e9..281f912b 100644
--- a/data-raw/BTC.R
+++ b/data-raw/BTC.R
@@ -4,7 +4,7 @@
# with weekly candles
BTC <- cryptoQuotes::get_quote(
ticker = "BTCUSDT",
- source = "binance",
+ source = "bybit",
futures = FALSE,
interval = "1w",
from = "2023-01-01",
diff --git a/data-raw/DOGE.R b/data-raw/DOGE.R
index 54ba82fa..b5c8098c 100644
--- a/data-raw/DOGE.R
+++ b/data-raw/DOGE.R
@@ -7,6 +7,7 @@
# He tweeted at 06:18 UTC on January 14, 2022
DOGE <- get_quote(
ticker = "DOGEUSDT",
+ source = "bybit",
interval = "1m",
from = as.POSIXct("2022-01-14 06:00:00", tz = "UTC"),
to = as.POSIXct("2022-01-14 07:00:00", tz = "UTC")
diff --git a/data-raw/control_data.R b/data-raw/control_data.R
new file mode 100644
index 00000000..87069d5f
--- /dev/null
+++ b/data-raw/control_data.R
@@ -0,0 +1,70 @@
+# script: control_data
+# author: Serkan Korkmaz, serkor1@duck.com
+# date: 2024-05-17
+# objective: The control data is an internal dataset
+# for all get_*-functions in daily format to conduct
+# thorough testing of charting functions and avoid
+# unnecessary bugs
+#
+# NOTE: Run this function before each PUSH to development
+# to incorporate changes to packages
+# script start;
+
+# 1) define functions
+# for naming datasets
+funs <- c(
+ "quote",
+ "fgindex",
+ "lsratio",
+ "openinterest",
+ "fundingrate"
+)
+
+# 2) run functions
+# accordingly
+control_data <- lapply(
+ X = funs,
+ FUN = function(FUN) {
+
+ # 2.1) extract function
+ # and store as foo
+ foo <- get(
+ paste0("get_", FUN),
+ envir = asNamespace('cryptoQuotes')
+ )
+
+ if (!(FUN == "fgindex")) {
+
+ foo(
+ ticker = "BTCUSDT",
+ source = "binance",
+ from = Sys.Date() - 100
+ )
+
+
+ } else {
+
+ foo(
+ from = Sys.Date() - 100
+ )
+
+ }
+
+
+ }
+)
+
+# 3) set names
+# of datasets
+names(control_data) <- funs
+
+# write data;
+usethis::use_data(
+ control_data,
+ overwrite = TRUE,
+ internal = TRUE
+)
+
+# script end;
+
+
diff --git a/data/ATOM.rda b/data/ATOM.rda
index 9f8762ccc7d17671f42471c99eb26828ca3f5688..e5bfe11a1e540af0cc07eb6a2dec5132198230bf 100644
GIT binary patch
literal 3161
zcmV-f45sr!T4*^jL0KkKSr$iOI{*axfB*mg|NsC0|NsC0{r~^}|NsC0|NsC0|NsC0
z|NsC0|Nr0#8$Lc>`I@hNUD!U~Zu@t)x6td*(B;=yR5V3X%~RCTpaVbyMt}y?&;S9Z
zfB*n`ni^;tXah!o8fXEa27m@b5unp*Vraw~F%3OH8XlUO8&mS5)HKiyN>jx&$i&cT
zqf8S`Gz>;OoIV5Fwg))CMKCNs2LAaN2t>T0AU&pJxqtG
zgvo#=6KI++)Kf{6^o^9$X`*>gM99-mD0)VoQG$AEG&ZKv28Nk5(U8MYp{9m_(V^-Z
z8&GMcgG`zL#Lx{541mz}Gz~InHl~_-gFw&*fuJ;k5(F6l0B8n*p{J>lri}m^20#Nt
zN2mZAGy$L*W{5Nm8UQpJX`?^@dWL{B#0>z@(9wzJsi0|~$xRfVglGnU02%;j0NR=W
z8VrG;Xc_}RXfy*uKmgIB5CcFOXk=&_4F*8<8fXB}226u$8foec0!avjQ!)_ArkNg~
z13~39V2@KH(hUPZ14hXj21Z68XlawsCZ3Z(2AT(^qiQ`MWMn-->KjBddSx`o1_B~+GUs^CcnGRcPRYU?M{Dq?pqY5$6y^2!2M9o1p#vLdK&ThZzSQmhD8(z)sSdc0tt?+%ejC;-6)1sO|pvhHh0lr2mjp!@A4-ar!S6J6g4GRdmoZ6SQ@`QPM
zbS++#kMrsEA(&B?8=J(Pb{gc4gus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m9pp_P
zZ1YQRck=Wuu3+5u>OfRg*{!3DG&Ksix>GStjT_1yK5C)=w5^ETjhU+JYn7R|ynG`c
zA$+D9y`8j*iw8&6r*Y{3dZ2%+DlE~*^RaCoU~Z{j^D0x(A6Ho$CGjQP9q51Dn8ZP2
z5;>lQ6TEN;Or|}FS&_$KRkk1Yf3oIkb7M2yuVAUBvG1v)+8JjhKZYo=
z(;_@L*!PpSOR9u#aN_9l)c(_WFAZa2MA;w1wE#iejS};!&t^Gp8
zCh!u7x@JOsM9|&?t0srD-MT^7Efs|?)yra*!H>48zN5UzoV%c;nIVy9}Z0|fk#Eg2fiDo2x_DysWYEQ9F9
zfP%pMG4t-knfD{kHYN7gr};jOV}XIbG7wi8XA>%^>JpfrO|84;T7CWNJ|uR~(!Z=Z
mcKF*KwYhVC;qY}FB4nh1*@{OX8s0{#*n1|
diff --git a/data/DOGE.rda b/data/DOGE.rda
index 545887acce08b3141964833b52128a07d597da83..057b508fc5606390092f192b07d57c2373691f4c 100644
GIT binary patch
literal 1699
zcmV;U23+|k}SOpnzx27uatXwYZ?0004?dVmH%00STZ00000
zZBJ9w(dh#q&@}Y`G&BdO4Lv|KF~k4>13&-(&93?ZO2JwN~r00SV?CV&7M27nC!000008V#h#
z0017400U}@Mw8Mq14GnkXc_>}0iXbA27mwq)Bw-`001=5000dQ001-_YJfBv001-|
zpb}C-nUva^15Gs000Te
zhKntou@2rG9I;@WG$T-Do8D1^kckc|YOm_sloB$HEZfYg+LxC43Yjs^l)uSM22OWd`wlH!j7
zAOfoa^btzl!vTbZ#dQ7g2=1Av1VKPafZAP`PvAnflR+B%k)iq1PnFPZD~Ly1)aKNP
zs1T1;PJm&Q5fkG}I3ipiTz-f3$MkO8X2lmNbnCcLg5v02Uo&Lgs)R-W>!OnzoP=RQ
zd>c^M@v)g|#WQEpbsMfp(*&wuG4XGu1`&WcL|bTz1DS0NjbJjEWz{
z3bvHN(N2XFSsAYq`5J1ts%keB1q%MyOl@ToF{&jZs|+X5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3*Z8#5ir$^6Zu#)!GP?B{y<{L
zhz12Hkr>}wFbNO>0a_IZyg!)OR(<#WXXYvTc198Tw4MCLvG?P?_wdw5kYJn+$U%Px
zz~@Q?InZEcG>D_S&Vw-A+s)dLQr-t)&1`X~)k(1z`GJ+PCJLmz(r=YpR~6DqtFYX<
z=BnhRM9#rgEvl}>SgTvMcQkXLohTHVP6LyNCnA63g^2ED@qIWsE@d;#L$i1Exh}jU
z4vk;YRgCb+SLxa;{*J{dN>Y~wQs#fpr@9^7@Tz0rPZHvM(cHB$XUFc;9PesQ?)Qh9
zn%Kk`*rOQBjAL63HIH>0qWn=e^NU^0#Q#0f^R(l4p&oq8{f^fhaSb5^)vm6}(WH&Uye)hK@>HbL57d8??AW@l
ztewd_a>9YLN&6z%=%#avQ;*N9DPrUdlkZS1#R!N0agA6GXSSb-G
saY&cpJTt>R7Up The time-index}
+\item{open}{<\link{numeric}> Opening price}
+\item{high}{<\link{numeric}> Highest price}
+\item{low}{<\link{numeric}> Lowest price}
+\item{close}{<\link{numeric}> Closing price}
+\item{volume}{<\link{numeric}> Trading volume}
+}
}
\usage{
ATOM
}
\description{
-A xts object with 15m OHLCV of USDT denominated ATOM with 97 rows and 5 columns, from 2023-12-30 to 2023-12-31.
-}
-\details{
-\describe{
-\item{Open}{Opening price}
-\item{High}{Highest price}
-\item{Low}{Lowest price}
-\item{Close}{Closing price}
-\item{Volume}{Volume}
-}
+This dataset contains time-series data for the ATOM (ATOM)
+denominated in USDT (Tether), captured in 15-minute intervals.
+The data spans from December 30 to December 31, 2023.
}
-\seealso{
-Other data:
-\code{\link{BTC}},
-\code{\link{DOGE}},
-\code{\link{FGIndex}}
+\examples{
+# Load the dataset
+data("ATOM")
+
+# chart
+chart(
+ ticker = ATOM,
+ main = kline(),
+ sub = list(volume())
+)
}
-\concept{data}
\keyword{datasets}
diff --git a/man/BTC.Rd b/man/BTC.Rd
index dff63951..69386008 100644
--- a/man/BTC.Rd
+++ b/man/BTC.Rd
@@ -3,30 +3,36 @@
\docType{data}
\name{BTC}
\alias{BTC}
-\title{USDT denominated Bitcoin(BTC) with 1 week intervals}
+\title{USDT Denominated Bitcoin (BTCUSDT) Weekly Intervals}
\format{
-An object of class \code{xts} (inherits from \code{zoo}) with 52 rows and 5 columns.
+An \code{\link[xts:xts]{xts::xts()}}-object with 52 rows and 5 columns,
+
+\describe{
+\item{index}{<\link{POSIXct}> The time-index}
+\item{open}{<\link{numeric}> Opening price}
+\item{high}{<\link{numeric}> Highest price}
+\item{low}{<\link{numeric}> Lowest price}
+\item{close}{<\link{numeric}> Closing price}
+\item{volume}{<\link{numeric}> Trading volume}
+}
}
\usage{
BTC
}
\description{
-A xts object with weekly OHLCV of USDT denominated Bitcoin with 52 rows and 5 columns, from 2023-01-01 to 2023-12-31.
-}
-\details{
-\describe{
-\item{Open}{Opening price}
-\item{High}{Highest price}
-\item{Low}{Lowest price}
-\item{Close}{Closing price}
-\item{Volume}{Volume}
-}
+This dataset contains time-series data for Bitcoin (BTC)
+denominated in USDT (Tether), captured in weekly intervals.
+The data spans from January 1, 2023, to December 31, 2023.
}
-\seealso{
-Other data:
-\code{\link{ATOM}},
-\code{\link{DOGE}},
-\code{\link{FGIndex}}
+\examples{
+# Load the dataset
+data("BTC")
+
+# chart
+chart(
+ ticker = BTC,
+ main = kline(),
+ sub = list(volume())
+)
}
-\concept{data}
\keyword{datasets}
diff --git a/man/DOGE.Rd b/man/DOGE.Rd
index c97383d0..4bcc7450 100644
--- a/man/DOGE.Rd
+++ b/man/DOGE.Rd
@@ -3,30 +3,36 @@
\docType{data}
\name{DOGE}
\alias{DOGE}
-\title{USDT denominated DOGECOIN in 1m intervals}
+\title{USDT Denominated DOGECOIN (DOGEUSDT) 1-Minute Intervals}
\format{
-An object of class \code{xts} (inherits from \code{zoo}) with 61 rows and 5 columns.
+An \code{\link[xts:xts]{xts::xts()}}-object with 61 rows and 5 columns,
+
+\describe{
+\item{index}{<\link{POSIXct}> The time-index}
+\item{open}{<\link{numeric}> Opening price}
+\item{high}{<\link{numeric}> Highest price}
+\item{low}{<\link{numeric}> Lowest price}
+\item{close}{<\link{numeric}> Closing price}
+\item{volume}{<\link{numeric}> Trading volume}
+}
}
\usage{
DOGE
}
\description{
-A xts object with 1m OHLCV of USDT denominated Dogecoin with 61 rows and 5 columns.
-}
-\details{
-\describe{
-\item{Open}{Opening price}
-\item{High}{Highest price}
-\item{Low}{Lowest price}
-\item{Close}{Closing price}
-\item{Volume}{Volume}
-}
+This dataset contains time-series data for the DOGECOIN (DOGE)
+denominated in USDT (Tether), captured in 1-minute intervals.
+The data spans 2022-01-14 07:00:00 CET to 2022-01-14 08:00:00 CET.
}
-\seealso{
-Other data:
-\code{\link{ATOM}},
-\code{\link{BTC}},
-\code{\link{FGIndex}}
+\examples{
+# Load the dataset
+data("DOGE")
+
+# chart
+chart(
+ ticker = DOGE,
+ main = kline(),
+ sub = list(volume())
+)
}
-\concept{data}
\keyword{datasets}
diff --git a/man/FGIndex.Rd b/man/FGIndex.Rd
index 8071c705..4f525733 100644
--- a/man/FGIndex.Rd
+++ b/man/FGIndex.Rd
@@ -3,26 +3,40 @@
\docType{data}
\name{FGIndex}
\alias{FGIndex}
-\title{Fear and Greed Index Values}
+\title{Fear and Greed Index (FGI) values for the
+cryptocurrency market in daily intervals}
\format{
-An object of class \code{xts} (inherits from \code{zoo}) with 364 rows and 1 columns.
+An \code{\link[xts:xts]{xts::xts()}}-object with 364 rows and 1 columns,
+
+\describe{
+\item{index}{<\link{POSIXct}> The time-index}
+\item{fgi}{<\link{numeric}< The daily fear and greed index value}
+}
}
\usage{
FGIndex
}
\description{
-A xts object with Fear and Greed Index value. It has 689 rows, and 1 colum. Extracted from 2023-01-01 to 2023-12-31
+This dataset contains daily values of the Fear and Greed Index for the year
+2023, which is used to measure the sentiments of investors in the market.
+The data spans from January 1, 2023, to December 31, 2023.
}
\details{
-\describe{
-\item{FGI}{Daily Fear and Greed Index Value}
+The Fear and Greed Index goes from 0-100, and can be classified as follows,
+
+\itemize{
+\item 0-24, Extreme Fear
+\item 25-44, Fear
+\item 45-55, Neutral
+\item 56-75, Greed
+\item 76-100, Extreme Greed
}
}
-\seealso{
-Other data:
-\code{\link{ATOM}},
-\code{\link{BTC}},
-\code{\link{DOGE}}
+\examples{
+# Load the dataset
+data("FGIndex")
+
+# Get a summary of index values
+summary(FGIndex)
}
-\concept{data}
\keyword{datasets}
diff --git a/man/GET.Rd b/man/GET.Rd
index b55470c4..75be4caf 100644
--- a/man/GET.Rd
+++ b/man/GET.Rd
@@ -22,34 +22,28 @@ A \link{list} crated by \code{\link[jsonlite:fromJSON]{jsonlite::fromJSON()}}
GET-requests
}
\examples{
-# script: scr_GET
-# date: 2024-02-28
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: An example on how to use the GET-function
-# mostly for internal purposes
-# script start;
-
\dontrun{
+ # script start;
+
exchange <- "bybit"
futures <- FALSE
- # 1) define baseUrl
- # and endoint
+ # 1) define baseurl
base_url <- cryptoQuotes:::baseUrl(
- source = exchange,
+ source = exchange,
futures = futures
)
+ # 2) define endpoint
end_point <- cryptoQuotes:::endPoint(
source = "bybit",
futures = futures,
- type = "ohlc"
+ type = "ohlc"
)
-
- # 2) define parameters
- # that are passed into
- # GET
+ # 2) define actual
+ # parameters based on
+ # API docs
queries <- list(
symbol = "BTCUSDT",
category = "spot",
@@ -57,19 +51,19 @@ GET-requests
interval = "D"
)
-
# 3) perform GET request
- GET(
+ cryptoQuotes:::GET(
url = base_url,
endpoint = end_point,
query = queries
)
-}
-# script end;
+ # script end;
+}
}
\seealso{
Other development tools:
+\code{\link{chart_layout}()},
\code{\link{convert_date}()},
\code{\link{default_dates}()},
\code{\link{fetch}()},
diff --git a/man/add_event.Rd b/man/add_event.Rd
index 6b93276e..c9acfd3f 100644
--- a/man/add_event.Rd
+++ b/man/add_event.Rd
@@ -2,44 +2,36 @@
% Please edit documentation in R/chart_event.R
\name{add_event}
\alias{add_event}
-\title{add eventlines to
-the chart}
+\title{Add eventlines to the chart}
\usage{
-add_event(event_data, ...)
+add_event(data, ...)
}
\arguments{
-\item{event_data}{a \link{data.frame} with index, event and colors.}
+\item{data}{a \link{data.frame}-type object with \code{index}, \code{event}
+and \code{color} columns.}
-\item{...}{arguments pass interally by \link{chart}, ignore.}
+\item{...}{For internal use. Please ignore.}
}
\value{
-Invisbly returns a plotly object.
+A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object with \code{shapes} and \code{annotations}
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
-Common types of event indicators include earnings release dates, dividend payouts, central bank interest rate decisions, chart pattern breakouts, and geopolitical events like elections or geopolitical tensions.
-The choice of event indicators depends on the trader's or analyst's specific objectives and the factors they believe are most relevant to the asset's price movements.
+A high-level \code{\link[plotly:layout]{plotly::layout()}}-function.
+The function adds \code{shapes} and \code{annotations} to the main \code{\link[=chart]{chart()}}.
}
\details{
-TBA
+The \link{data.frame} must include the following columns,
+\itemize{
+\item \code{index} \link{integer} or \link{date}: corresponding to the event timing.
+\item \code{event} \link{character}: the event label.
+\item \code{color} \link{character}: the color of the event
}
-\section{Note}{
-The eventlines are drawn using \code{\link[plotly:layout]{plotly::layout()}}, so all existing
-eventlines will be replaced each time you call \code{\link[=add_event]{add_event()}}.
}
-
\examples{
-# script: scr_addEvents
-# date: 2023-12-07
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Describe the usage
-# of addEvents
# script start;
-# laod library
-library(cryptoQuotes)
-
# 1) Generate random events
# of buys and sells and convert
# to data.frame
@@ -48,8 +40,11 @@ library(cryptoQuotes)
# but only base R is shown here to avoid
# too many dependencies
set.seed(1903)
-event_data <- ATOM[
- sample(1:nrow(ATOM), size = 2)
+event_data <- cryptoQuotes::ATOM[
+ sample(
+ x = 1:nrow(cryptoQuotes::ATOM),
+ size = 2
+ )
]
# 1.1) Extract the index
@@ -61,7 +56,9 @@ index <- zoo::index(
# 1.2) Convert the coredata
# into a data.frame
event_data <- as.data.frame(
- zoo::coredata(event_data)
+ zoo::coredata(
+ event_data
+ )
)
# 1.3) Add the index into the data.frame
@@ -83,28 +80,30 @@ event_data$color <- ifelse(
event_data$event == 'Buy',
yes = 'darkgrey',
no = ifelse(
- subset(event_data, event == 'Buy')$Close < subset(event_data, event == 'Sell')$Close,
- yes = 'green',
- no = 'red'
+ test = subset(
+ x = event_data,
+ event == 'Buy')$close < subset(x = event_data, event == 'Sell')$close,
+ yes = 'green',
+ no = 'red'
)
)
# 1.6) modify the event to add
# closing price at each event
event_data$event <- paste0(
- event_data$event, ' @', event_data$Close
+ event_data$event, ' @', event_data$close
)
# 2) Chart the the klines
# and add the buy and sell events
-chart(
- ticker = ATOM,
- main = kline(),
+cryptoQuotes::chart(
+ ticker = cryptoQuotes::ATOM,
+ main = cryptoQuotes::kline(),
sub = list(
- volume()
+ cryptoQuotes::volume()
),
indicator = list(
- bollinger_bands()
+ cryptoQuotes::bollinger_bands()
),
event_data = event_data,
options = list(
@@ -121,6 +120,7 @@ Other chart indicators:
\code{\link{bollinger_bands}()},
\code{\link{chart}()},
\code{\link{dema}()},
+\code{\link{donchian_channel}()},
\code{\link{ema}()},
\code{\link{evwma}()},
\code{\link{fgi}()},
@@ -129,17 +129,37 @@ Other chart indicators:
\code{\link{macd}()},
\code{\link{rsi}()},
\code{\link{sma}()},
+\code{\link{smi}()},
\code{\link{volume}()},
\code{\link{vwap}()},
\code{\link{wma}()},
\code{\link{zlema}()}
-Other subcharts:
+Other subchart indicators:
\code{\link{fgi}()},
\code{\link{lsr}()},
\code{\link{macd}()},
\code{\link{rsi}()},
+\code{\link{smi}()},
\code{\link{volume}()}
+
+Other main chart indicators:
+\code{\link{alma}()},
+\code{\link{bollinger_bands}()},
+\code{\link{dema}()},
+\code{\link{donchian_channel}()},
+\code{\link{ema}()},
+\code{\link{evwma}()},
+\code{\link{hma}()},
+\code{\link{sma}()},
+\code{\link{vwap}()},
+\code{\link{wma}()},
+\code{\link{zlema}()}
+}
+\author{
+Serkan Korkmaz
}
\concept{chart indicators}
-\concept{subcharts}
+\concept{main chart indicators}
+\concept{subchart indicators}
+\keyword{internal}
diff --git a/man/alma.Rd b/man/alma.Rd
index 12a3d694..9e786902 100644
--- a/man/alma.Rd
+++ b/man/alma.Rd
@@ -2,12 +2,19 @@
% Please edit documentation in R/chart_ma.R
\name{alma}
\alias{alma}
-\title{Add Arnaud Legoux Moving Average to the chart}
+\title{Add Arnaud Legoux Moving Average (ALMA) to the chart}
\usage{
-alma(price = "close", n = 9, offset = 0.85, sigma = 6, internal = list(), ...)
+alma(
+ price = "close",
+ n = 9,
+ offset = 0.85,
+ sigma = 6,
+ ...
+)
}
\arguments{
-\item{price}{A \link{character}-vector of \link{length} 1. Close by default. The name of the vector to passed into \link[TTR:MovingAverages]{TTR::ALMA}}
+\item{price}{A \link{character}-vector of \link{length} 1. "close" by default
+The name of the vector to passed into \link[TTR:MovingAverages]{TTR::ALMA}.}
\item{n}{Number of periods to average over. Must be between 1 and
\code{nrow(x)}, inclusive.}
@@ -16,62 +23,28 @@ alma(price = "close", n = 9, offset = 0.85, sigma = 6, internal = list(), ...)
\item{sigma}{Standard deviation of the distribution.}
-\item{internal}{An empty \link{list}. Used for internal purposes. Ignore.}
-
-\item{...}{any other passthrough parameters}
+\item{...}{For internal use. Please ignore.}
}
\value{
-A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object wrapped in \code{\link[rlang:expr]{rlang::expr()}}.
+A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
-A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that interacts with \link{TTR}'s moving average family of functions.
+A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that
+interacts with \link{TTR}'s moving average family of functions.
+The function adds moving average indicators to the main \code{\link[=chart]{chart()}}.
}
\examples{
-# script: scr_charting
-# date: 2023-10-25
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Charting in general
# script start;
-## charting the klines
-## with indicators as
-## subcharts
-chart(
- ticker = BTC,
- main = kline(),
- sub = list(
- volume(),
- macd()
- ),
- indicator = list(
- bollinger_bands(),
- sma(),
- alma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
- )
-)
-
-## charting the MACD-indicator
-## with klines as subcharts
-chart(
- ticker = BTC,
- main = macd(),
- sub = list(
- volume(),
- kline()
- ),
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = kline(),
indicator = list(
- bollinger_bands(),
- sma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
+ cryptoQuotes::ema(n = 7),
+ cryptoQuotes::sma(n = 14),
+ cryptoQuotes::wma(n = 21)
)
)
@@ -83,6 +56,7 @@ Other chart indicators:
\code{\link{bollinger_bands}()},
\code{\link{chart}()},
\code{\link{dema}()},
+\code{\link{donchian_channel}()},
\code{\link{ema}()},
\code{\link{evwma}()},
\code{\link{fgi}()},
@@ -91,6 +65,7 @@ Other chart indicators:
\code{\link{macd}()},
\code{\link{rsi}()},
\code{\link{sma}()},
+\code{\link{smi}()},
\code{\link{volume}()},
\code{\link{vwap}()},
\code{\link{wma}()},
@@ -102,8 +77,26 @@ Other moving average indicators:
\code{\link{evwma}()},
\code{\link{hma}()},
\code{\link{sma}()},
+\code{\link{vwap}()},
\code{\link{wma}()},
\code{\link{zlema}()}
+
+Other main chart indicators:
+\code{\link{add_event}()},
+\code{\link{bollinger_bands}()},
+\code{\link{dema}()},
+\code{\link{donchian_channel}()},
+\code{\link{ema}()},
+\code{\link{evwma}()},
+\code{\link{hma}()},
+\code{\link{sma}()},
+\code{\link{vwap}()},
+\code{\link{wma}()},
+\code{\link{zlema}()}
+}
+\author{
+Serkan Korkmaz
}
\concept{chart indicators}
+\concept{main chart indicators}
\concept{moving average indicators}
diff --git a/man/assert.Rd b/man/assert.Rd
index 6c1a4529..6405a6c1 100644
--- a/man/assert.Rd
+++ b/man/assert.Rd
@@ -7,8 +7,8 @@
assert(..., error_message = NULL)
}
\arguments{
-\item{...}{expressions >= 1. If named the names are used as error messages, otherwise
-R's internal error-messages are thrown}
+\item{...}{expressions >= 1. If named the names are used
+as error messages, otherwise R's internal error-messages are thrown}
\item{error_message}{character. An error message, supports \link{cli}-formatting.}
}
@@ -16,111 +16,87 @@ R's internal error-messages are thrown}
\link{NULL} if all statements in ... are \link{TRUE}
}
\description{
-This function is a wrapper of \code{\link[=stopifnot]{stopifnot()}}, \code{\link[=tryCatch]{tryCatch()}} and \code{\link[cli:cli_abort]{cli::cli_abort()}} and asserts
-the truthfulness of the passed expression(s).
+This function is a wrapper of \code{\link[=stopifnot]{stopifnot()}}, \code{\link[=tryCatch]{tryCatch()}} and
+\code{\link[cli:cli_abort]{cli::cli_abort()}} and asserts the truthfulness of the passed expression(s).
}
\examples{
-# script: Assert truthfullness
-# of functions
-# date: 2024-02-22
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Demonstrate the use of the error-function. This is
-# mainly for contributers, and for my future self on how to use
-# this function properly
-#
-#
-# NOTE: As these are wrapped in try
-# they are not properly formatted.
-# script start;
-
-
-# 1) unnamed assert
-# expressions
-foo <- function(
+\dontrun{
+ # script start;
+
+ # 1) unnamed assert
+ # expressions
+ foo <- function(
a,
b) {
- # assert without
- # named expressions
- cryptoQuotes:::assert(
- is.numeric(a),
- is.numeric(b)
- )
+ # assert without
+ # named expressions
+ cryptoQuotes:::assert(
+ is.numeric(a),
+ is.numeric(b)
+ )
- a + b
+ a + b
-}
+ }
-# 1.1) returns
-# the regular R error
-# messages in cli-format
-try(
+ # 1.1) returns
+ # the regular R error
+ # messages in cli-format
foo(
a = "1",
b = "2"
)
-)
-
-
-# 2) named assert
-# expressions
-foo <- function(
+ # 2) named assert
+ # expressions
+ foo <- function(
a,
b) {
- cryptoQuotes:::assert(
- "{.arg a} is not {.cls numeric}" = is.numeric(a),
- "{.arg a} is not {.cls numeric}" = is.numeric(b)
- )
-
+ cryptoQuotes:::assert(
+ "{.arg a} is not {.cls numeric}" = is.numeric(a),
+ "{.arg a} is not {.cls numeric}" = is.numeric(b)
+ )
- a + b
+ a + b
-}
+ }
-# 2.2) Returns
-# custom error-messages
-# in cli-format
-try(
+ # 2.2) Returns
+ # custom error-messages
+ # in cli-format
foo(
a = "1",
b = "2"
)
-)
-
-# 3) custom error
-# messages on
-foo <- function(
+ # 3) custom error
+ # messages on
+ foo <- function(
a) {
- cryptoQuotes:::assert(
- is.numeric(a),
- error_message = sprintf(
- fmt = "{.val \%s} is not a numeric value.",
- a
+ cryptoQuotes:::assert(
+ is.numeric(a),
+ error_message = sprintf(
+ fmt = "{.val \%s} is not a numeric value.",
+ a
+ )
)
- )
- a
+ a
-}
+ }
-# 2.2) Returns
-# custom error-messages with
-# passed values in cli-format
-try(
+ # 2.2) Returns
+ # custom error-messages with
+ # passed values in cli-format
foo(
a = "1"
)
-)
-
-
-
-
-# script end;
+ # script end;
+}
}
\seealso{
\code{\link[=stopifnot]{stopifnot()}}, \code{\link[cli:cli_abort]{cli::cli_abort()}}, \code{\link[=tryCatch]{tryCatch()}}
diff --git a/man/availableExchanges.Rd b/man/availableExchanges.Rd
deleted file mode 100644
index f13c7a73..00000000
--- a/man/availableExchanges.Rd
+++ /dev/null
@@ -1,61 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/availableExchanges.R
-\name{availableExchanges}
-\alias{availableExchanges}
-\title{Get available exchanges}
-\usage{
-availableExchanges(type = "ohlc")
-}
-\arguments{
-\item{type}{\link{character}-vector of length 1. See details}
-}
-\value{
-An \code{\link[=invisible]{invisible()}} \link{character} vector containing available exchanges
-}
-\description{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-
-Get a vector of all available exchanges passed into the source
-argument of the get-functions.
-}
-\details{
-\subsection{Available types}{
-\itemize{
-\item ohlc: Open, High, Low, Close and Volume
-\item lsratio: Long-Short ratio
-\item fundingrate: Funding rates
-\item interest: Open perpetual contracts on both sides
-}
-}
-
-\subsection{Limits}{
-
-The endpoints supported by the \code{\link[=available_exchanges]{available_exchanges()}} are not uniform,
-so exchanges available for, say, \code{\link[=get_lsratio]{get_lsratio()}} is not necessarily the same as those available for \code{\link[=get_quote]{get_quote()}}
-}
-}
-\examples{
-# script:
-# date: 2023-10-06
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective:
-# script start;
-
-## return all
-## available exchanges
-cryptoQuotes::available_exchanges()
-
-# script end;
-}
-\seealso{
-Other deprecated:
-\code{\link{availableIntervals}()},
-\code{\link{availableTickers}()},
-\code{\link{getFGIndex}()},
-\code{\link{getLSRatio}()},
-\code{\link{getQuote}()}
-}
-\author{
-Serkan Korkmaz
-}
-\concept{deprecated}
diff --git a/man/availableIntervals.Rd b/man/availableIntervals.Rd
deleted file mode 100644
index 876b3149..00000000
--- a/man/availableIntervals.Rd
+++ /dev/null
@@ -1,75 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/availableIntervals.R
-\name{availableIntervals}
-\alias{availableIntervals}
-\title{Get available intervals}
-\usage{
-availableIntervals(source = "binance", type = "ohlc", futures = TRUE)
-}
-\arguments{
-\item{source}{A \link{character}-vector of \link{length} 1. \code{binance} by default. See \code{\link[=available_exchanges]{available_exchanges()}} for available exchanges.}
-
-\item{type}{\link{character}-vector of length 1. See details}
-
-\item{futures}{A \link{logical}-vector of \link{length} 1. \link{TRUE} by default. Returns futures market if \link{TRUE}, spot market otherwise.}
-}
-\value{
-An \code{\link[=invisible]{invisible()}} \link{character} vector containing the available intervals on
-the exchange, market and endpoint
-}
-\description{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-}
-\details{
-\subsection{Available types}{
-\itemize{
-\item ohlc: Open, High, Low, Close and Volume
-\item lsratio: Long-Short ratio
-\item fundingrate: Funding rates
-\item interest: Open perpetual contracts on both sides
-}
-}
-
-\subsection{Limits}{
-
-The endpoints supported by the \code{\link[=available_exchanges]{available_exchanges()}} are not uniform,
-so exchanges available for, say, \code{\link[=get_lsratio]{get_lsratio()}} is not necessarily the same as those available for \code{\link[=get_quote]{get_quote()}}
-}
-}
-\examples{
-\dontrun{
- # script:
- # date: 2023-10-06
- # author: Serkan Korkmaz, serkor1@duck.com
- # objective:
- # script start;
-
- # available intervals
- # at kucoin futures market
- cryptoQuotes::available_intervals(
- source = 'kucoin',
- futures = TRUE
- )
-
- # available intervals
- # at kraken spot market
- cryptoQuotes::available_intervals(
- source = 'kraken',
- futures = FALSE
- )
-
- # script end;
-}
-}
-\seealso{
-Other deprecated:
-\code{\link{availableExchanges}()},
-\code{\link{availableTickers}()},
-\code{\link{getFGIndex}()},
-\code{\link{getLSRatio}()},
-\code{\link{getQuote}()}
-}
-\author{
-Serkan Korkmaz
-}
-\concept{deprecated}
diff --git a/man/availableTickers.Rd b/man/availableTickers.Rd
deleted file mode 100644
index 49451558..00000000
--- a/man/availableTickers.Rd
+++ /dev/null
@@ -1,62 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/availableTickers.R
-\name{availableTickers}
-\alias{availableTickers}
-\title{Get available cryptocurrency pairs}
-\usage{
-availableTickers(source = "binance", futures = TRUE)
-}
-\arguments{
-\item{source}{A \link{character}-vector of \link{length} 1. \code{binance} by default. See \code{\link[=available_exchanges]{available_exchanges()}} for available exchanges.}
-
-\item{futures}{A \link{logical}-vector of \link{length} 1. \link{TRUE} by default. Returns futures market if \link{TRUE}, spot market otherwise.}
-}
-\value{
-A \link{character}-vector of actively traded cryptocurrency pairs on the exchange, and the specified market.
-}
-\description{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-
-This function returns all available
-cryptocurrewncy pairs on the \link{available_exchanges}
-}
-\details{
-The naming-conventions across, and within, \code{\link[=available_exchanges]{available_exchanges()}} are not necessarily the same. This function lists
-all actively traded tickers.
-}
-\examples{
-\dontrun{
- ## available tickers
- ## in Binance spot market
- head(
- cryptoQuotes::available_tickers(
- source = 'binance',
- futures = FALSE
- )
- )
-
- ## available tickers
- ## on Kraken futures market
- head(
- cryptoQuotes::available_tickers(
- source = 'kraken',
- futures = TRUE
- )
- )
-}
-
-
-
-}
-\seealso{
-Other deprecated:
-\code{\link{availableExchanges}()},
-\code{\link{availableIntervals}()},
-\code{\link{getFGIndex}()},
-\code{\link{getLSRatio}()},
-\code{\link{getQuote}()}
-}
-\author{
-Serkan Korkmaz
-}
-\concept{deprecated}
diff --git a/man/available_exchanges.Rd b/man/available_exchanges.Rd
index 61aacd2c..8e4ebd97 100644
--- a/man/available_exchanges.Rd
+++ b/man/available_exchanges.Rd
@@ -4,50 +4,51 @@
\alias{available_exchanges}
\title{Get available exchanges}
\usage{
-## available exchanges
-## by type
available_exchanges(
type = "ohlc"
)
}
\arguments{
-\item{type}{\link{character}-vector of length 1. See details}
+\item{type}{\link{character}-vector of \link{length} 1. One of,
+\itemize{
+\item \code{"ohlc"} - Available exchanges for Open, High, Low, Close and
+Volume market data. See the \code{\link[=get_quote]{get_quote()}}-function.
+\item \code{"lsratio"} - Available exchanges for Long-Short ratios.
+See the \code{\link[=get_lsratio]{get_lsratio()}}-function.
+\item \code{"fundingrate"} - Available exchanges for Funding rates.
+See the \code{\link[=get_fundingrate]{get_fundingrate()}}-function.
+\item \code{"interest"} - Available exchanges for Open interest on perpetual
+contracts on both sides. See the \code{\link[=get_openinterest]{get_openinterest()}}-function.
+}}
}
\value{
-An \code{\link[=invisible]{invisible()}} \link{character} vector containing available exchanges
+An \code{\link[=invisible]{invisible()}} \link{character}-vector containing available exchanges
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}}
-Get a vector of all available exchanges passed into the source
+Get a \link{vector} of all available exchanges passed into the \code{source}
argument of the get-functions.
}
\details{
-\subsection{Available types}{
-\itemize{
-\item ohlc: Open, High, Low, Close and Volume
-\item lsratio: Long-Short ratio
-\item fundingrate: Funding rates
-\item interest: Open perpetual contracts on both sides
-}
-}
-
-\subsection{Limits}{
-
The endpoints supported by the \code{\link[=available_exchanges]{available_exchanges()}} are not uniform,
-so exchanges available for, say, \code{\link[=get_lsratio]{get_lsratio()}} is not necessarily the same as those available for \code{\link[=get_quote]{get_quote()}}
-}
+so exchanges available for, say, \code{\link[=get_lsratio]{get_lsratio()}} is not necessarily
+the same as those available for \code{\link[=get_quote]{get_quote()}}
}
\examples{
-# script:
-# date: 2023-10-06
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective:
# script start;
-## return all
-## available exchanges
-cryptoQuotes::available_exchanges()
+# 1) available exchanges
+# on ohlc-v endpoint
+cryptoQuotes::available_exchanges(
+ type = "ohlc"
+ )
+
+# 2) available exchanges
+# on long-short ratios
+cryptoQuotes::available_exchanges(
+ type = "lsratio"
+)
# script end;
}
diff --git a/man/available_intervals.Rd b/man/available_intervals.Rd
index 97c23b4a..26858f58 100644
--- a/man/available_intervals.Rd
+++ b/man/available_intervals.Rd
@@ -4,60 +4,71 @@
\alias{available_intervals}
\title{Get available intervals}
\usage{
-available_intervals(source = "binance", type = "ohlc", futures = TRUE)
+available_intervals(
+ source = "binance",
+ type = "ohlc",
+ futures = TRUE
+)
}
\arguments{
-\item{source}{A \link{character}-vector of \link{length} 1. \code{binance} by default. See \code{\link[=available_exchanges]{available_exchanges()}} for available exchanges.}
+\item{source}{A \link{character}-vector of \link{length} 1. \code{binance} by default.
+See \code{\link[=available_exchanges]{available_exchanges()}} for available exchanges.}
-\item{type}{\link{character}-vector of length 1. See details}
+\item{type}{\link{character}-vector of \link{length} 1. One of,
+\itemize{
+\item \code{"ohlc"} - Available exchanges for Open, High, Low, Close and
+Volume market data. See the \code{\link[=get_quote]{get_quote()}}-function.
+\item \code{"lsratio"} - Available exchanges for Long-Short ratios.
+See the \code{\link[=get_lsratio]{get_lsratio()}}-function.
+\item \code{"fundingrate"} - Available exchanges for Funding rates.
+See the \code{\link[=get_fundingrate]{get_fundingrate()}}-function.
+\item \code{"interest"} - Available exchanges for Open interest on perpetual
+contracts on both sides. See the \code{\link[=get_openinterest]{get_openinterest()}}-function.
+}}
-\item{futures}{A \link{logical}-vector of \link{length} 1. \link{TRUE} by default. Returns futures market if \link{TRUE}, spot market otherwise.}
+\item{futures}{A \link{logical}-vector of \link{length} 1. \link{TRUE} by default.
+Returns futures market if \link{TRUE}, spot market otherwise.}
}
\value{
-An \code{\link[=invisible]{invisible()}} \link{character} vector containing the available intervals on
-the exchange, market and endpoint
+An \code{\link[=invisible]{invisible()}} \link{character}-vector containing the available intervals on
+the exchange, market and endpoint.
+
+\strong{Sample output}
+
+\if{html}{\out{}}\preformatted{#> i Available Intervals at "bybit" (futures):
+#> v 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 1M, 1w
+#> [1] "1m" "3m" "5m" "15m" "30m" "1h"
+}\if{html}{\out{ }}
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}}
-Get available intervals for the \code{\link[=available_tickers]{available_tickers()}} on the \code{\link[=available_exchanges]{available_exchanges()}}.
+Get available intervals for the \code{\link[=available_tickers]{available_tickers()}}
+on the \code{\link[=available_exchanges]{available_exchanges()}}.
}
\details{
-\subsection{Available types}{
-\itemize{
-\item ohlc: Open, High, Low, Close and Volume
-\item lsratio: Long-Short ratio
-\item fundingrate: Funding rates
-\item interest: Open perpetual contracts on both sides
-}
-}
-
-\subsection{Limits}{
-
The endpoints supported by the \code{\link[=available_exchanges]{available_exchanges()}} are not uniform,
-so exchanges available for, say, \code{\link[=get_lsratio]{get_lsratio()}} is not necessarily the same as those available for \code{\link[=get_quote]{get_quote()}}
-}
+so exchanges available for, say, \code{\link[=get_lsratio]{get_lsratio()}} is not necessarily
+the same as those available for \code{\link[=get_quote]{get_quote()}}
}
\examples{
\dontrun{
- # script:
- # date: 2023-10-06
- # author: Serkan Korkmaz, serkor1@duck.com
- # objective:
# script start;
# available intervals
# at kucoin futures market
cryptoQuotes::available_intervals(
- source = 'kucoin',
- futures = TRUE
+ source = 'kucoin',
+ futures = TRUE,
+ type = "ohlc"
)
# available intervals
# at kraken spot market
cryptoQuotes::available_intervals(
- source = 'kraken',
- futures = FALSE
+ source = 'kraken',
+ futures = FALSE,
+ type = "ohlc"
)
# script end;
diff --git a/man/available_tickers.Rd b/man/available_tickers.Rd
index 791e9575..03197e3e 100644
--- a/man/available_tickers.Rd
+++ b/man/available_tickers.Rd
@@ -2,43 +2,52 @@
% Please edit documentation in R/available_tickers.R
\name{available_tickers}
\alias{available_tickers}
-\title{Get available cryptocurrency pairs}
+\title{Get actively traded cryptocurrency pairs}
\usage{
available_tickers(source = "binance", futures = TRUE)
}
\arguments{
-\item{source}{A \link{character}-vector of \link{length} 1. \code{binance} by default. See \code{\link[=available_exchanges]{available_exchanges()}} for available exchanges.}
+\item{source}{A \link{character}-vector of \link{length} 1. \code{binance} by default.
+See \code{\link[=available_exchanges]{available_exchanges()}} for available exchanges.}
-\item{futures}{A \link{logical}-vector of \link{length} 1. \link{TRUE} by default. Returns futures market if \link{TRUE}, spot market otherwise.}
+\item{futures}{A \link{logical}-vector of \link{length} 1. \link{TRUE} by default.
+Returns futures market if \link{TRUE}, spot market otherwise.}
}
\value{
-A \link{character}-vector of actively traded cryptocurrency pairs on the exchange, and the specified market.
+A \link{character}-vector of actively traded cryptocurrency pairs on the exchange,
+and the specified market.
+
+\strong{Sample output}
+
+\if{html}{\out{}}\preformatted{#> [1] "10000000AIDOGEUSDT" "1000000MOGUSDT" "10000COQUSDT"
+#> [4] "10000LADYSUSDT" "10000NFTUSDT" "10000SATSUSDT"
+}\if{html}{\out{ }}
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}}
-Get available cryptocurrency pairs
+Get actively traded cryptocurrency pairs on the \code{\link[=available_exchanges]{available_exchanges()}}.
}
\details{
-The naming-conventions across, and within, \code{\link[=available_exchanges]{available_exchanges()}} are not necessarily the same. This function lists
-all actively traded tickers.
+The naming-conventions across, and within, \code{\link[=available_exchanges]{available_exchanges()}} are not
+necessarily the same. This function lists all actively traded tickers.
}
\examples{
\dontrun{
- ## available tickers
- ## in Binance spot market
+ # 1) available tickers
+ # in Binance spot market
head(
cryptoQuotes::available_tickers(
- source = 'binance',
+ source = 'binance',
futures = FALSE
)
)
- ## available tickers
- ## on Kraken futures market
+ # 2) available tickers
+ # on Kraken futures market
head(
cryptoQuotes::available_tickers(
- source = 'kraken',
+ source = 'kraken',
futures = TRUE
)
)
diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd
index 2b5593c7..29d5dbb8 100644
--- a/man/bollinger_bands.Rd
+++ b/man/bollinger_bands.Rd
@@ -5,7 +5,13 @@
\title{Add Bollinger Bands
to the chart}
\usage{
-bollinger_bands(n = 20, sd = 2, maType = "SMA", internal = list(), ...)
+bollinger_bands(
+ n = 20,
+ sd = 2,
+ maType = "SMA",
+ color = '#4682b4',
+ ...
+)
}
\arguments{
\item{n}{Number of periods for moving average.}
@@ -14,63 +20,31 @@ bollinger_bands(n = 20, sd = 2, maType = "SMA", internal = list(), ...)
\item{maType}{A function or a string naming the function to be called.}
-\item{internal}{An empty \link{list}. Used for internal purposes. Ignore.}
+\item{color}{A \link{character}-vector of \link{length} 1. "#4682b4" by default.}
\item{...}{Other arguments to be passed to the \code{maType} function.}
}
\value{
-Invisbly returns a plotly object.
+An \link{invisible} \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
-Bollinger Bands provide a visual representation of price volatility and are widely used by traders
-and investors to assess potential price reversals and trade opportunities in various financial markets, including stocks, forex, and commodities.
+A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that interacts
+with the \code{\link[TTR:bollingerBands]{TTR::BBands()}}-function. The function adds bollinger bands
+to the main \code{\link[=chart]{chart()}}.
}
\examples{
-# script: scr_charting
-# date: 2023-10-25
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Charting in general
# script start;
-## charting the klines
-## with indicators as
-## subcharts
-chart(
- ticker = BTC,
- main = kline(),
- sub = list(
- volume(),
- macd()
- ),
- indicator = list(
- bollinger_bands(),
- sma(),
- alma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
- )
-)
-
-## charting the MACD-indicator
-## with klines as subcharts
-chart(
- ticker = BTC,
- main = macd(),
- sub = list(
- volume(),
- kline()
- ),
- indicator = list(
- bollinger_bands(),
- sma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
+# Charting BTC using
+# candlesticks as main
+# chart
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = cryptoQuotes::kline(),
+ sub = list(
+ cryptoQuotes::volume()
)
)
@@ -82,6 +56,7 @@ Other chart indicators:
\code{\link{alma}()},
\code{\link{chart}()},
\code{\link{dema}()},
+\code{\link{donchian_channel}()},
\code{\link{ema}()},
\code{\link{evwma}()},
\code{\link{fgi}()},
@@ -90,9 +65,27 @@ Other chart indicators:
\code{\link{macd}()},
\code{\link{rsi}()},
\code{\link{sma}()},
+\code{\link{smi}()},
\code{\link{volume}()},
\code{\link{vwap}()},
\code{\link{wma}()},
\code{\link{zlema}()}
+
+Other main chart indicators:
+\code{\link{add_event}()},
+\code{\link{alma}()},
+\code{\link{dema}()},
+\code{\link{donchian_channel}()},
+\code{\link{ema}()},
+\code{\link{evwma}()},
+\code{\link{hma}()},
+\code{\link{sma}()},
+\code{\link{vwap}()},
+\code{\link{wma}()},
+\code{\link{zlema}()}
+}
+\author{
+Serkan Korkmaz
}
\concept{chart indicators}
+\concept{main chart indicators}
diff --git a/man/calibrate_window.Rd b/man/calibrate_window.Rd
index af4118e0..74392426 100644
--- a/man/calibrate_window.Rd
+++ b/man/calibrate_window.Rd
@@ -24,19 +24,8 @@ This function is a high-level wrapper of \link{do.call} and \link{lapply} which
modifies each xts object stored in a \code{\link[=list]{list()}}.
}
\examples{
-# script: scr_FUN
-# date: 2023-12-27
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Demonstrate the use of the convinience
-# funtions
# script start;
-# by default the Fear and Greed Index
-# is given daily. So to align these values
-# with, say, weekly candles it has to be aggregated
-#
-# In this example the built-in data are used
-
# 1) check index of BTCUSDT and
# the Fear and Greed Index
setequal(
@@ -47,8 +36,8 @@ setequal(
# 2) to align the indices,
# we use the convincience functions
# by splitting the FGI by the BTC index.
-FGIndex <- split_window(
- xts = FGIndex,
+FGIndex <- cryptoQuotes::split_window(
+ xts = cryptoQuotes::FGIndex,
by = zoo::index(BTC),
# Remove upper bounds of the
@@ -64,7 +53,7 @@ FGIndex <- split_window(
# 3) as splitWindow returns a list
# it needs to passed into calibrateWindow
# to ensure comparability
-FGIndex <- calibrate_window(
+FGIndex <- cryptoQuotes::calibrate_window(
list = FGIndex,
# As each element in the list can include
@@ -79,22 +68,19 @@ FGIndex <- calibrate_window(
# 3) check if candles aligns
# accordingly
-setequal(
- zoo::index(BTC),
- zoo::index(FGIndex)
+stopifnot(
+ setequal(
+ zoo::index(BTC),
+ zoo::index(FGIndex)
+ )
)
-# As the dates are now aligned
-# and the Fear and Greed Index being summarised by
-# the first value, the Fear and Greed Index is the opening
-# Fear and Greed Index value, at each candle.
-
# script end;
}
\seealso{
-Other convinience:
+Other utility:
\code{\link{remove_bound}()},
\code{\link{split_window}()}
}
-\concept{convinience}
+\concept{utility}
diff --git a/man/chart.Rd b/man/chart.Rd
index fffc2157..0625b19f 100644
--- a/man/chart.Rd
+++ b/man/chart.Rd
@@ -2,92 +2,96 @@
% Please edit documentation in R/chart.R
\name{chart}
\alias{chart}
-\title{Build interactive financial charts}
+\title{Build an interactive financial chart}
\usage{
chart(
ticker,
- main = kline(),
- sub = list(volume()),
- indicator = list(bollinger_bands()),
+ main = list(kline()),
+ sub = list(),
+ indicator = list(),
event_data = NULL,
options = list()
)
}
\arguments{
-\item{ticker}{A \code{\link[xts:xts]{xts::xts()}}-object with Open, High, Low, Close and Volume columns.}
+\item{ticker}{An object with Open, High, Low, Close and Volume columns that
+can be coerced to a \code{\link[xts:xts]{xts::xts()}}-object.}
-\item{main}{A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object wrapped in \code{\link[rlang:expr]{rlang::expr()}}. \code{\link[=kline]{kline()}} by default.}
+\item{main}{A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-function. \code{\link[=kline]{kline()}} by default.}
-\item{sub}{An optional \link{list} of \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object(s) wrapped in \code{\link[rlang:expr]{rlang::expr()}}.}
+\item{sub}{An optional \link{list} of \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-function(s).}
-\item{indicator}{An optional \link{list} of \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object(s) wrapped in \code{\link[rlang:expr]{rlang::expr()}}.}
+\item{indicator}{An optional \link{list} of \code{\link[plotly:add_trace]{plotly::add_lines()}}-function(s).}
-\item{event_data}{An optional \link{data.frame} with event line(s) to be added to the \code{\link[=chart]{chart()}}. See \code{\link[=add_event]{add_event()}} for more details.}
+\item{event_data}{An optional \link{data.frame} with event line(s) to be added
+to the \code{\link[=chart]{chart()}}. See \code{\link[=add_event]{add_event()}} for more details.}
\item{options}{An optional \link{list} of \code{\link[=chart]{chart()}}-options. See details below.}
}
\value{
-Returns a \code{\link[plotly:plot_ly]{plotly::plot_ly()}} object.
+A \code{\link[plotly:plot_ly]{plotly::plot_ly()}} object.
+
+\strong{Sample Output}
+\if{html}{
+ \out{}\figure{README-chartquote-1.png}{options: style="width:750px;max-width:75\%;"}\out{}
+}
+\if{latex}{
+ \out{\begin{center}}\figure{README-chartquote-1.png}\out{\end{center}}
+}
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
-\code{\link[=chart]{chart()}} creates interactive financial charts using \code{\link[plotly:plot_ly]{plotly::plot_ly()}} as backend. It's a high-level function which collects
-and structures the passed chart elements.
+A high-level \code{\link[plotly:plot_ly]{plotly::plot_ly()}}- and \code{\link[plotly:subplot]{plotly::subplot()}}-wrapper function
+for building interactive financial charts using
+the affiliated \link{chart}-functions. The \link{chart} consists of a main chart, and
+an optional subchart. The main chart supports overlaying various trading
+indicators like \link{sma} and \link{bollinger_bands}.
}
\details{
\subsection{Options}{
\itemize{
-\item \code{dark} A \link{logical}-value of \link{length} 1. \link{TRUE} by default. Sets the overall theme of the \code{\link[=chart]{chart()}}
-\item \code{slider} A \link{logical}-value of \link{length} 1. \link{FALSE} by default. If \link{TRUE}, a \code{\link[plotly:rangeslider]{plotly::rangeslider()}} is added.
-\item \code{deficiency} A \link{logical}-value of \link{length} 1. \link{FALSE} by default. If \link{TRUE}, all \code{\link[=chart]{chart()}}-elements are colorblind friendly
-\item \code{size} A \link{numeric}-value of \link{length} 1. The relative size of the main chart. 0.6 by default. Must be between 0 and 1, non-inclusive.
+\item \code{dark} A <\link{logical}>-value of \link{length} 1. \link{TRUE} by default.
+Sets the overall theme of the \code{\link[=chart]{chart()}}
+\item \code{slider} A <\link{logical}>-value of \link{length} 1. \link{FALSE} by default.
+If \link{TRUE}, a \code{\link[plotly:rangeslider]{plotly::rangeslider()}} is added
+\item \code{deficiency} A <\link{logical}>-value of \link{length} 1. \link{FALSE} by default.
+If \link{TRUE}, all \code{\link[=chart]{chart()}}-elements are colorblind friendly
+\item \code{size} A <\link{numeric}>-value of \link{length} 1. The relative size of the
+main chart. 0.6 by default. Must be between 0 and 1, non-inclusive
}
}
+
+\subsection{Charting Events}{
+
+If \code{event_data} is passed, vertical eventlines with appropriate labels and
+coloring are added to the \code{\link[=chart]{chart()}}.
+This function is rigid, as it will fail if event, label and
+index columns are not passed.
+
+For more details please see \code{\link[=add_event]{add_event()}}.
+}
}
\examples{
-# script: scr_charting
-# date: 2023-10-25
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Charting in general
# script start;
-## charting the klines
-## with indicators as
-## subcharts
-chart(
- ticker = BTC,
- main = kline(),
- sub = list(
- volume(),
- macd()
- ),
- indicator = list(
- bollinger_bands(),
- sma(),
- alma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
- )
-)
-
-## charting the MACD-indicator
-## with klines as subcharts
-chart(
+# 1) charting weekly
+# BTC using candlesticks
+# and indicators
+cryptoQuotes::chart(
ticker = BTC,
- main = macd(),
+ main = cryptoQuotes::kline(),
sub = list(
- volume(),
- kline()
+ cryptoQuotes::volume(),
+ cryptoQuotes::macd()
),
indicator = list(
- bollinger_bands(),
- sma()
+ cryptoQuotes::bollinger_bands(),
+ cryptoQuotes::sma(),
+ cryptoQuotes::alma()
),
options = list(
- dark = TRUE,
+ dark = TRUE,
deficiency = FALSE
)
)
@@ -95,11 +99,12 @@ chart(
# script end;
}
\seealso{
-Other chart indicators:
+Other chart indicators:
\code{\link{add_event}()},
\code{\link{alma}()},
\code{\link{bollinger_bands}()},
\code{\link{dema}()},
+\code{\link{donchian_channel}()},
\code{\link{ema}()},
\code{\link{evwma}()},
\code{\link{fgi}()},
@@ -108,14 +113,16 @@ Other chart indicators:
\code{\link{macd}()},
\code{\link{rsi}()},
\code{\link{sma}()},
+\code{\link{smi}()},
\code{\link{volume}()},
\code{\link{vwap}()},
\code{\link{wma}()},
\code{\link{zlema}()}
-Other price charts:
+Other price charts:
\code{\link{kline}()},
-\code{\link{ohlc}()}
+\code{\link{ohlc}()},
+\code{\link{pline}()}
}
\author{
Serkan Korkmaz
diff --git a/man/chart_layout.Rd b/man/chart_layout.Rd
new file mode 100644
index 00000000..ef8b9792
--- /dev/null
+++ b/man/chart_layout.Rd
@@ -0,0 +1,47 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/helper.R
+\name{chart_layout}
+\alias{chart_layout}
+\title{Create a list of layout elements on subcharts}
+\usage{
+chart_layout(x, layout_element, layout_attribute)
+}
+\arguments{
+\item{x}{\link{integer}-vector of \link{length} 1.}
+
+\item{layout_element}{\link{character}-vector of \link{length} 1.
+\link[plotly:layout]{plotly::layout} elements. See example.}
+
+\item{layout_attribute}{\link{character}-vector of \link{length} 1.
+\link[plotly:layout]{plotly::layout} element value. See example.}
+}
+\value{
+A \link{list} of layout elements.
+}
+\description{
+Create a list of layout elements on subcharts
+}
+\examples{
+\dontrun{
+chart_layout(
+ x = 1:plot_list_length,
+ layout_element = "yaxis",
+ layout_attribute = list(
+ gridcolor = if (dark) "#40454c" else '#D3D3D3' # Was CCCCCC
+ )
+)
+}
+
+
+}
+\seealso{
+Other development tools:
+\code{\link{GET}()},
+\code{\link{convert_date}()},
+\code{\link{default_dates}()},
+\code{\link{fetch}()},
+\code{\link{flatten}()},
+\code{\link{is.date}()}
+}
+\concept{development tools}
+\keyword{internal}
diff --git a/man/convert_date.Rd b/man/convert_date.Rd
index 69f7e3fe..5c90ef28 100644
--- a/man/convert_date.Rd
+++ b/man/convert_date.Rd
@@ -25,6 +25,7 @@ that its a return value
\seealso{
Other development tools:
\code{\link{GET}()},
+\code{\link{chart_layout}()},
\code{\link{default_dates}()},
\code{\link{fetch}()},
\code{\link{flatten}()},
diff --git a/man/default_dates.Rd b/man/default_dates.Rd
index e3e89cdc..0979b9d0 100644
--- a/man/default_dates.Rd
+++ b/man/default_dates.Rd
@@ -7,13 +7,17 @@
default_dates(interval, from = NULL, to = NULL, length = 200, limit = NULL)
}
\arguments{
-\item{interval}{A \link{character}-vector of \link{length} 1. \verb{1d} by default. See \code{\link[=available_intervals]{available_intervals()}} for available intervals.}
+\item{interval}{A \link{character}-vector of \link{length} 1. \verb{1d} by default.
+See \code{\link[=available_intervals]{available_intervals()}} for available intervals.}
-\item{from}{An optional \link{character}, \link{date} or \link{POSIXct} vector of \link{length} 1. \link{NULL} by default.}
+\item{from}{An optional \link{character}-, \link{date}- or
+\link{POSIXct}-vector of \link{length} 1. \link{NULL} by default.}
-\item{to}{An optional \link{character}, \link{date} or \link{POSIXct} vector of \link{length} 1. \link{NULL} by default.}
+\item{to}{An optional \link{character}-, \link{date}- or
+\link{POSIXct}-vector of \link{length} 1. \link{NULL} by default.}
-\item{length}{a \link{numeric}-value of \link{length} 1. The desired distance between \code{from} and \code{to}.}
+\item{length}{a \link{numeric}-value of \link{length} 1.
+The desired distance between \code{from} and \code{to}.}
}
\value{
A vector of minimum and maximum dates.
@@ -28,6 +32,7 @@ compliance on the limits
\seealso{
Other development tools:
\code{\link{GET}()},
+\code{\link{chart_layout}()},
\code{\link{convert_date}()},
\code{\link{fetch}()},
\code{\link{flatten}()},
diff --git a/man/dema.Rd b/man/dema.Rd
index 4f351804..f15aef88 100644
--- a/man/dema.Rd
+++ b/man/dema.Rd
@@ -2,19 +2,20 @@
% Please edit documentation in R/chart_ma.R
\name{dema}
\alias{dema}
-\title{Add Double Exponential Moving Average to the chart}
+\title{Add Double Exponential Moving Average (DEMA) to the chart}
\usage{
dema(
- price = "close",
- n = 10,
- v = 1,
- wilder = FALSE,
- ratio = NULL,
- internal = list()
+ price = "close",
+ n = 10,
+ v = 1,
+ wilder = FALSE,
+ ratio = NULL,
+ ...
)
}
\arguments{
-\item{price}{A \link{character}-vector of \link{length} 1. Close by default. The name of the vector to passed into \link[TTR:MovingAverages]{TTR::DEMA}}
+\item{price}{A \link{character}-vector of \link{length} 1. "close" by default.
+The name of the vector to passed into \link[TTR:MovingAverages]{TTR::DEMA}.}
\item{n}{Number of periods to average over. Must be between 1 and
\code{nrow(x)}, inclusive.}
@@ -27,60 +28,28 @@ calculated; see notes.}
\item{ratio}{A smoothing/decay ratio. \code{ratio} overrides \code{wilder}
in \code{EMA}.}
-\item{internal}{An empty \link{list}. Used for internal purposes. Ignore.}
+\item{...}{For internal use. Please ignore.}
}
\value{
-A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object wrapped in \code{\link[rlang:expr]{rlang::expr()}}.
+A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
-A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that interacts with \link{TTR}'s moving average family of functions.
+A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that
+interacts with \link{TTR}'s moving average family of functions.
+The function adds moving average indicators to the main \code{\link[=chart]{chart()}}.
}
\examples{
-# script: scr_charting
-# date: 2023-10-25
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Charting in general
# script start;
-## charting the klines
-## with indicators as
-## subcharts
-chart(
- ticker = BTC,
- main = kline(),
- sub = list(
- volume(),
- macd()
- ),
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = kline(),
indicator = list(
- bollinger_bands(),
- sma(),
- alma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
- )
-)
-
-## charting the MACD-indicator
-## with klines as subcharts
-chart(
- ticker = BTC,
- main = macd(),
- sub = list(
- volume(),
- kline()
- ),
- indicator = list(
- bollinger_bands(),
- sma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
+ cryptoQuotes::ema(n = 7),
+ cryptoQuotes::sma(n = 14),
+ cryptoQuotes::wma(n = 21)
)
)
@@ -92,6 +61,7 @@ Other chart indicators:
\code{\link{alma}()},
\code{\link{bollinger_bands}()},
\code{\link{chart}()},
+\code{\link{donchian_channel}()},
\code{\link{ema}()},
\code{\link{evwma}()},
\code{\link{fgi}()},
@@ -100,6 +70,7 @@ Other chart indicators:
\code{\link{macd}()},
\code{\link{rsi}()},
\code{\link{sma}()},
+\code{\link{smi}()},
\code{\link{volume}()},
\code{\link{vwap}()},
\code{\link{wma}()},
@@ -111,8 +82,26 @@ Other moving average indicators:
\code{\link{evwma}()},
\code{\link{hma}()},
\code{\link{sma}()},
+\code{\link{vwap}()},
\code{\link{wma}()},
\code{\link{zlema}()}
+
+Other main chart indicators:
+\code{\link{add_event}()},
+\code{\link{alma}()},
+\code{\link{bollinger_bands}()},
+\code{\link{donchian_channel}()},
+\code{\link{ema}()},
+\code{\link{evwma}()},
+\code{\link{hma}()},
+\code{\link{sma}()},
+\code{\link{vwap}()},
+\code{\link{wma}()},
+\code{\link{zlema}()}
+}
+\author{
+Serkan Korkmaz
}
\concept{chart indicators}
+\concept{main chart indicators}
\concept{moving average indicators}
diff --git a/man/donchian_channel.Rd b/man/donchian_channel.Rd
new file mode 100644
index 00000000..fcb1929f
--- /dev/null
+++ b/man/donchian_channel.Rd
@@ -0,0 +1,90 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/chart_donchian.R
+\name{donchian_channel}
+\alias{donchian_channel}
+\title{Add Donchian Channels
+to the chart}
+\usage{
+donchian_channel(
+ n = 10,
+ include.lag = FALSE,
+ color = '#4682b4',
+ ...
+)
+}
+\arguments{
+\item{n}{Number of periods for moving average.}
+
+\item{include.lag}{Should values be lagged so that today's prices are not
+included in the calculation? See Note.}
+
+\item{color}{A \link{character}-vector of \link{length} 1. "#4682b4" by default.}
+
+\item{...}{For internal use. Please ignore.}
+}
+\value{
+An \link{invisible} \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object.
+}
+\description{
+\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
+
+A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that interacts
+with the \code{\link[TTR:DonchianChannel]{TTR::DonchianChannel()}}-function.
+The function adds Donchian Channels
+to the main \code{\link[=chart]{chart()}}.
+}
+\examples{
+# script start;
+
+# Charting BTC using
+# candlesticks as main
+# chart
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = cryptoQuotes::kline(),
+ sub = list(
+ cryptoQuotes::volume()
+ )
+)
+
+# script end;
+}
+\seealso{
+Other chart indicators:
+\code{\link{add_event}()},
+\code{\link{alma}()},
+\code{\link{bollinger_bands}()},
+\code{\link{chart}()},
+\code{\link{dema}()},
+\code{\link{ema}()},
+\code{\link{evwma}()},
+\code{\link{fgi}()},
+\code{\link{hma}()},
+\code{\link{lsr}()},
+\code{\link{macd}()},
+\code{\link{rsi}()},
+\code{\link{sma}()},
+\code{\link{smi}()},
+\code{\link{volume}()},
+\code{\link{vwap}()},
+\code{\link{wma}()},
+\code{\link{zlema}()}
+
+Other main chart indicators:
+\code{\link{add_event}()},
+\code{\link{alma}()},
+\code{\link{bollinger_bands}()},
+\code{\link{dema}()},
+\code{\link{ema}()},
+\code{\link{evwma}()},
+\code{\link{hma}()},
+\code{\link{sma}()},
+\code{\link{vwap}()},
+\code{\link{wma}()},
+\code{\link{zlema}()}
+}
+\author{
+Serkan Korkmaz
+}
+\concept{chart indicators}
+\concept{main chart indicators}
diff --git a/man/ema.Rd b/man/ema.Rd
index 2ca720db..b72b2a88 100644
--- a/man/ema.Rd
+++ b/man/ema.Rd
@@ -2,19 +2,19 @@
% Please edit documentation in R/chart_ma.R
\name{ema}
\alias{ema}
-\title{Add Exponentially Weighted Moving Average to the charts}
+\title{Add Exponentially-Weighted Moving Average (EMA) to the chart}
\usage{
ema(
- price = "Close",
- n = 10,
- wilder = FALSE,
- ratio = NULL,
- internal = list(),
- ...
+ price = "close",
+ n = 10,
+ wilder = FALSE,
+ ratio = NULL,
+ ...
)
}
\arguments{
-\item{price}{A \link{character}-vector of \link{length} 1. Close by default. The name of the vector to passed into \link[TTR:MovingAverages]{TTR::EMA}}
+\item{price}{A \link{character}-vector of \link{length} 1. "close" by default.
+The name of the vector to passed into \link[TTR:MovingAverages]{TTR::EMA}.}
\item{n}{Number of periods to average over. Must be between 1 and
\code{nrow(x)}, inclusive.}
@@ -25,62 +25,28 @@ calculated; see notes.}
\item{ratio}{A smoothing/decay ratio. \code{ratio} overrides \code{wilder}
in \code{EMA}.}
-\item{internal}{An empty \link{list}. Used for internal purposes. Ignore.}
-
-\item{...}{any other passthrough parameters}
+\item{...}{For internal use. Please ignore.}
}
\value{
-A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object wrapped in \code{\link[rlang:expr]{rlang::expr()}}.
+A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
-A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that interacts with \link{TTR}'s moving average family of functions.
+A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that
+interacts with \link{TTR}'s moving average family of functions.
+The function adds moving average indicators to the main \code{\link[=chart]{chart()}}.
}
\examples{
-# script: scr_charting
-# date: 2023-10-25
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Charting in general
# script start;
-## charting the klines
-## with indicators as
-## subcharts
-chart(
- ticker = BTC,
- main = kline(),
- sub = list(
- volume(),
- macd()
- ),
- indicator = list(
- bollinger_bands(),
- sma(),
- alma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
- )
-)
-
-## charting the MACD-indicator
-## with klines as subcharts
-chart(
- ticker = BTC,
- main = macd(),
- sub = list(
- volume(),
- kline()
- ),
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = kline(),
indicator = list(
- bollinger_bands(),
- sma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
+ cryptoQuotes::ema(n = 7),
+ cryptoQuotes::sma(n = 14),
+ cryptoQuotes::wma(n = 21)
)
)
@@ -93,6 +59,7 @@ Other chart indicators:
\code{\link{bollinger_bands}()},
\code{\link{chart}()},
\code{\link{dema}()},
+\code{\link{donchian_channel}()},
\code{\link{evwma}()},
\code{\link{fgi}()},
\code{\link{hma}()},
@@ -100,6 +67,7 @@ Other chart indicators:
\code{\link{macd}()},
\code{\link{rsi}()},
\code{\link{sma}()},
+\code{\link{smi}()},
\code{\link{volume}()},
\code{\link{vwap}()},
\code{\link{wma}()},
@@ -111,8 +79,26 @@ Other moving average indicators:
\code{\link{evwma}()},
\code{\link{hma}()},
\code{\link{sma}()},
+\code{\link{vwap}()},
+\code{\link{wma}()},
+\code{\link{zlema}()}
+
+Other main chart indicators:
+\code{\link{add_event}()},
+\code{\link{alma}()},
+\code{\link{bollinger_bands}()},
+\code{\link{dema}()},
+\code{\link{donchian_channel}()},
+\code{\link{evwma}()},
+\code{\link{hma}()},
+\code{\link{sma}()},
+\code{\link{vwap}()},
\code{\link{wma}()},
\code{\link{zlema}()}
}
+\author{
+Serkan Korkmaz
+}
\concept{chart indicators}
+\concept{main chart indicators}
\concept{moving average indicators}
diff --git a/man/evwma.Rd b/man/evwma.Rd
index f8ef2f3e..cdfbcd98 100644
--- a/man/evwma.Rd
+++ b/man/evwma.Rd
@@ -2,72 +2,43 @@
% Please edit documentation in R/chart_ma.R
\name{evwma}
\alias{evwma}
-\title{Add Elastic Volume-weighted Moving Average to the chart}
+\title{Add Elastic Volume-Weighted Moving Average (EVWMA) to the chart}
\usage{
-evwma(price = "Close", n = 10, internal = list(), ...)
+evwma(
+ price = "close",
+ n = 10,
+ ...
+)
}
\arguments{
-\item{price}{A \link{character}-vector of \link{length} 1. Close by default. The name of the vector to passed into \link[TTR:MovingAverages]{TTR::EVWMA}}
+\item{price}{A \link{character}-vector of \link{length} 1. "close" by default.
+The name of the vector to passed into \link[TTR:MovingAverages]{TTR::EVWMA}}
\item{n}{Number of periods to average over. Must be between 1 and
\code{nrow(x)}, inclusive.}
-\item{internal}{An empty \link{list}. Used for internal purposes. Ignore.}
-
-\item{...}{any other passthrough parameters}
+\item{...}{For internal use. Please ignore.}
}
\value{
-A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object wrapped in \code{\link[rlang:expr]{rlang::expr()}}.
+A \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
-A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that interacts with \link{TTR}'s moving average family of functions.
+A high-level \code{\link[plotly:add_trace]{plotly::add_lines()}}-wrapper function that
+interacts with \link{TTR}'s moving average family of functions.
+The function adds moving average indicators to the main \code{\link[=chart]{chart()}}.
}
\examples{
-# script: scr_charting
-# date: 2023-10-25
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Charting in general
# script start;
-## charting the klines
-## with indicators as
-## subcharts
-chart(
- ticker = BTC,
- main = kline(),
- sub = list(
- volume(),
- macd()
- ),
- indicator = list(
- bollinger_bands(),
- sma(),
- alma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
- )
-)
-
-## charting the MACD-indicator
-## with klines as subcharts
-chart(
- ticker = BTC,
- main = macd(),
- sub = list(
- volume(),
- kline()
- ),
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = kline(),
indicator = list(
- bollinger_bands(),
- sma()
- ),
- options = list(
- dark = TRUE,
- deficiency = FALSE
+ cryptoQuotes::ema(n = 7),
+ cryptoQuotes::sma(n = 14),
+ cryptoQuotes::wma(n = 21)
)
)
@@ -80,6 +51,7 @@ Other chart indicators:
\code{\link{bollinger_bands}()},
\code{\link{chart}()},
\code{\link{dema}()},
+\code{\link{donchian_channel}()},
\code{\link{ema}()},
\code{\link{fgi}()},
\code{\link{hma}()},
@@ -87,6 +59,7 @@ Other chart indicators:
\code{\link{macd}()},
\code{\link{rsi}()},
\code{\link{sma}()},
+\code{\link{smi}()},
\code{\link{volume}()},
\code{\link{vwap}()},
\code{\link{wma}()},
@@ -98,8 +71,26 @@ Other moving average indicators:
\code{\link{ema}()},
\code{\link{hma}()},
\code{\link{sma}()},
+\code{\link{vwap}()},
\code{\link{wma}()},
\code{\link{zlema}()}
+
+Other main chart indicators:
+\code{\link{add_event}()},
+\code{\link{alma}()},
+\code{\link{bollinger_bands}()},
+\code{\link{dema}()},
+\code{\link{donchian_channel}()},
+\code{\link{ema}()},
+\code{\link{hma}()},
+\code{\link{sma}()},
+\code{\link{vwap}()},
+\code{\link{wma}()},
+\code{\link{zlema}()}
+}
+\author{
+Serkan Korkmaz
}
\concept{chart indicators}
+\concept{main chart indicators}
\concept{moving average indicators}
diff --git a/man/examples/devtools_flatten.R b/man/examples/devtools_flatten.R
index 5bd6e753..34928576 100644
--- a/man/examples/devtools_flatten.R
+++ b/man/examples/devtools_flatten.R
@@ -1,8 +1,3 @@
-# script: flattten
-# date: 2024-03-03
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Give an example
-# of the flatten-function
# script start;
# 1) create a nested list
@@ -20,5 +15,4 @@ cryptoQuotes:::flatten(
nested_list
)
-
# script end;
diff --git a/man/examples/scr_FGIndex.R b/man/examples/scr_FGIndex.R
index 74afba10..09843b6e 100644
--- a/man/examples/scr_FGIndex.R
+++ b/man/examples/scr_FGIndex.R
@@ -1,9 +1,4 @@
\dontrun{
- # script: Fear and Greed Index
- # date: 2023-12-26
- # author: Serkan Korkmaz, serkor1@duck.com
- # objective: Retrieve and Plot the
- # index
# script start;
# 1) get the fear and greed index
diff --git a/man/examples/scr_FUN.R b/man/examples/scr_FUN.R
index d7842089..773371f0 100644
--- a/man/examples/scr_FUN.R
+++ b/man/examples/scr_FUN.R
@@ -1,16 +1,5 @@
-# script: scr_FUN
-# date: 2023-12-27
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Demonstrate the use of the convinience
-# funtions
# script start;
-# by default the Fear and Greed Index
-# is given daily. So to align these values
-# with, say, weekly candles it has to be aggregated
-#
-# In this example the built-in data are used
-
# 1) check index of BTCUSDT and
# the Fear and Greed Index
setequal(
@@ -21,8 +10,8 @@ setequal(
# 2) to align the indices,
# we use the convincience functions
# by splitting the FGI by the BTC index.
-FGIndex <- split_window(
- xts = FGIndex,
+FGIndex <- cryptoQuotes::split_window(
+ xts = cryptoQuotes::FGIndex,
by = zoo::index(BTC),
# Remove upper bounds of the
@@ -38,7 +27,7 @@ FGIndex <- split_window(
# 3) as splitWindow returns a list
# it needs to passed into calibrateWindow
# to ensure comparability
-FGIndex <- calibrate_window(
+FGIndex <- cryptoQuotes::calibrate_window(
list = FGIndex,
# As each element in the list can include
@@ -53,15 +42,12 @@ FGIndex <- calibrate_window(
# 3) check if candles aligns
# accordingly
-setequal(
- zoo::index(BTC),
- zoo::index(FGIndex)
+stopifnot(
+ setequal(
+ zoo::index(BTC),
+ zoo::index(FGIndex)
+ )
)
-# As the dates are now aligned
-# and the Fear and Greed Index being summarised by
-# the first value, the Fear and Greed Index is the opening
-# Fear and Greed Index value, at each candle.
-
# script end;
diff --git a/man/examples/scr_GET.R b/man/examples/scr_GET.R
index de18230a..4a1b3730 100644
--- a/man/examples/scr_GET.R
+++ b/man/examples/scr_GET.R
@@ -1,31 +1,25 @@
-# script: scr_GET
-# date: 2024-02-28
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: An example on how to use the GET-function
-# mostly for internal purposes
-# script start;
-
\dontrun{
+ # script start;
+
exchange <- "bybit"
futures <- FALSE
- # 1) define baseUrl
- # and endoint
+ # 1) define baseurl
base_url <- cryptoQuotes:::baseUrl(
- source = exchange,
+ source = exchange,
futures = futures
)
+ # 2) define endpoint
end_point <- cryptoQuotes:::endPoint(
source = "bybit",
futures = futures,
- type = "ohlc"
+ type = "ohlc"
)
-
- # 2) define parameters
- # that are passed into
- # GET
+ # 2) define actual
+ # parameters based on
+ # API docs
queries <- list(
symbol = "BTCUSDT",
category = "spot",
@@ -33,13 +27,12 @@
interval = "D"
)
-
# 3) perform GET request
- GET(
+ cryptoQuotes:::GET(
url = base_url,
endpoint = end_point,
query = queries
)
-}
-# script end;
+ # script end;
+}
diff --git a/man/examples/scr_LSR.R b/man/examples/scr_LSR.R
index f4c3fe86..ab3dd6ab 100644
--- a/man/examples/scr_LSR.R
+++ b/man/examples/scr_LSR.R
@@ -1,45 +1,13 @@
\dontrun{
- # Example on loading
- # long-short ratio
- # for the last days
- # on the 15 minute candle
- # wrapped in try to avoid
- # failure on Github
+ # script start;
- # 1) long-short ratio
- # on BTCUSDT pair
- ls_ratio <- cryptoQuotes::get_lsratio(
- ticker = 'BTCUSDT',
+ LS_BTC <- cryptoQuotes::get_lsratio(
+ ticker = 'BTCUSDT',
interval = '15m',
- from = Sys.Date() - 1,
- to = Sys.Date()
+ from = Sys.Date() - 1,
+ to = Sys.Date()
)
- # 2) BTCSDT in same period
- # as the long-short ratio;
- BTC <- cryptoQuotes::get_quote(
- ticker = 'BTCUSDT',
- futures = TRUE,
- interval = '15m',
- from = Sys.Date() - 1,
- to = Sys.Date()
- )
-
- # 3) plot BTCUSDT-pair
- # with long-short ratio
- cryptoQuotes::chart(
- ticker = BTC,
- main = cryptoQuotes::kline(),
- sub = list(
- cryptoQuotes::lsr(ratio = ls_ratio),
- cryptoQuotes::volume()
- ),
- indicator = list(
- cryptoQuotes::bollinger_bands()
- )
- )
+ # end of scrtipt;
}
-
-
-# end of scrtipt;
diff --git a/man/examples/scr_MAindicator.R b/man/examples/scr_MAindicator.R
new file mode 100644
index 00000000..47c2b989
--- /dev/null
+++ b/man/examples/scr_MAindicator.R
@@ -0,0 +1,13 @@
+# script start;
+
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = kline(),
+ indicator = list(
+ cryptoQuotes::ema(n = 7),
+ cryptoQuotes::sma(n = 14),
+ cryptoQuotes::wma(n = 21)
+ )
+)
+
+# script end;
diff --git a/man/examples/scr_addEvents.R b/man/examples/scr_addEvents.R
index a0deaa29..6f02c3a2 100644
--- a/man/examples/scr_addEvents.R
+++ b/man/examples/scr_addEvents.R
@@ -1,13 +1,5 @@
-# script: scr_addEvents
-# date: 2023-12-07
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Describe the usage
-# of addEvents
# script start;
-# laod library
-library(cryptoQuotes)
-
# 1) Generate random events
# of buys and sells and convert
# to data.frame
@@ -16,8 +8,11 @@ library(cryptoQuotes)
# but only base R is shown here to avoid
# too many dependencies
set.seed(1903)
-event_data <- ATOM[
- sample(1:nrow(ATOM), size = 2)
+event_data <- cryptoQuotes::ATOM[
+ sample(
+ x = 1:nrow(cryptoQuotes::ATOM),
+ size = 2
+ )
]
# 1.1) Extract the index
@@ -29,7 +24,9 @@ index <- zoo::index(
# 1.2) Convert the coredata
# into a data.frame
event_data <- as.data.frame(
- zoo::coredata(event_data)
+ zoo::coredata(
+ event_data
+ )
)
# 1.3) Add the index into the data.frame
@@ -51,28 +48,30 @@ event_data$color <- ifelse(
event_data$event == 'Buy',
yes = 'darkgrey',
no = ifelse(
- subset(event_data, event == 'Buy')$Close < subset(event_data, event == 'Sell')$Close,
- yes = 'green',
- no = 'red'
+ test = subset(
+ x = event_data,
+ event == 'Buy')$close < subset(x = event_data, event == 'Sell')$close,
+ yes = 'green',
+ no = 'red'
)
)
# 1.6) modify the event to add
# closing price at each event
event_data$event <- paste0(
- event_data$event, ' @', event_data$Close
+ event_data$event, ' @', event_data$close
)
# 2) Chart the the klines
# and add the buy and sell events
-chart(
- ticker = ATOM,
- main = kline(),
+cryptoQuotes::chart(
+ ticker = cryptoQuotes::ATOM,
+ main = cryptoQuotes::kline(),
sub = list(
- volume()
+ cryptoQuotes::volume()
),
indicator = list(
- bollinger_bands()
+ cryptoQuotes::bollinger_bands()
),
event_data = event_data,
options = list(
diff --git a/man/examples/scr_assert.R b/man/examples/scr_assert.R
index 5844b1e1..5d23cb33 100644
--- a/man/examples/scr_assert.R
+++ b/man/examples/scr_assert.R
@@ -1,101 +1,77 @@
-# script: Assert truthfullness
-# of functions
-# date: 2024-02-22
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Demonstrate the use of the error-function. This is
-# mainly for contributers, and for my future self on how to use
-# this function properly
-#
-#
-# NOTE: As these are wrapped in try
-# they are not properly formatted.
-# script start;
-
-
-# 1) unnamed assert
-# expressions
-foo <- function(
+\dontrun{
+ # script start;
+
+ # 1) unnamed assert
+ # expressions
+ foo <- function(
a,
b) {
- # assert without
- # named expressions
- cryptoQuotes:::assert(
- is.numeric(a),
- is.numeric(b)
- )
+ # assert without
+ # named expressions
+ cryptoQuotes:::assert(
+ is.numeric(a),
+ is.numeric(b)
+ )
- a + b
+ a + b
-}
+ }
-# 1.1) returns
-# the regular R error
-# messages in cli-format
-try(
+ # 1.1) returns
+ # the regular R error
+ # messages in cli-format
foo(
a = "1",
b = "2"
)
-)
-
-
-# 2) named assert
-# expressions
-foo <- function(
+ # 2) named assert
+ # expressions
+ foo <- function(
a,
b) {
- cryptoQuotes:::assert(
- "{.arg a} is not {.cls numeric}" = is.numeric(a),
- "{.arg a} is not {.cls numeric}" = is.numeric(b)
- )
-
+ cryptoQuotes:::assert(
+ "{.arg a} is not {.cls numeric}" = is.numeric(a),
+ "{.arg a} is not {.cls numeric}" = is.numeric(b)
+ )
- a + b
+ a + b
-}
+ }
-# 2.2) Returns
-# custom error-messages
-# in cli-format
-try(
+ # 2.2) Returns
+ # custom error-messages
+ # in cli-format
foo(
a = "1",
b = "2"
)
-)
-
-# 3) custom error
-# messages on
-foo <- function(
+ # 3) custom error
+ # messages on
+ foo <- function(
a) {
- cryptoQuotes:::assert(
- is.numeric(a),
- error_message = sprintf(
- fmt = "{.val %s} is not a numeric value.",
- a
+ cryptoQuotes:::assert(
+ is.numeric(a),
+ error_message = sprintf(
+ fmt = "{.val %s} is not a numeric value.",
+ a
+ )
)
- )
- a
+ a
-}
+ }
-# 2.2) Returns
-# custom error-messages with
-# passed values in cli-format
-try(
+ # 2.2) Returns
+ # custom error-messages with
+ # passed values in cli-format
foo(
a = "1"
)
-)
-
-
-
-
-# script end;
+ # script end;
+}
diff --git a/man/examples/scr_availableExchanges.R b/man/examples/scr_availableExchanges.R
index 2c9e0bd8..c7858168 100644
--- a/man/examples/scr_availableExchanges.R
+++ b/man/examples/scr_availableExchanges.R
@@ -1,11 +1,15 @@
-# script:
-# date: 2023-10-06
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective:
# script start;
-## return all
-## available exchanges
-cryptoQuotes::available_exchanges()
+# 1) available exchanges
+# on ohlc-v endpoint
+cryptoQuotes::available_exchanges(
+ type = "ohlc"
+ )
+
+# 2) available exchanges
+# on long-short ratios
+cryptoQuotes::available_exchanges(
+ type = "lsratio"
+)
# script end;
diff --git a/man/examples/scr_availableIntervals.R b/man/examples/scr_availableIntervals.R
index cb6426fb..94a43865 100644
--- a/man/examples/scr_availableIntervals.R
+++ b/man/examples/scr_availableIntervals.R
@@ -1,22 +1,20 @@
\dontrun{
- # script:
- # date: 2023-10-06
- # author: Serkan Korkmaz, serkor1@duck.com
- # objective:
# script start;
# available intervals
# at kucoin futures market
cryptoQuotes::available_intervals(
- source = 'kucoin',
- futures = TRUE
+ source = 'kucoin',
+ futures = TRUE,
+ type = "ohlc"
)
# available intervals
# at kraken spot market
cryptoQuotes::available_intervals(
- source = 'kraken',
- futures = FALSE
+ source = 'kraken',
+ futures = FALSE,
+ type = "ohlc"
)
# script end;
diff --git a/man/examples/scr_availableTickers.R b/man/examples/scr_availableTickers.R
index d3dfe3e2..34bcefb9 100644
--- a/man/examples/scr_availableTickers.R
+++ b/man/examples/scr_availableTickers.R
@@ -1,18 +1,18 @@
\dontrun{
- ## available tickers
- ## in Binance spot market
+ # 1) available tickers
+ # in Binance spot market
head(
cryptoQuotes::available_tickers(
- source = 'binance',
+ source = 'binance',
futures = FALSE
)
)
- ## available tickers
- ## on Kraken futures market
+ # 2) available tickers
+ # on Kraken futures market
head(
cryptoQuotes::available_tickers(
- source = 'kraken',
+ source = 'kraken',
futures = TRUE
)
)
diff --git a/man/examples/scr_chartFGIndex.R b/man/examples/scr_chartFGIndex.R
new file mode 100644
index 00000000..7dab24b6
--- /dev/null
+++ b/man/examples/scr_chartFGIndex.R
@@ -0,0 +1,34 @@
+\dontrun{
+ # script start;
+
+ # 1) get the fear and greed index
+ # for the last 14 days
+ FGIndex <- cryptoQuotes::get_fgindex(
+ from = Sys.Date() - 14
+ )
+
+ # 2) get the BTC price
+ # for the last 14 days
+ BTC <- cryptoQuotes::get_quote(
+ ticker = "BTCUSDT",
+ source = "bybit",
+ futures = FALSE,
+ from = Sys.Date() - 14
+ )
+
+ # 3) chart the daily BTC
+ # along side the Fear and
+ # Greed Index
+ cryptoQuotes::chart(
+ ticker = BTC,
+ main = kline(),
+ sub = list(
+ fgi(
+ FGIndex
+ )
+ )
+ )
+
+ # script end;
+}
+
diff --git a/man/examples/scr_chartLSR.R b/man/examples/scr_chartLSR.R
new file mode 100644
index 00000000..b6ee883a
--- /dev/null
+++ b/man/examples/scr_chartLSR.R
@@ -0,0 +1,37 @@
+\dontrun{
+ # script start;
+
+ # 1) long-short ratio
+ # on BTCUSDT pair
+ LS_BTC <- cryptoQuotes::get_lsratio(
+ ticker = 'BTCUSDT',
+ interval = '15m',
+ from = Sys.Date() - 1,
+ to = Sys.Date()
+ )
+
+ # 2) BTCSDT in same period
+ # as the long-short ratio;
+ BTC <- cryptoQuotes::get_quote(
+ ticker = 'BTCUSDT',
+ futures = TRUE,
+ interval = '15m',
+ from = Sys.Date() - 1,
+ to = Sys.Date()
+ )
+
+ # 3) plot BTCUSDT-pair
+ # with long-short ratio
+ cryptoQuotes::chart(
+ ticker = BTC,
+ main = cryptoQuotes::kline(),
+ sub = list(
+ cryptoQuotes::lsr(
+ ratio = LS_BTC
+ )
+ )
+ )
+
+ # end of scrtipt;
+}
+
diff --git a/man/examples/scr_charting.R b/man/examples/scr_charting.R
index 69836337..7bdb3636 100644
--- a/man/examples/scr_charting.R
+++ b/man/examples/scr_charting.R
@@ -1,45 +1,22 @@
-# script: scr_charting
-# date: 2023-10-25
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Charting in general
# script start;
-## charting the klines
-## with indicators as
-## subcharts
-chart(
+# 1) charting weekly
+# BTC using candlesticks
+# and indicators
+cryptoQuotes::chart(
ticker = BTC,
- main = kline(),
+ main = cryptoQuotes::kline(),
sub = list(
- volume(),
- macd()
+ cryptoQuotes::volume(),
+ cryptoQuotes::macd()
),
indicator = list(
- bollinger_bands(),
- sma(),
- alma()
+ cryptoQuotes::bollinger_bands(),
+ cryptoQuotes::sma(),
+ cryptoQuotes::alma()
),
options = list(
- dark = TRUE,
- deficiency = FALSE
- )
-)
-
-## charting the MACD-indicator
-## with klines as subcharts
-chart(
- ticker = BTC,
- main = macd(),
- sub = list(
- volume(),
- kline()
- ),
- indicator = list(
- bollinger_bands(),
- sma()
- ),
- options = list(
- dark = TRUE,
+ dark = TRUE,
deficiency = FALSE
)
)
diff --git a/man/examples/scr_getFundingrate.R b/man/examples/scr_getFundingrate.R
index f7652822..cd129084 100644
--- a/man/examples/scr_getFundingrate.R
+++ b/man/examples/scr_getFundingrate.R
@@ -1,24 +1,21 @@
\dontrun{
-# script: Funding Rate example
-# date: 2024-03-01
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Fetch
-# funding rate from one of the available
-# exchanges
# script start;
# 1) check available
# exchanges for funding rates
-available_exchanges(type = "fundingrate")
+cryptoQuotes::available_exchanges(
+ type = "fundingrate"
+ )
# 2) get BTC funding rate
# for the last 7 days
tail(
- BTC <- get_fundingrate(
+ BTC <- cryptoQuotes::get_fundingrate(
ticker = "BTCUSDT",
source = "binance",
from = Sys.Date() - 7
)
)
+
# script end;
}
diff --git a/man/examples/scr_getOpeninterest.R b/man/examples/scr_getOpeninterest.R
index afd6c213..788d5681 100644
--- a/man/examples/scr_getOpeninterest.R
+++ b/man/examples/scr_getOpeninterest.R
@@ -1,20 +1,16 @@
\dontrun{
- # script: Open Interest Example
- # date: 2024-03-03
- # author: Serkan Korkmaz, serkor1@duck.com
- # objective: Fetch
- # funding rate from one of the available
- # exchanges
# script start;
# 1) check available
# exchanges for open interest
- available_exchanges(type = 'interest')
+ cryptoQuotes::available_exchanges(
+ type = 'interest'
+ )
# 2) get BTC funding rate
# for the last 7 days
tail(
- BTC <- get_openinterest(
+ BTC <- cryptoQuotes::get_openinterest(
ticker = "BTCUSDT",
source = "binance",
from = Sys.Date() - 7
diff --git a/man/examples/scr_getQuote.R b/man/examples/scr_getQuote.R
index 28eebc65..62a2f498 100644
--- a/man/examples/scr_getQuote.R
+++ b/man/examples/scr_getQuote.R
@@ -1,34 +1,20 @@
\dontrun{
-# script: scr_getQuote
-# date: 2024-02-29
-# author: Serkan Korkmaz, serkor1@duck.com
-# objective: Demonstrate the basic
-# usage of the get_quote-function
-# script start;
+ # script start;
-
- # 1) Load BTC spot
- # from Kucoin with 30 minute
- # intervals
- BTC <- cryptoQuotes::get_quote(
- ticker = 'BTCUSDT',
- source = 'binance',
- interval = '30m',
- futures = FALSE,
- from = Sys.Date() - 1
- )
-
- # 2) chart the spot price
- # using the chart
- # function
- cryptoQuotes::chart(
- ticker = BTC,
- main = cryptoQuotes::kline(),
- indicator = list(
- cryptoQuotes::volume(),
- cryptoQuotes::bollinger_bands()
+ # get quote on
+ # BTCUSDT pair from
+ # Binance in 30m
+ # intervals from the
+ # last 24 hours
+ tail(
+ BTC <- cryptoQuotes::get_quote(
+ ticker = 'BTCUSDT',
+ source = 'binance',
+ interval = '30m',
+ futures = FALSE,
+ from = Sys.Date() - 1
)
)
-# script end;
+ # script end;
}
diff --git a/man/examples/scr_klinechart.R b/man/examples/scr_klinechart.R
new file mode 100644
index 00000000..f370c1dc
--- /dev/null
+++ b/man/examples/scr_klinechart.R
@@ -0,0 +1,14 @@
+# script start;
+
+# Charting BTC using
+# candlesticks as main
+# chart
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = cryptoQuotes::kline(),
+ sub = list(
+ cryptoQuotes::volume()
+ )
+)
+
+# script end;
diff --git a/man/examples/scr_ohlcchart.R b/man/examples/scr_ohlcchart.R
new file mode 100644
index 00000000..9241313d
--- /dev/null
+++ b/man/examples/scr_ohlcchart.R
@@ -0,0 +1,14 @@
+# script start;
+
+# Charting BTC using
+# OHLC-bars as main
+# chart
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = cryptoQuotes::ohlc(),
+ sub = list(
+ cryptoQuotes::volume()
+ )
+)
+
+# script end;
diff --git a/man/examples/scr_plinechart.R b/man/examples/scr_plinechart.R
new file mode 100644
index 00000000..b799e2e1
--- /dev/null
+++ b/man/examples/scr_plinechart.R
@@ -0,0 +1,14 @@
+# script start;
+
+# Charting BTC using
+# line charts with closing price
+# as main chart
+cryptoQuotes::chart(
+ ticker = BTC,
+ main = cryptoQuotes::pline(),
+ sub = list(
+ cryptoQuotes::volume()
+ )
+)
+
+# script end;
diff --git a/man/fetch.Rd b/man/fetch.Rd
index 9aa0c20d..ca415c91 100644
--- a/man/fetch.Rd
+++ b/man/fetch.Rd
@@ -7,19 +7,35 @@
fetch(ticker, source, futures, interval, type, to, from, ...)
}
\arguments{
-\item{ticker}{An \link{character}-vector of \link{length} 1. See \code{\link[=available_tickers]{available_tickers()}} for available tickers.}
+\item{ticker}{A \link{character}-vector of \link{length} 1.
+See \code{\link[=available_tickers]{available_tickers()}} for available tickers.}
-\item{source}{A \link{character}-vector of \link{length} 1. \code{binance} by default. See \code{\link[=available_exchanges]{available_exchanges()}} for available exchanges.}
+\item{source}{A \link{character}-vector of \link{length} 1. \code{binance} by default.
+See \code{\link[=available_exchanges]{available_exchanges()}} for available exchanges.}
-\item{futures}{A \link{logical}-vector of \link{length} 1. \link{TRUE} by default. Returns futures market if \link{TRUE}, spot market otherwise.}
+\item{futures}{A \link{logical}-vector of \link{length} 1. \link{TRUE} by default.
+Returns futures market if \link{TRUE}, spot market otherwise.}
-\item{interval}{A \link{character}-vector of \link{length} 1. \verb{1d} by default. See \code{\link[=available_intervals]{available_intervals()}} for available intervals.}
+\item{interval}{A \link{character}-vector of \link{length} 1. \verb{1d} by default.
+See \code{\link[=available_intervals]{available_intervals()}} for available intervals.}
-\item{type}{\link{character}-vector of length 1. See details}
+\item{type}{\link{character}-vector of \link{length} 1. One of,
+\itemize{
+\item \code{"ohlc"} - Available exchanges for Open, High, Low, Close and
+Volume market data. See the \code{\link[=get_quote]{get_quote()}}-function.
+\item \code{"lsratio"} - Available exchanges for Long-Short ratios.
+See the \code{\link[=get_lsratio]{get_lsratio()}}-function.
+\item \code{"fundingrate"} - Available exchanges for Funding rates.
+See the \code{\link[=get_fundingrate]{get_fundingrate()}}-function.
+\item \code{"interest"} - Available exchanges for Open interest on perpetual
+contracts on both sides. See the \code{\link[=get_openinterest]{get_openinterest()}}-function.
+}}
-\item{to}{An optional \link{character}, \link{date} or \link{POSIXct} vector of \link{length} 1. \link{NULL} by default.}
+\item{to}{An optional \link{character}-, \link{date}- or
+\link{POSIXct}-vector of \link{length} 1. \link{NULL} by default.}
-\item{from}{An optional \link{character}, \link{date} or \link{POSIXct} vector of \link{length} 1. \link{NULL} by default.}
+\item{from}{An optional \link{character}-, \link{date}- or
+\link{POSIXct}-vector of \link{length} 1. \link{NULL} by default.}
\item{...}{additional parameters passed down the endpoint}
}
@@ -33,12 +49,13 @@ This function is a high-level wrapper around the development tools available
and should reduce the amount of coding.
}
\details{
-This function can only be used to fetch time-based objects, and can therefore
-not be used to get, for example, \code{\link[=available_tickers]{available_tickers()}}.
+This function can only be used to fetch time-based objects,
+and can therefore not be used to get, for example, \code{\link[=available_tickers]{available_tickers()}}.
}
\seealso{
Other development tools:
\code{\link{GET}()},
+\code{\link{chart_layout}()},
\code{\link{convert_date}()},
\code{\link{default_dates}()},
\code{\link{flatten}()},
diff --git a/man/fgi.Rd b/man/fgi.Rd
index b1708a29..85b346f5 100644
--- a/man/fgi.Rd
+++ b/man/fgi.Rd
@@ -4,24 +4,26 @@
\alias{fgi}
\title{Chart the Fear and Greed Index}
\usage{
-fgi(index, internal = list())
+fgi(index, ...)
}
\arguments{
-\item{index}{The Fear and Greed Index created by \code{\link[=getFGIndex]{getFGIndex()}}}
+\item{index}{A \code{\link[xts:xts]{xts::xts()}}-object. See \code{\link[=get_fgindex]{get_fgindex()}} for more details.}
-\item{internal}{An empty \link{list}. Used for internal purposes. Ignore.}
+\item{...}{For internal use. Please ignore.}
}
\value{
-Invisbly returns a plotly object.
+An \link{invisible} \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-object.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
-The fear and greed index is a market sentiment indicator that measures investor emotions to
-gauge whether they are generally fearful (indicating potential selling pressure) or greedy (indicating potential buying enthusiasm)
+A high-level \code{\link[plotly:plot_ly]{plotly::plot_ly()}}-wrapper function.
+The function adds a subchart with the \verb{fear and greed}-index.
}
\details{
-The Fear and Greed Index goes from 0-100, and can be classifed as follows
+\subsection{Classification}{
+
+The Fear and Greed Index goes from 0-100, and can be classified as follows,
\itemize{
\item 0-24, Extreme Fear
@@ -31,20 +33,52 @@ The Fear and Greed Index goes from 0-100, and can be classifed as follows
\item 76-100, Extreme Greed
}
}
+
+\subsection{About the Fear and Greed Index}{
+
+The fear and greed index is a market sentiment indicator that measures
+investor emotions to gauge whether they are generally fearful
+(indicating potential selling pressure) or
+greedy (indicating potential buying enthusiasm).
+}
+
+\subsection{Source}{
+
+This index is fetched from
+\href{https://alternative.me/crypto/fear-and-greed-index/}{alternative.me},
+and can be different from the one provided by
+\href{https://coinmarketcap.com/charts/#fear-and-greed-index}{coinmarketcap}.
+}
+}
\examples{
\dontrun{
- # script: Fear and Greed Index
- # date: 2023-12-26
- # author: Serkan Korkmaz, serkor1@duck.com
- # objective: Retrieve and Plot the
- # index
# script start;
# 1) get the fear and greed index
- # for the last 7 days
- tail(
- fgi <- cryptoQuotes::get_fgindex(
- from = Sys.Date() - 7
+ # for the last 14 days
+ FGIndex <- cryptoQuotes::get_fgindex(
+ from = Sys.Date() - 14
+ )
+
+ # 2) get the BTC price
+ # for the last 14 days
+ BTC <- cryptoQuotes::get_quote(
+ ticker = "BTCUSDT",
+ source = "bybit",
+ futures = FALSE,
+ from = Sys.Date() - 14
+ )
+
+ # 3) chart the daily BTC
+ # along side the Fear and
+ # Greed Index
+ cryptoQuotes::chart(
+ ticker = BTC,
+ main = kline(),
+ sub = list(
+ fgi(
+ FGIndex
+ )
)
)
@@ -59,6 +93,7 @@ Other chart indicators:
\code{\link{bollinger_bands}()},
\code{\link{chart}()},
\code{\link{dema}()},
+\code{\link{donchian_channel}()},
\code{\link{ema}()},
\code{\link{evwma}()},
\code{\link{hma}()},
@@ -66,6 +101,7 @@ Other chart indicators:
\code{\link{macd}()},
\code{\link{rsi}()},
\code{\link{sma}()},
+\code{\link{smi}()},
\code{\link{volume}()},
\code{\link{vwap}()},
\code{\link{wma}()},
@@ -74,13 +110,17 @@ Other chart indicators:
Other sentiment indicators:
\code{\link{lsr}()}
-Other subcharts:
+Other subchart indicators:
\code{\link{add_event}()},
\code{\link{lsr}()},
\code{\link{macd}()},
\code{\link{rsi}()},
+\code{\link{smi}()},
\code{\link{volume}()}
}
+\author{
+Serkan Korkmaz
+}
\concept{chart indicators}
\concept{sentiment indicators}
-\concept{subcharts}
+\concept{subchart indicators}
diff --git a/man/figures/NEWS-unnamed-chunk-2-1.png b/man/figures/NEWS-unnamed-chunk-2-1.png
new file mode 100644
index 0000000000000000000000000000000000000000..40eb6491a47a921f7b5878aa610c1e8126fd993d
GIT binary patch
literal 55095
zcmZU41yEaC8!fk*V#SM7oFavyDO!RDD-OZk-Mv77QVJ9aG|<4M5V*J%C|;~7?rsH2
zahKq{L+}0Py_q+|Oqi3CbM`s=+uvSmed~*Pt)@VLOO1bAVtDWfu|FB2SoJr>?-_4GUAN?P{+D&G}^W~x|&`r5*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