get_history_candles {okxAPI} | R Documentation |
Retrieve the candlestick charts
Description
Wrapper for API Get candlesticks and Get candlesticks history.
Usage
get_history_candles(
api_key,
secret_key,
passphrase,
bar = c("1m", "3m", "5m", "15m", "30m", "1H", "4H", "6H", "12H", "1D", "2D", "3D"),
count,
instId,
...
)
Arguments
api_key |
Okx API key. |
secret_key |
Okx API secret key. |
passphrase |
Okx API passphrase. |
bar |
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. |
count |
Number of Bars. |
instId |
Instrument ID, e.g. BTC-USDT-SWAP. |
... |
Other request parameters to be passed, See Get candlesticks history for more information. |
Value
Candlestick charts data
Examples
## Not run:
candles <- get_history_candles(
api_key, secret_key, passphrase, bar = "1m",
count = 24*60, instId = "CFX-USDT-SWAP"
)
## End(Not run)
[Package okxAPI version 0.1.1 Index]