Package can be installed by running:
remotes::install_github("bt-koch/ivolR")
First, declare API key as environment variable named IVOLATILITY_API_KEY
in
.Renviron
. You can do this manually or use utility from ivolR
:
ivolR::set_apikey(your_key)
This will automatically save your API key in the .Renviron
-file (or creates one
if it not yet exists) and by default restarts R
.
Now everything is set up to request data from the ivolatility.com
API via the ivolR::request()
function.
Please consult the API documentation to see which endpoints are available and which parameters are required and optional.
The endpoints can be requested by running:
ivolR::request(endpoint = "/equities/underlying-info", symbol="AAPL")
Please consult function documentation to see furhter options to modify the request.