Created
March 31, 2024 23:22
-
-
Save zimana/fdd39331ff02eb7e6beb3be906f11db2 to your computer and use it in GitHub Desktop.
cryptoQuote
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(cryptoQuotes) | |
# | |
x <- data(ATOMUSDT) #sample data, USDT denominated ATOMS | |
# Start here to learn what is available. 5 available functions and 6 add functions in the library | |
# add functions highlight visuals | |
# Etherium ETH, Litecoin LTC, Bitcoin Cash BCH | |
# See if you can use Litecoin or Ripple(XRP). ETH is ok below for Medium article. | |
availableTickers(source = "bitmart", futures = TRUE) | |
availableIntervals(source = "binance", futures = TRUE) | |
availableExchanges() #shows what exchanges can be used | |
ETH <- getQuote(ticker = "ETHUSD", source="bitmart", futures = T, interval = "4h", from = '2024-02-01', to = '2024-03-01') | |
chart(chart = kline(ETH)) | |
chart(chart = ohlc(ETH)) | |
chart(chart = ohlc(ETH)|> | |
addVolume()) | |
chart(chart = ohlc(ETH)|> | |
addBBands()) # Bolinger bands (plot, cols = c("High,"Low","Close")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment