Options Intervals By Contract

Options Intervals By Contract Python API Documentation

Returns a list of interval data points for a contract.

API Class:
OptionsApi
Instance Method:
get_options_interval_by_contract()

Stock Price Code Example

Use my API Key
from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException
intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)
identifier = 'SPY___230103P00380000'
interval_size = '5m'
source = ''
page_size = 100
end_time = ''
response = intrinio.OptionsApi().get_options_interval_by_contract(identifier, interval_size, source=source, page_size=page_size, end_time=end_time)
print(response)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierstrThe Intrinio ID or code of the options contract to request intervals for. 
interval_sizestrThe time length of the interval. 
sourcestrRealtime or 15-minute delayed contracts.[optional]  
page_sizeintThe number of results to return[optional] [default to 100]  
end_timedatetimeThe inclusive UTC date and time the intervals end at.[optional]  


Return Type

object
OptionIntervalsResult

Properties

NameTypeDescription
intervalslist[OptionInterval]Array of all the intervals in the result.  
contractstrThe option contract for the intervals  
sizestrThe size of the time span for the interval.  
object
OptionInterval

Properties

NameTypeDescription
open_timedatetimeThe UTC timestamp for the time this interval opened.  
close_timedatetimeThe UTC timestamp for the time this interval closed.  
openfloatThe first traded contract price in this interval.  
highfloatThe highest traded contract price in this interval.  
lowfloatThe lowest traded contract price in this interval.  
closefloatThe last traded contract price in this interval.  
volumefloatThe volume of contracts traded in this interval.  
averagefloatThe volume weighted average price of contract trades in this interval.  
changefloatThe ratio of Close minus Open to Open.  
trade_countfloatThe number of qualified trades executed during the period