Option Trades By Contract

Option Trades By Contract Python API Documentation

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

API Class:
OptionsApi
Instance Method:
get_option_trades_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 = 'AAPL__261218C00230000'
source = ''
start_date = ''
start_time = ''
end_date = ''
end_time = ''
timezone = 'UTC'
page_size = 100
min_size = 100
next_page = ''
response = intrinio.OptionsApi().get_option_trades_by_contract(identifier, source=source, start_date=start_date, start_time=start_time, end_date
  =end_date, end_time=end_time, timezone=timezone, page_size=page_size, min_size=min_size, next_page=next_page)
print(response)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierstrThe option contract for which trades are being requested. 
sourcestrThe specific source of the data being requested.[optional]  
start_datedateThe start date for the data being requested.[optional]  
start_timestrThe start time for the data being requested.[optional]  
end_datedateThe end date for the data being requested.[optional]  
end_timestrThe end time for the data being requested.[optional]  
timezonestrThe timezone the start and end date/times use.[optional] [default to UTC]  
page_sizeintThe maximum number of results to return per page.[optional] [default to 100]  
min_sizeintTrades must be larger or equal to this size.[optional]  
next_pagestrGets the next page of data from a previous API call[optional]  


Return Type

object
OptionTradesResult

Properties

NameTypeDescription
next_pagestrThe token required to request the next page of the data. If null, no further results are available.  
sourcestrThe source of the trades.  
tradeslist[OptionTrades]Array of all the trades in this page of the result.  
object
OptionTrades

Properties

NameTypeDescription
contractstrThe option contract  
underlying_symbolstrThe 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.  
exchangestrThe exchange for the trade.  
conditionsstrThe condition of the trade.  
sequence_idfloatThe sequential ID for the trade, ordered as temporally received from the exchange.