Option Trades

Option Trades Ruby API Documentation

Returns all trades between start time and end time, up to seven days ago for the specified source.

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

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
opts = {
source: nil,
start_date: nil,
start_time: nil,
end_date: nil,
end_time: nil,
timezone: "UTC",
page_size: 100,
min_size: 100,
security: "AAPL",
next_page: nil
}
result = options_api.get_option_trades(opts)
pp result
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
sourceStringThe specific source of the data being requested.[optional]  
start_dateDateThe start date for the data being requested.[optional]  
start_timeStringThe start time for the data being requested.[optional]  
end_dateDateThe end date for the data being requested.[optional]  
end_timeStringThe end time for the data being requested.[optional]  
timezoneStringThe timezone the start and end date/times use.[optional] [default to UTC]  
page_sizeIntegerThe maximum number of results to return per page.[optional] [default to 100]  
min_sizeIntegerTrades must be larger or equal to this size.[optional]  
securityStringThe ticker symbol for which trades are being requested.[optional]  
next_pageStringGets the next page of data from a previous API call[optional]  

Return Type

object
Intrinio::OptionTradesResult

Properties

NameTypeDescription
next_pageStringThe token required to request the next page of the data. If null, no further results are available.  
sourceStringThe source of the trades.  
tradesArrayArray of all the trades in this page of the result.  
object
Intrinio::OptionTrades

Properties

NameTypeDescription
contractStringThe option contract  
underlying_symbolStringThe ticker symbol  
timestampDateTimeThe UTC timestamp at the time of the trade.  
priceFloatThe price of the trade.  
sizeFloatThe size of the trade.  
total_volumeFloatThe total volume of the symbol for the day up to the timestamp point in time.  
ask_price_at_executionFloatThe price of ask quote at the time of the trade.  
bid_price_at_executionFloatThe price of bid quote at the time of the trade.  
exchangeStringThe exchange for the trade.  
conditionsStringThe condition of the trade.  
sequence_idFloatThe sequential ID for the trade, ordered as temporally received from the exchange.