powered by
Wrapper for API Get candlesticks and Get candlesticks history.
get_history_candles( api_key, secret_key, passphrase, bar = c("1m", "3m", "5m", "15m", "30m", "1H", "4H", "6H", "12H", "1D", "2D", "3D"), count, instId, ... )
Candlestick charts data
Okx API key.
Okx API secret key.
Okx API passphrase.
Bar size, the default is 1m, e.g. 1m/3m/5m/15m/30m/1H/2H/4H, Hong Kong time opening price k-line: 6H/12H/1D/2D/3D.
Number of Bars.
Instrument ID, e.g. BTC-USDT-SWAP.
Other request parameters to be passed, See Get candlesticks history for more information.
if (FALSE) { candles <- get_history_candles( api_key, secret_key, passphrase, bar = "1m", count = 24*60, instId = "CFX-USDT-SWAP" ) }
Run the code above in your browser using DataLab