Introduction
This API call is used to retrieve the daily history of one optionsymbol. The optionsymbol is identified by the underlying asset, strike price, expiration date, and option type. The API call takes in these parameters and returns the daily history of the optionsymbol for each trading day up to the maximum date specified. The data returned includes information such as the bid, ask, open price, high price, low price, last price, volume, open interest, delta, gamma, theta, vega, implied volatility, and other relevant information for the optionsymbol. The data can be returned in either JSON or CSV format.
Endpoint
/optionsymbol-history/:underlying/:strike/:expiration/:optiontype/:maxDate/:formatParameters
- underlying (string, required) – The symbol of the underlying asset.
- strike (float, required) – The strike price of the option.
- expiration (date, required) – The expiration date of the option. Format: ‘yyyy-mm-dd’.
- optiontype (string, required) – The type of the option. Valid options: ‘call’ or ‘put’.
- maxDate (date, required) – The maximum date for the option data to be included. Format: ‘yyyy-mm-dd’.
- format (string, required) – The format to return the data in. Valid options: ‘json’ or ‘csv’.
Examples
List of several example calls, URLs, and responses to show users how to interact with the API call. These examples should include a variety of input parameters to demonstrate the different scenarios that the API call can handle.
- https://api.deltaneutral.net/optionsymbol-history/META/200/2024-02-16/call/2023-04-22/json?apikey=DEMOAPIKEY
- https://api.deltaneutral.net/optionsymbol-history/TSLA/300/2023-06-16/put/2023-06-16/json?apikey=DEMOAPIKEY
Related Calls
None
Error Handling
If no data comes back, please check for valid input parameters.
Additional Information
In order to get recent data, you must have a valid APIKEY authentication key.
Example Response
{
"quotedate": "2023-04-10T16:00:00.000Z",
"optionsymbol": "META240216C00200000",
"underlying": "META",
"underlying_last": 214.75,
"option_type": "call",
"strike": 200,
"expiration": "2024-02-16T00:00:00.000Z",
"bid": 46.15,
"ask": 46.95,
"openp": 46.35,
"highp": 46.35,
"lowp": 46.35,
"last_price": 46.35,
"volume": 1,
"openinterest": 233,
"delta": 0.6675,
"gamma": 0.0038,
"theta": -22.7425,
"vega": 70.5875,
"iv": 0.4773,
"IVBid": 0.4716,
"IVAsk": 0.4829
}