candles {limexhub} | R Documentation |
Get Candlestick Data
Description
Retrieves historical candlestick data for a given stock symbol within the specified date range. The API token is retrieved from an environment variable 'LIMEX_API_TOKEN'.
Usage
candles(symbol = "AAPL", from = "2023-07-31", to = Sys.Date(), timeframe = 3)
Arguments
symbol |
Stock symbol to fetch candlestick data for. |
from |
Starting date for the candlestick data in 'YYYY-MM-DD' format. |
to |
Ending date for the candlestick data in 'YYYY-MM-DD' format. |
timeframe |
Timeframe, min - 1, hour - 2, day - 3, week - 3, month - 5 |
Value
A data frame containing the candlestick data if the request was successful, NULL otherwise.
Examples
## Not run:
candles_data <- candles(symbol = "BRX", from = "2023-07-31", to = "2023-08-24")
## End(Not run)
[Package limexhub version 0.1.5 Index]