get_options_data {eodhd} | R Documentation |
Get options data
Description
This function retrieves options data from the API.
Usage
get_options_data(
api_token,
symbol,
date_to = NULL,
date_from = NULL,
trade_date_to = NULL,
trade_date_from = NULL,
contract_name = NULL
)
Arguments
api_token |
The API token for authentication. |
symbol |
Required - Could be any supported symbol. No default value. |
date_to |
date from with format Y-m-d |
date_from |
date from with format Y-m-d |
trade_date_to |
date from with format Y-m-d |
trade_date_from |
date from with format Y-m-d |
contract_name |
Name of a particular contract. |
Value
A list containing options data.
Examples
api_token <- "demo"
symbol <- "AAPL.US"
date_to <- "2017-09-10"
date_from <- "2017-09-12"
trade_date_to <- "2010-05-15"
trade_date_from <- "2010-05-16"
contract_name <- "AAPL230818C00055000"
result <- get_options_data(api_token, date_to, date_from, trade_date_to,
trade_date_from, contract_name)
[Package eodhd version 1.0.4 Index]