Options Intervals By Contract

Options Intervals By Contract Ruby API Documentation

Returns a list of interval data points for a contract.

API Class:
Intrinio::OptionsApi
Instance Method:
get_options_interval_by_contract()

Stock Price Code Example

Use my API Key
# Load the gem
require 'intrinio-sdk'
require 'pp'
# Setup authorization
Intrinio.configure do |config|
config.api_key['api_key'] = 'YOUR_API_KEY'
config.allow_retries = true
end
options_api = Intrinio::OptionsApi.new
identifier = "SPY___230103P00380000"
interval_size = "5m"
opts = {
source: nil,
page_size: 100,
end_time: DateTime.parse(nil)
}
result = options_api.get_options_interval_by_contract(identifier, interval_size, opts)
pp result
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierStringThe Intrinio ID or code of the options contract to request intervals for. 
interval_sizeStringThe time length of the interval. 
sourceStringRealtime or 15-minute delayed contracts.[optional]  
page_sizeIntegerThe number of results to return[optional] [default to 100]  
end_timeDateTimeThe inclusive UTC date and time the intervals end at.[optional]  

Return Type

object
Intrinio::OptionIntervalsResult

Properties

NameTypeDescription
intervalsArrayArray of all the intervals in the result.  
contractStringThe option contract for the intervals  
sizeStringThe size of the time span for the interval.  
object
Intrinio::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