Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding cryptocurrency data via cryptoQuotes #244

Open
serkor1 opened this issue May 17, 2024 · 0 comments
Open

Adding cryptocurrency data via cryptoQuotes #244

serkor1 opened this issue May 17, 2024 · 0 comments

Comments

@serkor1
Copy link

serkor1 commented May 17, 2024

Hi,

I am the maintainer of the cryptoQuotes-package (See repository). Is there any interest in incorporating cryptocurrency market data into tidyquant?

The package features multiple exchanges which is also accessible in the US. Below is a MWE for OHLC-V data,

library(cryptoQuotes)

# 1) extract daily
# Bitcoin price
BTC <- get_quote(
  ticker   = "BTCUSDT",
  source   = "bybit",
  futures  = FALSE,
  interval = "1d"
)

# 2) check class
class(BTC)
#> [1] "xts" "zoo"

# 3) print latest
# values
tail(BTC)
#>                         open     high      low    close    volume
#> 2024-05-12 02:00:00 60834.11 61891.49 60603.69 61478.29  6539.214
#> 2024-05-13 02:00:00 61478.29 63468.56 60750.00 62932.71 17247.863
#> 2024-05-14 02:00:00 62932.71 63113.25 61101.00 61574.29 14601.272
#> 2024-05-15 02:00:00 61574.29 66458.49 61337.16 66211.22 18387.695
#> 2024-05-16 02:00:00 66211.22 66769.85 64600.00 65242.59 15990.049
#> 2024-05-17 02:00:00 65242.59 65887.76 65102.17 65485.62  1823.698

Created on 2024-05-17 with reprex v2.1.0

The package follows the same structure as quantmod with some deviation in the naming convention and returned index.

Best,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant