Intrinio::OptionsApi

All URIs are relative to https://api-v2.intrinio.com

Method HTTP request Description
get_all_options_tickers GET /options/tickers Options Tickers
get_option_expirations_realtime GET /options/expirations/symbol/realtime Options Expirations
get_option_strikes_realtime GET /options/strikes/symbol/strike/realtime Option Strikes Realtime
get_options GET /options/symbol Options
get_options_by_symbol_realtime GET /options/symbol/realtime Options by Symbol Realtime
get_options_chain GET /options/chain/symbol/expiration Options Chain
get_options_chain_eod GET /options/chain/symbol/expiration/eod Options Chain EOD
get_options_chain_realtime GET /options/chain/symbol/expiration/realtime Options Chain Realtime
get_options_expirations GET /options/expirations/symbol Options Expirations
get_options_expirations_eod GET /options/expirations/symbol/eod Options Expirations
get_options_interval_by_contract GET /options/interval/identifier Options Intervals By Contract
get_options_interval_movers GET /options/interval/movers Options Intervals Movers
get_options_interval_movers_change GET /options/interval/movers/change Options Intervals Movers By Change
get_options_interval_movers_volume GET /options/interval/movers/volume Options Intervals Movers By Volume
get_options_prices GET /options/prices/identifier Option Prices
get_options_prices_batch_realtime POST /options/prices/realtime/batch Option Prices Batch Realtime
get_options_prices_eod GET /options/prices/identifier/eod Option Prices EOD
get_options_prices_realtime GET /options/prices/identifier/realtime Option Prices Realtime
get_options_snapshots GET /options/snapshots Option Prices Realtime Snapshot
get_options_stats_realtime GET /options/prices/identifier/realtime/stats Option Stats Realtime
get_unusual_activity GET /options/unusual_activity/symbol Options Unusual Activity
get_unusual_activity_intraday GET /options/unusual_activity/symbol/intraday Options Unusual Activity Intraday
get_unusual_activity_universal GET /options/unusual_activity Options Unusual Activity Universal
get_unusual_activity_universal_intraday GET /options/unusual_activity/intraday Options Unusual Activity Universal Intraday

get_all_options_tickers

View Intrinio API Documentation

ApiResponseOptionsTickers get_all_options_tickers

Options Tickers

Returns all tickers that have existing options contracts.

Example

# 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
result = options_api.get_all_options_tickers
pp result

Parameters

This endpoint does not need any parameter.

Return type

ApiResponseOptionsTickers

get_option_expirations_realtime

View Intrinio API Documentation

ApiResponseOptionsExpirations get_option_expirations_realtime(symbol, opts)

Options Expirations

Returns a list of all current and upcoming option contract expiration dates for a particular symbol.

Example

# 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
symbol = "MSFT"

opts = {
  after: "2022-01-01",
  before: "2023-04-01",
  source: nil
}

