-
Notifications
You must be signed in to change notification settings - Fork 24
Usecase
Serkan Korkmaz edited this page Mar 23, 2024
·
25 revisions
The main usecase of the cryptoQuotes
-package is the available
get_
-functions. Below is a basic example of retrieving the daily price
of Bitcoin.
## 1) get BTC
## on the daily
BTC <- cryptoQuotes::get_quote(
ticker = "BTCUSDT",
source = "binance",
futures = FALSE,
from = Sys.Date() - 14
)
## 2) get fear and greed
## index of the general
## cryptocurrency market
fg_index <- cryptoQuotes::get_fgindex(
from = Sys.Date() - 14
)
All the returned objects are xts
-objects.
quantmod::chartSeries(
x = BTC
)
#> Registered S3 method overwritten by 'quantmod':
#> method from
#> as.zoo.data.frame zoo
Last updated 2024-07-05