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_aggregates | GET /options/aggregates | Total open interest and volume aggregated by ticker |
| 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_option_trades | GET /options/trades | Option Trades |
| get_option_trades_by_contract | GET /options/{identifier}/trades | Option Trades By Contract |
| 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_gainers | GET /options/gainers | Options Top Gainers |
| get_options_greeks_by_contract | GET /options/greeks/{contract}/realtime | Option Greeks & Derived Price by Contract |
| get_options_greeks_by_ticker | GET /options/greeks/by_ticker/{identifier}/realtime | Options Realtime Greeks & Derived Price by Ticker |
| get_options_implied_move_by_symbol | GET /options/implied_move/{symbol}/{expiration_date} | Options Implied Move By Symbol |
| 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_losers | GET /options/losers | Options Top Losers |
| 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_eod_by_ticker | GET /options/prices/by_ticker/{symbol}/eod | Option Prices End of Day By Ticker |
| get_options_prices_realtime | GET /options/prices/{identifier}/realtime | Option Prices Realtime |
| get_options_prices_realtime_by_ticker | GET /options/prices/by_ticker/{symbol}/realtime | Option Prices Realtime By Ticker |
| 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 |
View Intrinio API Documentation
ApiResponseOptionsTickers get_all_options_tickers(opts)
Returns all tickers that have existing options contracts.
# 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 = {
use_underlying_symbols: false
}
result = options_api.get_all_options_tickers(opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| use_underlying_symbols | BOOLEAN | Use underlying symbol vs contract symbol | [optional] [default to false] |
View Intrinio API Documentation
ApiResponseOptionsAggregates get_option_aggregates(opts)
Returns total open interest and volume by ticker
# 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 = {
date: "2024-04-24",
page_size: 100,
next_page: nil
}
result = options_api.get_option_aggregates(opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| date | Object | Return aggregated data for 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] |
View Intrinio API Documentation
ApiResponseOptionsExpirations get_option_expirations_realtime(symbol, opts)
Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
# 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,
include_related_symbols: false
}
result = options_api.get_option_expirations_realtime(symbol, opts)
pp result| 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] |
| include_related_symbols | BOOLEAN | Include related symbols that end in a 1 or 2 because of a corporate action. | [optional] |
View Intrinio API Documentation
ApiResponseOptionsChainRealtime get_option_strikes_realtime(symbol, strike, opts)
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.
# 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,
include_related_symbols: false
}
result = options_api.get_option_strikes_realtime(symbol, strike, opts)
pp result| 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] |
| include_related_symbols | BOOLEAN | Include related symbols that end in a 1 or 2 because of a corporate action. | [optional] |
ApiResponseOptionsChainRealtime
View Intrinio API Documentation
OptionTradesResult get_option_trades(opts)
Returns all trades between start time and end time, up to seven days ago for the specified source.
# 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| Name | Type | Description | Notes |
|---|---|---|---|
| source | String | The specific source of the data being requested. | [optional] |
| start_date | Date | The start date for the data being requested. | [optional] |
| start_time | String | The start time for the data being requested. | [optional] |
| end_date | Date | The end date for the data being requested. | [optional] |
| end_time | String | The end time for the data being requested. | [optional] |
| timezone | String | The timezone the start and end date/times use. | [optional] [default to UTC] |
| page_size | Integer | The maximum number of results to return per page. | [optional] [default to 100] |
| min_size | Integer | Trades must be larger or equal to this size. | [optional] |
| security | String | The ticker symbol for which trades are being requested. | [optional] |
| next_page | String | Gets the next page of data from a previous API call | [optional] |
View Intrinio API Documentation
OptionTradesResult get_option_trades_by_contract(identifier, opts)
Returns all trades for a contract between start time and end time, up to seven days ago for the specified source.
# 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 = "AAPL__261218C00230000"
opts = {
source: nil,
start_date: nil,
start_time: nil,
end_date: nil,
end_time: nil,
timezone: "UTC",
page_size: 100,
min_size: 100,
next_page: nil
}
result = options_api.get_option_trades_by_contract(identifier, opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | The option contract for which trades are being requested. | |
| source | String | The specific source of the data being requested. | [optional] |
| start_date | Date | The start date for the data being requested. | [optional] |
| start_time | String | The start time for the data being requested. | [optional] |
| end_date | Date | The end date for the data being requested. | [optional] |
| end_time | String | The end time for the data being requested. | [optional] |
| timezone | String | The timezone the start and end date/times use. | [optional] [default to UTC] |
| page_size | Integer | The maximum number of results to return per page. | [optional] [default to 100] |
| min_size | Integer | Trades must be larger or equal to this size. | [optional] |
| next_page | String | Gets the next page of data from a previous API call | [optional] |
View Intrinio API Documentation
ApiResponseOptions get_options(symbol, opts)
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.
# 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| 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] |
View Intrinio API Documentation
ApiResponseOptionsRealtime get_options_by_symbol_realtime(symbol, opts)
Returns a list of all securities that have options listed and are tradable on a US market exchange. Useful to retrieve the entire universe.
# 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,
include_related_symbols: false
}
result = options_api.get_options_by_symbol_realtime(symbol, opts)
pp result| 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] |
| include_related_symbols | BOOLEAN | Include related symbols that end in a 1 or 2 because of a corporate action. | [optional] |
View Intrinio API Documentation
ApiResponseOptionsChain get_options_chain(symbol, expiration, opts)
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.
# 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| 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] |
View Intrinio API Documentation
ApiResponseOptionsChainEod get_options_chain_eod(symbol, expiration, opts)
Returns all EOD options contracts and their prices for the given symbol and expiration date.
# 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,
include_related_symbols: false,
recalculate_stats: false,
model: "black_scholes",
iv_mode: "iv_mode_example"
}
result = options_api.get_options_chain_eod(symbol, expiration, opts)
pp result| 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] |
| include_related_symbols | BOOLEAN | Include related symbols that end in a 1 or 2 because of a corporate action. | [optional] |
| recalculate_stats | BOOLEAN | Recalculate implied volatility and greeks on the fly using end-of-day underlying prices. | [optional] [default to false] |
| model | String | The options pricing model to use when recalculating stats. | [optional] [default to black_scholes] |
| iv_mode | String | The implied volatility calculation mode to use when recalculating stats. | [optional] |
View Intrinio API Documentation
ApiResponseOptionsChainRealtime get_options_chain_realtime(symbol, expiration, opts)
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.
# 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,
include_related_symbols: false,
show_stats: nil
}
result = options_api.get_options_chain_realtime(symbol, expiration, opts)
pp result| 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] |
| include_related_symbols | BOOLEAN | Include related symbols that end in a 1 or 2 because of a corporate action. | [optional] |
| show_stats | BOOLEAN | Whether to include Greek calculations or not. | [optional] |
ApiResponseOptionsChainRealtime
View Intrinio API Documentation
ApiResponseOptionsExpirations get_options_expirations(symbol, opts)
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.
# 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| 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] |
View Intrinio API Documentation
ApiResponseOptionsExpirations get_options_expirations_eod(symbol, opts)
Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
# 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",
include_related_symbols: false
}
result = options_api.get_options_expirations_eod(symbol, opts)
pp result| 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] |
| include_related_symbols | BOOLEAN | Include related symbols that end in a 1 or 2 because of a corporate action. | [optional] |
View Intrinio API Documentation
ApiResponseOptionMovers get_options_gainers(mode, opts)
Returns a list of top gainers since last close.
# 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
mode = nil
opts = {
next_page: nil
}
result = options_api.get_options_gainers(mode, opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| mode | String | Which metric to sort by - change, percent change, or volume. | |
| next_page | String | Gets the next page of data from a previous API call | [optional] |
View Intrinio API Documentation
ApiResponseOptionsGreekContractRealtime get_options_greeks_by_contract(contract, opts)
Retrieves realtime options greeks data for a specific options contract
# 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
contract = "contract_example"
opts = {
source: "source_example",
model: "black_scholes",
iv_mode: "iv_mode_example",
stock_price_source: "stock_price_source_example"
}
result = options_api.get_options_greeks_by_contract(contract, opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| contract | String | The options contract identifier | |
| source | String | The data source to use for options data | [optional] |
| model | String | The options pricing model to use for greeks calculations | [optional] [default to black_scholes] |
| iv_mode | String | The implied volatility calculation mode | [optional] |
| stock_price_source | String | The data source to use for underlying stock prices | [optional] |
ApiResponseOptionsGreekContractRealtime
View Intrinio API Documentation
ApiResponseOptionsGreeksByTickerRealtime get_options_greeks_by_ticker(identifier, opts)
Retrieves realtime options greeks data for all contracts of a given ticker symbol
# 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 = "identifier_example"
opts = {
source: "source_example",
model: "black_scholes",
iv_mode: "iv_mode_example",
stock_price_source: "stock_price_source_example",
expiration_start_date: Date.parse("2013-10-20"),
expiration_end_date: Date.parse("2013-10-20"),
strike: 3.4,
strike_greater_than: 3.4,
strike_less_than: 3.4,
page_size: 250,
next_page: nil
}
result = options_api.get_options_greeks_by_ticker(identifier, opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | The ticker symbol to get options greeks for | |
| source | String | The data source to use for options data | [optional] |
| model | String | The options pricing model to use for greeks calculations | [optional] [default to black_scholes] |
| iv_mode | String | The implied volatility calculation mode | [optional] |
| stock_price_source | String | The data source to use for underlying stock prices | [optional] |
| expiration_start_date | Date | Filter options by expiration date (start) | [optional] |
| expiration_end_date | Date | Filter options by expiration date (end) | [optional] |
| strike | Float | Filter options by strike price | [optional] |
| strike_greater_than | Float | Filter options by minimum strike price | [optional] |
| strike_less_than | Float | Filter options by maximum strike price | [optional] |
| page_size | Integer | Number of results to return per page | [optional] [default to 250] |
| next_page | String | Gets the next page of data from a previous API call | [optional] |
ApiResponseOptionsGreeksByTickerRealtime
View Intrinio API Documentation
ApiResponseOptionsImpliedMove get_options_implied_move_by_symbol(symbol, expiration_date, opts)
Returns the implied move data points for a ticker symbol.
# 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 = "TSLA"
expiration_date = Date.parse("2025-05-30")
opts = {
percentage: 0.85,
source: nil
}
result = options_api.get_options_implied_move_by_symbol(symbol, expiration_date, opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| symbol | String | The ticker symbol for the contracts. | |
| expiration_date | Date | The expiration date for the contracts to consider. | |
| percentage | Object | Percentage to multiply the straddle by. Defaults to 0.85. | [optional] |
| source | String | Realtime or 15-minute delayed contracts. | [optional] |
View Intrinio API Documentation
OptionIntervalsResult get_options_interval_by_contract(identifier, interval_size, opts)
Returns a list of interval data points for a contract.
# 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| 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] |
View Intrinio API Documentation
OptionIntervalsMoversResult get_options_interval_movers(opts)
Returns a list of intervals for the biggest movers over the last hour interval.
# 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| 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] |
View Intrinio API Documentation
OptionIntervalsMoversResult get_options_interval_movers_change(opts)
Returns a list of intervals for the biggest movers by change over the last hour interval.
# 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| 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] |
View Intrinio API Documentation
OptionIntervalsMoversResult get_options_interval_movers_volume(opts)
Returns a list of intervals for the biggest movers by volume over the last hour interval.
# 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| 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] |
View Intrinio API Documentation
ApiResponseOptionMovers get_options_losers(mode, opts)
Returns a list of top losers since last close.
# 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
mode = nil
opts = {
next_page: nil
}
result = options_api.get_options_losers(mode, opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| mode | String | Which metric to sort by - change, percent change, or volume. | |
| next_page | String | Gets the next page of data from a previous API call | [optional] |
View Intrinio API Documentation
ApiResponseOptionPrices get_options_prices(identifier, opts)
Returns all price data from inception to expiration for a particular contract.
# 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| 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] |
View Intrinio API Documentation
ApiResponseOptionsPricesBatchRealtime get_options_prices_batch_realtime(body, opts)
Returns a list of latest price data for up to 250 option contracts per request.
# 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| 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] |
ApiResponseOptionsPricesBatchRealtime
View Intrinio API Documentation
ApiResponseOptionsPricesEod get_options_prices_eod(identifier, opts)
Returns all option prices for a given option contract identifier.
# 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,
recalculate_stats: false,
model: "black_scholes",
iv_mode: "iv_mode_example"
}
result = options_api.get_options_prices_eod(identifier, opts)
pp result| 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] |
| recalculate_stats | BOOLEAN | Recalculate implied volatility and greeks on the fly using end-of-day underlying prices. | [optional] [default to false] |
| model | String | The options pricing model to use when recalculating stats. | [optional] [default to black_scholes] |
| iv_mode | String | The implied volatility calculation mode to use when recalculating stats. | [optional] |
View Intrinio API Documentation
ApiResponseOptionsPricesByTickerEod get_options_prices_eod_by_ticker(symbol, opts)
Returns a list of end of day pricing information for all option contracts currently associated with the ticker.
# 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 = {
page_size: 250,
date: "2024-01-01",
type: nil,
strike: nil,
strike_greater_than: nil,
strike_less_than: nil,
include_related_symbols: false,
recalculate_stats: false,
model: "black_scholes",
iv_mode: "iv_mode_example",
next_page: nil
}
result = options_api.get_options_prices_eod_by_ticker(symbol, opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| symbol | String | The equities ticker symbol, corresponding to the underlying security. | |
| page_size | Integer | The number of results to return | [optional] [default to 250] |
| date | Object | The date to get pricing data for. Defaults to today in Eastern time zone. | [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] |
| include_related_symbols | BOOLEAN | Include related symbols that end in a 1 or 2 because of a corporate action. | [optional] |
| recalculate_stats | BOOLEAN | Recalculate implied volatility and greeks on the fly using end-of-day underlying prices. | [optional] [default to false] |
| model | String | The options pricing model to use when recalculating stats. | [optional] [default to black_scholes] |
| iv_mode | String | The implied volatility calculation mode to use when recalculating stats. | [optional] |
| next_page | String | Gets the next page of data from a previous API call | [optional] |
ApiResponseOptionsPricesByTickerEod
View Intrinio API Documentation
ApiResponseOptionsPriceRealtime get_options_prices_realtime(identifier, opts)
Returns all option prices for a given option contract identifier.
# 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 = "AAPL__261218C00230000"
opts = {
source: nil,
stock_price_source: nil,
model: nil,
show_extended_price: nil
}
result = options_api.get_options_prices_realtime(identifier, opts)
pp result| 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] |
ApiResponseOptionsPriceRealtime
View Intrinio API Documentation
ApiResponseOptionsPricesByTickerRealtime get_options_prices_realtime_by_ticker(symbol, opts)
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 ticker.
# 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 = {
source: nil,
iv_mode: nil,
next_page: nil,
page_size: 250,
stock_price_source: nil,
model: nil,
show_extended_price: nil,
expiration_start_date: "2024-01-01",
expiration_end_date: "2024-02-02",
strike: 100.0,
show_stats: nil,
next_page2: nil
}
result = options_api.get_options_prices_realtime_by_ticker(symbol, opts)
pp result| Name | Type | Description | Notes |
|---|---|---|---|
| symbol | String | The equities ticker symbol, corresponding to the underlying security. | |
| source | String | Realtime or 15-minute delayed contracts. | [optional] |
| iv_mode | String | Change the mode for the implied volatility calculation to out of the money. | [optional] |
| 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 250] |
| 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] |
| expiration_start_date | Object | Filter out contracts that expire before this date. | [optional] |
| expiration_end_date | Object | Filter out contracts that expire after this date. | [optional] |
| strike | Float | Filter out contracts that have this strike price. | [optional] |
| show_stats | BOOLEAN | Whether to include Greek calculations or not. | [optional] |
| next_page2 | String | Gets the next page of data from a previous API call | [optional] |
ApiResponseOptionsPricesByTickerRealtime
View Intrinio API Documentation
OptionSnapshotsResult get_options_snapshots(opts)
Returns all options snapshots for the queried interval with links to download.
# 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),
with_greeks: nil,
stock_price_source: nil,
with_underlying_price: nil
}
result = options_api.get_options_snapshots(opts)
pp result| 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] |
| with_greeks | BOOLEAN | Whether to include Greek calculations fields when available. | [optional] |
| stock_price_source | String | Source for underlying price for calculating Greeks. | [optional] |
| with_underlying_price | BOOLEAN | Whether to include the underlying price of the security in the file. | [optional] |
View Intrinio API Documentation
ApiResponseOptionsStatsRealtime get_options_stats_realtime(identifier, opts)
Returns all option stats (greeks and implied volatility) as well as the underlying factors used to calculate them, for a particular option contract.
# 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| 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] |
ApiResponseOptionsStatsRealtime
View Intrinio API Documentation
ApiResponseOptionsUnusualActivity get_unusual_activity(symbol, opts)
Returns unusual options activity for a particular company across all option chains. Unusual options activity includes large trades, sweeps, and block trades.
# 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| Name | Type | Description | Notes |
|---|---|---|---|
| symbol | String | The option symbol, corresponding to the underlying security. | |
| source | String | Realtime or 15-minute delayed contracts. | [optional] |
ApiResponseOptionsUnusualActivity
View Intrinio API Documentation
ApiResponseOptionsUnusualActivity get_unusual_activity_intraday(symbol, opts)
Returns unusual trades for a given identifier within the query parameters.
# 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| 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 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] |
ApiResponseOptionsUnusualActivity
View Intrinio API Documentation
ApiResponseOptionsUnusualActivity get_unusual_activity_universal(opts)
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.
# 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| Name | Type | Description | Notes |
|---|---|---|---|
| source | String | Realtime or 15-minute delayed contracts. | [optional] |
ApiResponseOptionsUnusualActivity
View Intrinio API Documentation
ApiResponseOptionsUnusualActivity get_unusual_activity_universal_intraday(opts)
Returns unusual trades for all underlying security symbols within the query parameters.
# 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| 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 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] |