View source: R/major/ftx_ohlcv.R View source: R/ftx_ohlcv.R
ftx_ohlcv | R Documentation |
FTX OHLCV snapshots
ftx_ohlcv( pairs = c("BTC/USD", "USD:USD", "SOL/USD", "LUNA/USD")[1], origin = as.POSIXlt(Sys.time(), tz = "UTC") - 30, timeframe = c("15s", "1m", "5m", "15m", "1h", "4h", "1d", "3d", "1w", "2w", "1M")[1], limit = 2L, ftx = ftx )
pairs |
character vector of pairs of coins |
origin |
POSIXlt (not as.POSIXct) - start datetime |
timeframe |
single character vector of time steps |
limit |
number of timesteps |
ftx |
pointer to a ccxt exchange |
a tibble of ohlcv snapshots by coin, by datetime.
medium.com/alphaimpact/how-to-link-your-ftx-com-api-keys-so-you-can-copy-trades-or-be-copied-9-simple-steps-172372888034
# Connection to FTX api (requires key/secret) ftx = reticulate::import('ccxt')$ftx( list( enableRateLimit = "True", apiKey = Sys.getenv('FTX_key'), secret = Sys.getenv('FTX_secret')) ) ftx_ohlcv ( pairs = c('BTC/USD'), # pairs of coins origin = as.POSIXlt(Sys.time(), tz = "UTC") - 30*60, # start 30 mins ago timeframe = c("15s"), # 15 sec timesteps limit = 2L, # two timesteps ftx = ftx) # FTX pointer via reticulate::import('ccxt')$ftx
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.