result = options_api.get_option_expirations_realtime(symbol, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
after String Return option contract expiration dates after this date. [optional]  
before String Return option contract expiration dates before this date. [optional]  
source String Realtime or 15-minute delayed contracts. [optional]  

Return type

ApiResponseOptionsExpirations

get_option_strikes_realtime

View Intrinio API Documentation

ApiResponseOptionsChainRealtime get_option_strikes_realtime(symbol, strike, opts)

Option Strikes Realtime

Returns a list of the latest top of the order book size and premium (bid / ask), the latest trade size and premium as well as the greeks and implied volatility for all call/put contracts that match the strike and symbol specified.

Example

# 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
symbol = "MSFT"
strike = 95

opts = {
  source: nil,
  stock_price_source: nil,
  model: nil,
  show_extended_price: nil
}

result = options_api.get_option_strikes_realtime(symbol, strike, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
strike Float The strike price of the option contract. This will return options contracts with strike price equal to this price.  
source String Realtime or delayed. [optional]  
stock_price_source String Source for underlying price for calculating Greeks. [optional]  
model String Model for calculating Greek values. Default is black_scholes. [optional]  
show_extended_price BOOLEAN Whether to include open close high low type fields. [optional]  

Return type

ApiResponseOptionsChainRealtime

get_options

View Intrinio API Documentation

ApiResponseOptions get_options(symbol, opts)

Options

Returns a list of all securities that have options listed and are tradable on a US market exchange. Useful to retrieve the entire universe. Available via a 3rd party, contact sales for a trial.

Example

# 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
symbol = "AAPL"

opts = {
  type: "put",
  strike: 170,
  strike_greater_than: 150,
  strike_less_than: 190,
  expiration: "2019-03-01",
  expiration_after: "2019-01-01",
  expiration_before: "2019-12-31",
  page_size: 100,
  next_page: nil
}

result = options_api.get_options(symbol, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
type String The option contract type. [optional]  
strike Float The strike price of the option contract. This will return options contracts with strike price equal to this price. [optional]  
strike_greater_than Float The strike price of the option contract. This will return options contracts with strike prices greater than this price. [optional]  
strike_less_than Float The strike price of the option contract. This will return options contracts with strike prices less than this price. [optional]  
expiration String The expiration date of the option contract. This will return options contracts with expiration dates on this date. [optional]  
expiration_after String The expiration date of the option contract. This will return options contracts with expiration dates after this date. [optional]  
expiration_before String The expiration date of the option contract. This will return options contracts with expiration dates before this date. [optional]  
page_size Integer The number of results to return [optional] [default to 100]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseOptions

get_options_by_symbol_realtime

View Intrinio API Documentation

ApiResponseOptionsRealtime get_options_by_symbol_realtime(symbol, opts)

Options by Symbol Realtime

Returns a list of all securities that have options listed and are tradable on a US market exchange. Useful to retrieve the entire universe.

Example

# 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
symbol = "AAPL"

opts = {
  type: "put",
  strike: 170,
  strike_greater_than: 150,
  strike_less_than: 190,
  expiration: "2022-04-16",
  expiration_after: "2022-01-01",
  expiration_before: "2023-12-31",
  source: nil
}

result = options_api.get_options_by_symbol_realtime(symbol, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
type String The option contract type. [optional]  
strike Float The strike price of the option contract. This will return options contracts with strike price equal to this price. [optional]  
strike_greater_than Float The strike price of the option contract. This will return options contracts with strike prices greater than this price. [optional]  
strike_less_than Float The strike price of the option contract. This will return options contracts with strike prices less than this price. [optional]  
expiration String The expiration date of the option contract. This will return options contracts with expiration dates on this date. [optional]  
expiration_after String The expiration date of the option contract. This will return options contracts with expiration dates after this date. [optional]  
expiration_before String The expiration date of the option contract. This will return options contracts with expiration dates before this date. [optional]  
source String Realtime or 15-minute delayed contracts. [optional]  

Return type

ApiResponseOptionsRealtime

get_options_chain

View Intrinio API Documentation

ApiResponseOptionsChain get_options_chain(symbol, expiration, opts)

Options Chain

Returns a list of the historical end-of-day top of the order book size and premium (bid / ask), the latest trade size and premium as well as the greeks and implied volatility for all option contracts currently associated with the option chain. Available via a 3rd party, contact sales for a trial.

Example

# 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
symbol = "MSFT"
expiration = "2019-04-05"

opts = {
  date: nil,
  type: nil,
  strike: nil,
  strike_greater_than: nil,
  strike_less_than: nil,
  moneyness: nil,
  page_size: 100
}

result = options_api.get_options_chain(symbol, expiration, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
expiration String The expiration date of the options contract  
date Date The date of the option price. Returns option prices on this date. [optional]  
type String The option contract type. [optional]  
strike Float The strike price of the option contract. This will return options contracts with strike price equal to this price. [optional]  
strike_greater_than Float The strike price of the option contract. This will return options contracts with strike prices greater than this price. [optional]  
strike_less_than Float The strike price of the option contract. This will return options contracts with strike prices less than this price. [optional]  
moneyness String The moneyness of the options contracts to return. 'all' will return all options contracts. 'in_the_money' will return options contracts that are in the money (call options with strike prices below the current price, put options with strike prices above the current price). 'out_of_they_money' will return options contracts that are out of the money (call options with strike prices above the current price, put options with strike prices below the current price). 'near_the_money' will return options contracts that are $0.50 or less away from being in the money. [optional]  
page_size Integer The number of results to return [optional] [default to 100]  

Return type

ApiResponseOptionsChain

get_options_chain_eod

View Intrinio API Documentation

ApiResponseOptionsChainEod get_options_chain_eod(symbol, expiration, opts)

Options Chain EOD

Returns all EOD options contracts and their prices for the given symbol and expiration date.

Example

# 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
symbol = "AAPL"
expiration = "2023-01-20"

opts = {
  type: nil,
  strike: nil,
  strike_greater_than: nil,
  strike_less_than: nil,
  date: nil
}

result = options_api.get_options_chain_eod(symbol, expiration, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
expiration String The expiration date of the options contract  
type String The option contract type. [optional]  
strike Float The strike price of the option contract. This will return options contracts with strike price equal to this price. [optional]  
strike_greater_than Float The strike price of the option contract. This will return options contracts with strike prices greater than this price. [optional]  
strike_less_than Float The strike price of the option contract. This will return options contracts with strike prices less than this price. [optional]  
date Date The date to retrieve prices for [optional]  

Return type

ApiResponseOptionsChainEod

get_options_chain_realtime

View Intrinio API Documentation

ApiResponseOptionsChainRealtime get_options_chain_realtime(symbol, expiration, opts)

Options Chain Realtime

Returns a list of the latest National Best Bid & Offer (NBBO) top of the order book size and premium (bid / ask), the latest trade size and premium as well as the greeks and implied volatility for all option contracts currently associated with the option chain.

Example

# 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
symbol = "MSFT"
expiration = "2023-01-20"

opts = {
  source: nil,
  type: nil,
  strike: nil,
  strike_greater_than: nil,
  strike_less_than: nil,
  volume_greater_than: nil,
  volume_less_than: nil,
  open_interest_greater_than: nil,
  open_interest_less_than: nil,
  moneyness: nil,
  stock_price_source: nil,
  model: nil,
  show_extended_price: nil
}

result = options_api.get_options_chain_realtime(symbol, expiration, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
expiration String The expiration date of the options contract  
source String Realtime or 15-minute delayed contracts. [optional]  
type String The option contract type. [optional]  
strike Float The strike price of the option contract. This will return options contracts with strike price equal to this price. [optional]  
strike_greater_than Float The strike price of the option contract. This will return options contracts with strike prices greater than this price. [optional]  
strike_less_than Float The strike price of the option contract. This will return options contracts with strike prices less than this price. [optional]  
volume_greater_than Float The volume of the option contract. This will return options contracts with volumes greater than this amount. [optional]  
volume_less_than Float The volume of the option contract. This will return options contracts with volumes less than this amout. [optional]  
open_interest_greater_than Float The open interest of the option contract. This will return options contracts with open interest greater than this amount. [optional]  
open_interest_less_than Float The open interest of the option contract. This will return options contracts with open interest less than this amount. [optional]  
moneyness String The moneyness of the options contracts to return. 'all' will return all options contracts. 'in_the_money' will return options contracts that are in the money (call options with strike prices below the current price, put options with strike prices above the current price). 'out_of_they_money' will return options contracts that are out of the money (call options with strike prices above the current price, put options with strike prices below the current price). 'near_the_money' will return options contracts that are $0.50 or less away from being in the money. Requires subscription to realtime stock price data. [optional]  
stock_price_source String Source for underlying price for calculating Greeks. [optional]  
model String Model for calculating Greek values. Default is black_scholes. [optional]  
show_extended_price BOOLEAN Whether to include open close high low type fields. [optional]  

Return type

ApiResponseOptionsChainRealtime

get_options_expirations

View Intrinio API Documentation

ApiResponseOptionsExpirations get_options_expirations(symbol, opts)

Options Expirations

Returns a list of all current and upcoming option contract expiration dates for a particular symbol. Available via a 3rd party, contact sales for a trial.

Example

# 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
symbol = "MSFT"

opts = {
  after: "2019-01-01",
  before: "2019-12-31"
}

result = options_api.get_options_expirations(symbol, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
after String Return option contract expiration dates after this date. [optional]  
before String Return option contract expiration dates before this date. [optional]  

Return type

ApiResponseOptionsExpirations

get_options_expirations_eod

View Intrinio API Documentation

ApiResponseOptionsExpirations get_options_expirations_eod(symbol, opts)

Options Expirations

Returns a list of all current and upcoming option contract expiration dates for a particular symbol.

Example

# 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
symbol = "MSFT"

opts = {
  after: "2019-01-01",
  before: "2019-12-31"
}

result = options_api.get_options_expirations_eod(symbol, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
after String Return option contract expiration dates after this date. [optional]  
before String Return option contract expiration dates before this date. [optional]  

Return type

ApiResponseOptionsExpirations

get_options_interval_by_contract

View Intrinio API Documentation

OptionIntervalsResult get_options_interval_by_contract(identifier, interval_size, opts)

Options Intervals By Contract

Returns a list of interval data points for a contract.

Example

# 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

Parameters

Name Type Description Notes
identifier String The Intrinio ID or code of the options contract to request intervals for.  
interval_size String The time length of the interval.  
source String Realtime or 15-minute delayed contracts. [optional]  
page_size Integer The number of results to return [optional] [default to 100]  
end_time DateTime The inclusive UTC date and time the intervals end at. [optional]  

Return type

OptionIntervalsResult

get_options_interval_movers

View Intrinio API Documentation

OptionIntervalsMoversResult get_options_interval_movers(opts)

Options Intervals Movers

Returns a list of intervals for the biggest movers over the last hour interval.

Example

# 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,
  open_time: DateTime.parse(nil)
}

result = options_api.get_options_interval_movers(opts)
pp result

Parameters

Name Type Description Notes
source String Realtime or 15-minute delayed contracts. [optional]  
open_time DateTime The inclusive UTC date and time the interval opens at. [optional]  

Return type

OptionIntervalsMoversResult

get_options_interval_movers_change

View Intrinio API Documentation

OptionIntervalsMoversResult get_options_interval_movers_change(opts)

Options Intervals Movers By Change

Returns a list of intervals for the biggest movers by change over the last hour interval.

Example

# 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,
  open_time: DateTime.parse(nil)
}

result = options_api.get_options_interval_movers_change(opts)
pp result

Parameters

Name Type Description Notes
source String Realtime or 15-minute delayed contracts. [optional]  
open_time DateTime The inclusive UTC date and time the interval opens at. [optional]  

Return type

OptionIntervalsMoversResult

get_options_interval_movers_volume

View Intrinio API Documentation

OptionIntervalsMoversResult get_options_interval_movers_volume(opts)

Options Intervals Movers By Volume

Returns a list of intervals for the biggest movers by volume over the last hour interval.

Example

# 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,
  open_time: DateTime.parse(nil)
}

result = options_api.get_options_interval_movers_volume(opts)
pp result

Parameters

Name Type Description Notes
source String Realtime or 15-minute delayed contracts. [optional]  
open_time DateTime The inclusive UTC date and time the interval opens at. [optional]  

Return type

OptionIntervalsMoversResult

get_options_prices

View Intrinio API Documentation

ApiResponseOptionPrices get_options_prices(identifier, opts)

Option Prices

Returns all price data from inception to expiration for a particular contract.

Example

# 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 = "MSFT190405C00118000"

opts = {
  start_date: "2019-01-01",
  end_date: "2019-12-31",
  page_size: 100,
  next_page: nil
}

result = options_api.get_options_prices(identifier, opts)
pp result

Parameters

Name Type Description Notes
identifier String The Intrinio ID or code of the options contract to request prices for.  
start_date String Return option contract prices on or after this date. [optional]  
end_date String Return option contract prices on or before this date. [optional]  
page_size Integer The number of results to return [optional] [default to 100]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseOptionPrices

get_options_prices_batch_realtime

View Intrinio API Documentation

ApiResponseOptionsPricesBatchRealtime get_options_prices_batch_realtime(body, opts)

Option Prices Batch Realtime

Returns a list of latest price data for up to 250 option contracts per request.

Example

# 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
body = {
  contracts: [
    "A220121P00055000",
    "A220121P00057500",
    "A220121P00060000"
  ]
}

opts = {
  source: nil,
  show_stats: nil,
  stock_price_source: nil,
  model: nil,
  show_extended_price: nil
}

result = options_api.get_options_prices_batch_realtime(body, opts)
pp result

Parameters

Name Type Description Notes
body OptionContractsList The contract symbols for which to return options prices for.  
source String Realtime or 15-minute delayed contracts. [optional]  
show_stats BOOLEAN Whether to include Greek calculations or not. [optional]  
stock_price_source String Source for underlying price for calculating Greeks. [optional]  
model String Model for calculating Greek values. Default is black_scholes. [optional]  
show_extended_price BOOLEAN Whether to include open close high low type fields. [optional]  

Return type

ApiResponseOptionsPricesBatchRealtime

get_options_prices_eod

View Intrinio API Documentation

ApiResponseOptionsPricesEod get_options_prices_eod(identifier, opts)

Option Prices EOD

Returns all option prices for a given option contract identifier.

Example

# 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 = "AAPL230616P00190000"

opts = {
  next_page: nil,
  start_date: nil,
  end_date: nil
}

result = options_api.get_options_prices_eod(identifier, opts)
pp result

Parameters

Name Type Description Notes
identifier String The Intrinio ID or code of the options contract to request prices for.  
next_page String Gets the next page of data from a previous API call [optional]  
start_date Date The start date to retrieve prices for [optional]  
end_date Date The end date to retrieve prices for [optional]  

Return type

ApiResponseOptionsPricesEod

get_options_prices_realtime

View Intrinio API Documentation

ApiResponseOptionsPriceRealtime get_options_prices_realtime(identifier, opts)

Option Prices Realtime

Returns all option prices for a given option contract identifier.

Example

# 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 = "AAPL230120C00090000"

opts = {
  source: nil,
  stock_price_source: nil,
  model: nil,
  show_extended_price: nil
}

result = options_api.get_options_prices_realtime(identifier, opts)
pp result

Parameters

Name Type Description Notes
identifier String The Intrinio ID or code of the options contract to request prices for.  
source String Realtime or 15-minute delayed contracts. [optional]  
stock_price_source String Source for underlying price for calculating Greeks. [optional]  
model String Model for calculating Greek values. Default is black_scholes. [optional]  
show_extended_price BOOLEAN Whether to include open close high low type fields. [optional]  

Return type

ApiResponseOptionsPriceRealtime

get_options_snapshots

View Intrinio API Documentation

OptionSnapshotsResult get_options_snapshots(opts)

Option Prices Realtime Snapshot

Returns all options snapshots for the queried interval with links to download.

Example

# 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,
  at_datetime: DateTime.parse(nil)
}

result = options_api.get_options_snapshots(opts)
pp result

Parameters

Name Type Description Notes
source String Realtime or 15-minute delayed contracts. [optional]  
at_datetime DateTime The UTC date and time (with url-encoded spaces) the snapshot will cover. [optional]  

Return type

OptionSnapshotsResult

get_options_stats_realtime

View Intrinio API Documentation

ApiResponseOptionsStatsRealtime get_options_stats_realtime(identifier, opts)

Option Stats Realtime

Returns all option stats (greeks and implied volatility) as well as the underlying factors used to calculate them, for a particular option contract.

Example

# 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 = "AAPL230120C00090000"

opts = {
  source: nil,
  show_extended_price: nil
}

result = options_api.get_options_stats_realtime(identifier, opts)
pp result

Parameters

Name Type Description Notes
identifier String The Intrinio ID or code of the options contract to request prices for.  
source String Realtime or 15-minute delayed contracts. [optional]  
show_extended_price BOOLEAN Whether to include open close high low type fields. [optional]  

Return type

ApiResponseOptionsStatsRealtime

get_unusual_activity

View Intrinio API Documentation

ApiResponseOptionsUnusualActivity get_unusual_activity(symbol, opts)

Options Unusual Activity

Returns unusual options activity for a particular company across all option chains. Unusual options activity includes large trades, sweeps, and block trades.

Example

# 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
symbol = "AAPL"

opts = {
  source: nil
}

result = options_api.get_unusual_activity(symbol, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
source String Realtime or 15-minute delayed contracts. [optional]  

Return type

ApiResponseOptionsUnusualActivity

get_unusual_activity_intraday

View Intrinio API Documentation

ApiResponseOptionsUnusualActivity get_unusual_activity_intraday(symbol, opts)

Options Unusual Activity Intraday

Returns unusual trades for a given identifier within the query parameters.

Example

# 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
symbol = "AAPL"

opts = {
  next_page: nil,
  page_size: 1000,
  activity_type: nil,
  sentiment: nil,
  start_date: Date.parse("2022-02-01"),
  end_date: Date.parse("2022-02-03"),
  minimum_total_value: 100000.0,
  maximum_total_value: 200000.0
}

result = options_api.get_unusual_activity_intraday(symbol, opts)
pp result

Parameters

Name Type Description Notes
symbol String The option symbol, corresponding to the underlying security.  
next_page String Gets the next page of data from a previous API call [optional]  
page_size Integer The number of results to return [optional] [default to 1000]  
activity_type String The unusual activity type to query for. [optional]  
sentiment String The sentiment type to query for. [optional]  
start_date Date Return unusual activity on or after this date. [optional]  
end_date Date Return unusual activity on or before this date. [optional]  
minimum_total_value Object The inclusive minimum total value for the unusual activity. [optional]  
maximum_total_value Object The inclusive maximum total value for the unusual activity. [optional]  

Return type

ApiResponseOptionsUnusualActivity

get_unusual_activity_universal

View Intrinio API Documentation

ApiResponseOptionsUnusualActivity get_unusual_activity_universal(opts)

Options Unusual Activity Universal

Returns the latest unusual options activity across all US companies with across all option chains. Unusual options activity includes large trades, sweeps, and block trades.

Example

# 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
}

result = options_api.get_unusual_activity_universal(opts)
pp result

Parameters

Name Type Description Notes
source String Realtime or 15-minute delayed contracts. [optional]  

Return type

ApiResponseOptionsUnusualActivity

get_unusual_activity_universal_intraday

View Intrinio API Documentation

ApiResponseOptionsUnusualActivity get_unusual_activity_universal_intraday(opts)

Options Unusual Activity Universal Intraday

Returns unusual trades for all underlying security symbols within the query parameters.

Example

# 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 = {
  next_page: nil,
  page_size: 1000,
  activity_type: nil,
  sentiment: nil,
  start_date: Date.parse("2022-02-01"),
  end_date: Date.parse("2022-02-03"),
  minimum_total_value: 100000.0,
  maximum_total_value: 200000.0
}

result = options_api.get_unusual_activity_universal_intraday(opts)
pp result

Parameters

Name Type Description Notes
next_page String Gets the next page of data from a previous API call [optional]  
page_size Integer The number of results to return [optional] [default to 1000]  
activity_type String The unusual activity type to query for. [optional]  
sentiment String The sentiment type to query for. [optional]  
start_date Date Return unusual activity on or after this date. [optional]  
end_date Date Return unusual activity on or before this date. [optional]  
minimum_total_value Object The inclusive minimum total value for the unusual activity. [optional]  
maximum_total_value Object The inclusive maximum total value for the unusual activity. [optional]  

Return type

ApiResponseOptionsUnusualActivity