Class: Intrinio::OptionsApi
- Inherits:
-
Object
- Object
- Intrinio::OptionsApi
- Defined in:
- lib/intrinio-sdk/api/options_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_all_options_tickers(opts = {}) ⇒ ApiResponseOptionsTickers
Options Tickers Returns all tickers that have existing options contracts.
-
#get_all_options_tickers_with_http_info(opts = {}) ⇒ Array<(ApiResponseOptionsTickers, Fixnum, Hash)>
Options Tickers Returns all tickers that have existing options contracts.
-
#get_option_aggregates(opts = {}) ⇒ ApiResponseOptionsAggregates
Total open interest and volume aggregated by ticker Returns total open interest and volume by ticker.
-
#get_option_aggregates_with_http_info(opts = {}) ⇒ Array<(ApiResponseOptionsAggregates, Fixnum, Hash)>
Total open interest and volume aggregated by ticker Returns total open interest and volume by ticker.
-
#get_option_expirations_realtime(symbol, opts = {}) ⇒ ApiResponseOptionsExpirations
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
-
#get_option_expirations_realtime_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
-
#get_option_strikes_realtime(symbol, strike, opts = {}) ⇒ ApiResponseOptionsChainRealtime
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.
-
#get_option_strikes_realtime_with_http_info(symbol, strike, opts = {}) ⇒ Array<(ApiResponseOptionsChainRealtime, Fixnum, Hash)>
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.
-
#get_options(symbol, opts = {}) ⇒ ApiResponseOptions
Options Returns a list of all securities that have options listed and are tradable on a US market exchange.
-
#get_options_by_symbol_realtime(symbol, opts = {}) ⇒ ApiResponseOptionsRealtime
Options by Symbol Realtime Returns a list of all securities that have options listed and are tradable on a US market exchange.
-
#get_options_by_symbol_realtime_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsRealtime, Fixnum, Hash)>
Options by Symbol Realtime Returns a list of all securities that have options listed and are tradable on a US market exchange.
-
#get_options_chain(symbol, expiration, opts = {}) ⇒ ApiResponseOptionsChain
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.
-
#get_options_chain_eod(symbol, expiration, opts = {}) ⇒ ApiResponseOptionsChainEod
Options Chain EOD Returns all EOD options contracts and their prices for the given symbol and expiration date.
-
#get_options_chain_eod_with_http_info(symbol, expiration, opts = {}) ⇒ Array<(ApiResponseOptionsChainEod, Fixnum, Hash)>
Options Chain EOD Returns all EOD options contracts and their prices for the given symbol and expiration date.
-
#get_options_chain_realtime(symbol, expiration, opts = {}) ⇒ ApiResponseOptionsChainRealtime
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.
-
#get_options_chain_realtime_with_http_info(symbol, expiration, opts = {}) ⇒ Array<(ApiResponseOptionsChainRealtime, Fixnum, Hash)>
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.
-
#get_options_chain_with_http_info(symbol, expiration, opts = {}) ⇒ Array<(ApiResponseOptionsChain, Fixnum, Hash)>
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.
-
#get_options_expirations(symbol, opts = {}) ⇒ ApiResponseOptionsExpirations
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
-
#get_options_expirations_eod(symbol, opts = {}) ⇒ ApiResponseOptionsExpirations
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
-
#get_options_expirations_eod_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
-
#get_options_expirations_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
-
#get_options_interval_by_contract(identifier, interval_size, opts = {}) ⇒ OptionIntervalsResult
Options Intervals By Contract Returns a list of interval data points for a contract.
-
#get_options_interval_by_contract_with_http_info(identifier, interval_size, opts = {}) ⇒ Array<(OptionIntervalsResult, Fixnum, Hash)>
Options Intervals By Contract Returns a list of interval data points for a contract.
-
#get_options_interval_movers(opts = {}) ⇒ OptionIntervalsMoversResult
Options Intervals Movers Returns a list of intervals for the biggest movers over the last hour interval.
-
#get_options_interval_movers_change(opts = {}) ⇒ OptionIntervalsMoversResult
Options Intervals Movers By Change Returns a list of intervals for the biggest movers by change over the last hour interval.
-
#get_options_interval_movers_change_with_http_info(opts = {}) ⇒ Array<(OptionIntervalsMoversResult, Fixnum, Hash)>
Options Intervals Movers By Change Returns a list of intervals for the biggest movers by change over the last hour interval.
-
#get_options_interval_movers_volume(opts = {}) ⇒ OptionIntervalsMoversResult
Options Intervals Movers By Volume Returns a list of intervals for the biggest movers by volume over the last hour interval.
-
#get_options_interval_movers_volume_with_http_info(opts = {}) ⇒ Array<(OptionIntervalsMoversResult, Fixnum, Hash)>
Options Intervals Movers By Volume Returns a list of intervals for the biggest movers by volume over the last hour interval.
-
#get_options_interval_movers_with_http_info(opts = {}) ⇒ Array<(OptionIntervalsMoversResult, Fixnum, Hash)>
Options Intervals Movers Returns a list of intervals for the biggest movers over the last hour interval.
-
#get_options_prices(identifier, opts = {}) ⇒ ApiResponseOptionPrices
Option Prices Returns all price data from inception to expiration for a particular contract.
-
#get_options_prices_batch_realtime(body, opts = {}) ⇒ ApiResponseOptionsPricesBatchRealtime
Option Prices Batch Realtime Returns a list of latest price data for up to 250 option contracts per request.
-
#get_options_prices_batch_realtime_with_http_info(body, opts = {}) ⇒ Array<(ApiResponseOptionsPricesBatchRealtime, Fixnum, Hash)>
Option Prices Batch Realtime Returns a list of latest price data for up to 250 option contracts per request.
-
#get_options_prices_eod(identifier, opts = {}) ⇒ ApiResponseOptionsPricesEod
Option Prices EOD Returns all option prices for a given option contract identifier.
-
#get_options_prices_eod_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOptionsPricesEod, Fixnum, Hash)>
Option Prices EOD Returns all option prices for a given option contract identifier.
-
#get_options_prices_realtime(identifier, opts = {}) ⇒ ApiResponseOptionsPriceRealtime
Option Prices Realtime Returns all option prices for a given option contract identifier.
-
#get_options_prices_realtime_by_ticker(symbol, opts = {}) ⇒ ApiResponseOptionsPricesByTickerRealtime
Option Prices Realtime By Ticker 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.
-
#get_options_prices_realtime_by_ticker_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsPricesByTickerRealtime, Fixnum, Hash)>
Option Prices Realtime By Ticker 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.
-
#get_options_prices_realtime_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOptionsPriceRealtime, Fixnum, Hash)>
Option Prices Realtime Returns all option prices for a given option contract identifier.
-
#get_options_prices_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOptionPrices, Fixnum, Hash)>
Option Prices Returns all price data from inception to expiration for a particular contract.
-
#get_options_snapshots(opts = {}) ⇒ OptionSnapshotsResult
Option Prices Realtime Snapshot Returns all options snapshots for the queried interval with links to download.
-
#get_options_snapshots_with_http_info(opts = {}) ⇒ Array<(OptionSnapshotsResult, Fixnum, Hash)>
Option Prices Realtime Snapshot Returns all options snapshots for the queried interval with links to download.
-
#get_options_stats_realtime(identifier, opts = {}) ⇒ ApiResponseOptionsStatsRealtime
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.
-
#get_options_stats_realtime_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOptionsStatsRealtime, Fixnum, Hash)>
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.
-
#get_options_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptions, Fixnum, Hash)>
Options Returns a list of all securities that have options listed and are tradable on a US market exchange.
-
#get_unusual_activity(symbol, opts = {}) ⇒ ApiResponseOptionsUnusualActivity
Options Unusual Activity Returns unusual options activity for a particular company across all option chains.
-
#get_unusual_activity_intraday(symbol, opts = {}) ⇒ ApiResponseOptionsUnusualActivity
Options Unusual Activity Intraday Returns unusual trades for a given identifier within the query parameters.
-
#get_unusual_activity_intraday_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>
Options Unusual Activity Intraday Returns unusual trades for a given identifier within the query parameters.
-
#get_unusual_activity_universal(opts = {}) ⇒ ApiResponseOptionsUnusualActivity
Options Unusual Activity Universal Returns the latest unusual options activity across all US companies with across all option chains.
-
#get_unusual_activity_universal_intraday(opts = {}) ⇒ ApiResponseOptionsUnusualActivity
Options Unusual Activity Universal Intraday Returns unusual trades for all underlying security symbols within the query parameters.
-
#get_unusual_activity_universal_intraday_with_http_info(opts = {}) ⇒ Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>
Options Unusual Activity Universal Intraday Returns unusual trades for all underlying security symbols within the query parameters.
-
#get_unusual_activity_universal_with_http_info(opts = {}) ⇒ Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>
Options Unusual Activity Universal Returns the latest unusual options activity across all US companies with across all option chains.
-
#get_unusual_activity_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>
Options Unusual Activity Returns unusual options activity for a particular company across all option chains.
-
#initialize(api_client = ApiClient.default) ⇒ OptionsApi
constructor
A new instance of OptionsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ OptionsApi
Returns a new instance of OptionsApi.
19 20 21 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_all_options_tickers(opts = {}) ⇒ ApiResponseOptionsTickers
Options Tickers Returns all tickers that have existing options contracts.
27 28 29 30 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 27 def (opts = {}) data, _status_code, _headers = (opts) return data end |
#get_all_options_tickers_with_http_info(opts = {}) ⇒ Array<(ApiResponseOptionsTickers, Fixnum, Hash)>
Options Tickers Returns all tickers that have existing options contracts.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 36 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_all_options_tickers ..." end # resource path local_var_path = "/options/tickers" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsTickers') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_all_options_tickers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_option_aggregates(opts = {}) ⇒ ApiResponseOptionsAggregates
Total open interest and volume aggregated by ticker Returns total open interest and volume by ticker
75 76 77 78 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 75 def get_option_aggregates(opts = {}) data, _status_code, _headers = get_option_aggregates_with_http_info(opts) return data end |
#get_option_aggregates_with_http_info(opts = {}) ⇒ Array<(ApiResponseOptionsAggregates, Fixnum, Hash)>
Total open interest and volume aggregated by ticker Returns total open interest and volume by ticker
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 85 def get_option_aggregates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_option_aggregates ..." end # resource path local_var_path = "/options/aggregates" # query parameters query_params = {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsAggregates') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_option_aggregates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_option_expirations_realtime(symbol, opts = {}) ⇒ ApiResponseOptionsExpirations
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
129 130 131 132 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 129 def get_option_expirations_realtime(symbol, opts = {}) data, _status_code, _headers = get_option_expirations_realtime_with_http_info(symbol, opts) return data end |
#get_option_expirations_realtime_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 143 def get_option_expirations_realtime_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_option_expirations_realtime ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_option_expirations_realtime" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end # resource path local_var_path = "/options/expirations/{symbol}/realtime".sub('{' + 'symbol' + '}', symbol.to_s) # query parameters query_params = {} query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'include_related_symbols'] = opts[:'include_related_symbols'] if !opts[:'include_related_symbols'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsExpirations') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_option_expirations_realtime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_option_strikes_realtime(symbol, strike, opts = {}) ⇒ ApiResponseOptionsChainRealtime
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.
199 200 201 202 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 199 def get_option_strikes_realtime(symbol, strike, opts = {}) data, _status_code, _headers = get_option_strikes_realtime_with_http_info(symbol, strike, opts) return data end |
#get_option_strikes_realtime_with_http_info(symbol, strike, opts = {}) ⇒ Array<(ApiResponseOptionsChainRealtime, Fixnum, Hash)>
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.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 215 def get_option_strikes_realtime_with_http_info(symbol, strike, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_option_strikes_realtime ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_option_strikes_realtime" end # verify the required parameter 'strike' is set if @api_client.config.client_side_validation && strike.nil? fail ArgumentError, "Missing the required parameter 'strike' when calling OptionsApi.get_option_strikes_realtime" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end if @api_client.config.client_side_validation && opts[:'stock_price_source'] && !['iex', 'bats_delayed', 'intrinio_mx', 'intrinio_mx_plus', 'delayed_sip', 'utp_delayed', 'otc_delayed', 'cta_a_delayed', 'cta_b_delayed', 'nasdaq_basic'].include?(opts[:'stock_price_source']) fail ArgumentError, 'invalid value for "stock_price_source", must be one of iex, bats_delayed, intrinio_mx, intrinio_mx_plus, delayed_sip, utp_delayed, otc_delayed, cta_a_delayed, cta_b_delayed, nasdaq_basic' end if @api_client.config.client_side_validation && opts[:'model'] && !['black_scholes', 'bjerk'].include?(opts[:'model']) fail ArgumentError, 'invalid value for "model", must be one of black_scholes, bjerk' end # resource path local_var_path = "/options/strikes/{symbol}/{strike}/realtime".sub('{' + 'symbol' + '}', symbol.to_s).sub('{' + 'strike' + '}', strike.to_s) # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'stock_price_source'] = opts[:'stock_price_source'] if !opts[:'stock_price_source'].nil? query_params[:'model'] = opts[:'model'] if !opts[:'model'].nil? query_params[:'show_extended_price'] = opts[:'show_extended_price'] if !opts[:'show_extended_price'].nil? query_params[:'include_related_symbols'] = opts[:'include_related_symbols'] if !opts[:'include_related_symbols'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsChainRealtime') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_option_strikes_realtime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options(symbol, opts = {}) ⇒ ApiResponseOptions
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.
285 286 287 288 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 285 def (symbol, opts = {}) data, _status_code, _headers = (symbol, opts) return data end |
#get_options_by_symbol_realtime(symbol, opts = {}) ⇒ ApiResponseOptionsRealtime
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.
372 373 374 375 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 372 def (symbol, opts = {}) data, _status_code, _headers = (symbol, opts) return data end |
#get_options_by_symbol_realtime_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsRealtime, Fixnum, Hash)>
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.
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 391 def (symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_by_symbol_realtime ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_options_by_symbol_realtime" end if @api_client.config.client_side_validation && opts[:'type'] && !['call', 'put'].include?(opts[:'type']) fail ArgumentError, 'invalid value for "type", must be one of call, put' end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end # resource path local_var_path = "/options/{symbol}/realtime".sub('{' + 'symbol' + '}', symbol.to_s) # query parameters query_params = {} query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'strike'] = opts[:'strike'] if !opts[:'strike'].nil? query_params[:'strike_greater_than'] = opts[:'strike_greater_than'] if !opts[:'strike_greater_than'].nil? query_params[:'strike_less_than'] = opts[:'strike_less_than'] if !opts[:'strike_less_than'].nil? query_params[:'expiration'] = opts[:'expiration'] if !opts[:'expiration'].nil? query_params[:'expiration_after'] = opts[:'expiration_after'] if !opts[:'expiration_after'].nil? query_params[:'expiration_before'] = opts[:'expiration_before'] if !opts[:'expiration_before'].nil? query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'include_related_symbols'] = opts[:'include_related_symbols'] if !opts[:'include_related_symbols'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsRealtime') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_by_symbol_realtime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_chain(symbol, expiration, opts = {}) ⇒ ApiResponseOptionsChain
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.
457 458 459 460 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 457 def (symbol, expiration, opts = {}) data, _status_code, _headers = (symbol, expiration, opts) return data end |
#get_options_chain_eod(symbol, expiration, opts = {}) ⇒ ApiResponseOptionsChainEod
Options Chain EOD Returns all EOD options contracts and their prices for the given symbol and expiration date.
546 547 548 549 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 546 def (symbol, expiration, opts = {}) data, _status_code, _headers = (symbol, expiration, opts) return data end |
#get_options_chain_eod_with_http_info(symbol, expiration, opts = {}) ⇒ Array<(ApiResponseOptionsChainEod, Fixnum, Hash)>
Options Chain EOD Returns all EOD options contracts and their prices for the given symbol and expiration date.
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 563 def (symbol, expiration, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_chain_eod ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_options_chain_eod" end # verify the required parameter 'expiration' is set if @api_client.config.client_side_validation && expiration.nil? fail ArgumentError, "Missing the required parameter 'expiration' when calling OptionsApi.get_options_chain_eod" end if @api_client.config.client_side_validation && opts[:'type'] && !['call', 'put'].include?(opts[:'type']) fail ArgumentError, 'invalid value for "type", must be one of call, put' end # resource path local_var_path = "/options/chain/{symbol}/{expiration}/eod".sub('{' + 'symbol' + '}', symbol.to_s).sub('{' + 'expiration' + '}', expiration.to_s) # query parameters query_params = {} query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'strike'] = opts[:'strike'] if !opts[:'strike'].nil? query_params[:'strike_greater_than'] = opts[:'strike_greater_than'] if !opts[:'strike_greater_than'].nil? query_params[:'strike_less_than'] = opts[:'strike_less_than'] if !opts[:'strike_less_than'].nil? query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? query_params[:'include_related_symbols'] = opts[:'include_related_symbols'] if !opts[:'include_related_symbols'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsChainEod') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_chain_eod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_chain_realtime(symbol, expiration, opts = {}) ⇒ ApiResponseOptionsChainRealtime
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.
634 635 636 637 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 634 def (symbol, expiration, opts = {}) data, _status_code, _headers = (symbol, expiration, opts) return data end |
#get_options_chain_realtime_with_http_info(symbol, expiration, opts = {}) ⇒ Array<(ApiResponseOptionsChainRealtime, Fixnum, Hash)>
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.
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 659 def (symbol, expiration, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_chain_realtime ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_options_chain_realtime" end # verify the required parameter 'expiration' is set if @api_client.config.client_side_validation && expiration.nil? fail ArgumentError, "Missing the required parameter 'expiration' when calling OptionsApi.get_options_chain_realtime" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end if @api_client.config.client_side_validation && opts[:'type'] && !['call', 'put'].include?(opts[:'type']) fail ArgumentError, 'invalid value for "type", must be one of call, put' end if @api_client.config.client_side_validation && opts[:'moneyness'] && !['all', 'in_the_money', 'out_of_the_money', 'near_the_money'].include?(opts[:'moneyness']) fail ArgumentError, 'invalid value for "moneyness", must be one of all, in_the_money, out_of_the_money, near_the_money' end if @api_client.config.client_side_validation && opts[:'stock_price_source'] && !['iex', 'bats_delayed', 'intrinio_mx', 'intrinio_mx_plus', 'delayed_sip', 'utp_delayed', 'otc_delayed', 'cta_a_delayed', 'cta_b_delayed', 'nasdaq_basic'].include?(opts[:'stock_price_source']) fail ArgumentError, 'invalid value for "stock_price_source", must be one of iex, bats_delayed, intrinio_mx, intrinio_mx_plus, delayed_sip, utp_delayed, otc_delayed, cta_a_delayed, cta_b_delayed, nasdaq_basic' end if @api_client.config.client_side_validation && opts[:'model'] && !['black_scholes', 'bjerk'].include?(opts[:'model']) fail ArgumentError, 'invalid value for "model", must be one of black_scholes, bjerk' end # resource path local_var_path = "/options/chain/{symbol}/{expiration}/realtime".sub('{' + 'symbol' + '}', symbol.to_s).sub('{' + 'expiration' + '}', expiration.to_s) # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'strike'] = opts[:'strike'] if !opts[:'strike'].nil? query_params[:'strike_greater_than'] = opts[:'strike_greater_than'] if !opts[:'strike_greater_than'].nil? query_params[:'strike_less_than'] = opts[:'strike_less_than'] if !opts[:'strike_less_than'].nil? query_params[:'volume_greater_than'] = opts[:'volume_greater_than'] if !opts[:'volume_greater_than'].nil? query_params[:'volume_less_than'] = opts[:'volume_less_than'] if !opts[:'volume_less_than'].nil? query_params[:'open_interest_greater_than'] = opts[:'open_interest_greater_than'] if !opts[:'open_interest_greater_than'].nil? query_params[:'open_interest_less_than'] = opts[:'open_interest_less_than'] if !opts[:'open_interest_less_than'].nil? query_params[:'moneyness'] = opts[:'moneyness'] if !opts[:'moneyness'].nil? query_params[:'stock_price_source'] = opts[:'stock_price_source'] if !opts[:'stock_price_source'].nil? query_params[:'model'] = opts[:'model'] if !opts[:'model'].nil? query_params[:'show_extended_price'] = opts[:'show_extended_price'] if !opts[:'show_extended_price'].nil? query_params[:'include_related_symbols'] = opts[:'include_related_symbols'] if !opts[:'include_related_symbols'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsChainRealtime') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_chain_realtime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_chain_with_http_info(symbol, expiration, opts = {}) ⇒ Array<(ApiResponseOptionsChain, Fixnum, Hash)>
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.
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 475 def (symbol, expiration, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_chain ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_options_chain" end # verify the required parameter 'expiration' is set if @api_client.config.client_side_validation && expiration.nil? fail ArgumentError, "Missing the required parameter 'expiration' when calling OptionsApi.get_options_chain" end if @api_client.config.client_side_validation && opts[:'type'] && !['call', 'put'].include?(opts[:'type']) fail ArgumentError, 'invalid value for "type", must be one of call, put' end if @api_client.config.client_side_validation && opts[:'moneyness'] && !['all', 'in_the_money', 'out_of_the_money', 'near_the_money'].include?(opts[:'moneyness']) fail ArgumentError, 'invalid value for "moneyness", must be one of all, in_the_money, out_of_the_money, near_the_money' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OptionsApi.get_options_chain, must be smaller than or equal to 10000.' end # resource path local_var_path = "/options/chain/{symbol}/{expiration}".sub('{' + 'symbol' + '}', symbol.to_s).sub('{' + 'expiration' + '}', expiration.to_s) # query parameters query_params = {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'strike'] = opts[:'strike'] if !opts[:'strike'].nil? query_params[:'strike_greater_than'] = opts[:'strike_greater_than'] if !opts[:'strike_greater_than'].nil? query_params[:'strike_less_than'] = opts[:'strike_less_than'] if !opts[:'strike_less_than'].nil? query_params[:'moneyness'] = opts[:'moneyness'] if !opts[:'moneyness'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsChain') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_chain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_expirations(symbol, opts = {}) ⇒ ApiResponseOptionsExpirations
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.
737 738 739 740 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 737 def (symbol, opts = {}) data, _status_code, _headers = (symbol, opts) return data end |
#get_options_expirations_eod(symbol, opts = {}) ⇒ ApiResponseOptionsExpirations
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
797 798 799 800 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 797 def (symbol, opts = {}) data, _status_code, _headers = (symbol, opts) return data end |
#get_options_expirations_eod_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>
Options Expirations Returns a list of all current and upcoming option contract expiration dates for a particular symbol.
810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 810 def (symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_expirations_eod ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_options_expirations_eod" end # resource path local_var_path = "/options/expirations/{symbol}/eod".sub('{' + 'symbol' + '}', symbol.to_s) # query parameters query_params = {} query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'include_related_symbols'] = opts[:'include_related_symbols'] if !opts[:'include_related_symbols'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsExpirations') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_expirations_eod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_expirations_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>
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.
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 749 def (symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_expirations ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_options_expirations" end # resource path local_var_path = "/options/expirations/{symbol}".sub('{' + 'symbol' + '}', symbol.to_s) # query parameters query_params = {} query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsExpirations') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_expirations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_interval_by_contract(identifier, interval_size, opts = {}) ⇒ OptionIntervalsResult
Options Intervals By Contract Returns a list of interval data points for a contract.
860 861 862 863 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 860 def (identifier, interval_size, opts = {}) data, _status_code, _headers = (identifier, interval_size, opts) return data end |
#get_options_interval_by_contract_with_http_info(identifier, interval_size, opts = {}) ⇒ Array<(OptionIntervalsResult, Fixnum, Hash)>
Options Intervals By Contract Returns a list of interval data points for a contract.
874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 874 def (identifier, interval_size, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_interval_by_contract ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling OptionsApi.get_options_interval_by_contract" end # verify the required parameter 'interval_size' is set if @api_client.config.client_side_validation && interval_size.nil? fail ArgumentError, "Missing the required parameter 'interval_size' when calling OptionsApi.get_options_interval_by_contract" end # verify enum value if @api_client.config.client_side_validation && !['SixtyMinute', '60m', '1h', 'ThirtyMinute', '30m', 'FifteenMinute', '15m', 'TenMinute', '10m', 'FiveMinute', '5m', 'OneMinute', '1m'].include?(interval_size) fail ArgumentError, "invalid value for 'interval_size', must be one of SixtyMinute, 60m, 1h, ThirtyMinute, 30m, FifteenMinute, 15m, TenMinute, 10m, FiveMinute, 5m, OneMinute, 1m" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 300 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OptionsApi.get_options_interval_by_contract, must be smaller than or equal to 300.' end # resource path local_var_path = "/options/interval/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'interval_size'] = interval_size query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OptionIntervalsResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_interval_by_contract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_interval_movers(opts = {}) ⇒ OptionIntervalsMoversResult
Options Intervals Movers Returns a list of intervals for the biggest movers over the last hour interval.
937 938 939 940 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 937 def (opts = {}) data, _status_code, _headers = (opts) return data end |
#get_options_interval_movers_change(opts = {}) ⇒ OptionIntervalsMoversResult
Options Intervals Movers By Change Returns a list of intervals for the biggest movers by change over the last hour interval.
993 994 995 996 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 993 def (opts = {}) data, _status_code, _headers = (opts) return data end |
#get_options_interval_movers_change_with_http_info(opts = {}) ⇒ Array<(OptionIntervalsMoversResult, Fixnum, Hash)>
Options Intervals Movers By Change Returns a list of intervals for the biggest movers by change over the last hour interval.
1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1004 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_interval_movers_change ..." end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end # resource path local_var_path = "/options/interval/movers/change" # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'open_time'] = opts[:'open_time'] if !opts[:'open_time'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OptionIntervalsMoversResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_interval_movers_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_interval_movers_volume(opts = {}) ⇒ OptionIntervalsMoversResult
Options Intervals Movers By Volume Returns a list of intervals for the biggest movers by volume over the last hour interval.
1049 1050 1051 1052 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1049 def (opts = {}) data, _status_code, _headers = (opts) return data end |
#get_options_interval_movers_volume_with_http_info(opts = {}) ⇒ Array<(OptionIntervalsMoversResult, Fixnum, Hash)>
Options Intervals Movers By Volume Returns a list of intervals for the biggest movers by volume over the last hour interval.
1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1060 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_interval_movers_volume ..." end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end # resource path local_var_path = "/options/interval/movers/volume" # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'open_time'] = opts[:'open_time'] if !opts[:'open_time'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OptionIntervalsMoversResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_interval_movers_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_interval_movers_with_http_info(opts = {}) ⇒ Array<(OptionIntervalsMoversResult, Fixnum, Hash)>
Options Intervals Movers Returns a list of intervals for the biggest movers over the last hour interval.
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 948 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_interval_movers ..." end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end # resource path local_var_path = "/options/interval/movers" # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'open_time'] = opts[:'open_time'] if !opts[:'open_time'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OptionIntervalsMoversResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_interval_movers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_prices(identifier, opts = {}) ⇒ ApiResponseOptionPrices
Option Prices Returns all price data from inception to expiration for a particular contract.
1108 1109 1110 1111 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1108 def (identifier, opts = {}) data, _status_code, _headers = (identifier, opts) return data end |
#get_options_prices_batch_realtime(body, opts = {}) ⇒ ApiResponseOptionsPricesBatchRealtime
Option Prices Batch Realtime Returns a list of latest price data for up to 250 option contracts per request.
1178 1179 1180 1181 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1178 def (body, opts = {}) data, _status_code, _headers = (body, opts) return data end |
#get_options_prices_batch_realtime_with_http_info(body, opts = {}) ⇒ Array<(ApiResponseOptionsPricesBatchRealtime, Fixnum, Hash)>
Option Prices Batch Realtime Returns a list of latest price data for up to 250 option contracts per request.
1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1193 def (body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_prices_batch_realtime ..." end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling OptionsApi.get_options_prices_batch_realtime" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end if @api_client.config.client_side_validation && opts[:'stock_price_source'] && !['iex', 'bats_delayed', 'intrinio_mx', 'intrinio_mx_plus', 'delayed_sip', 'utp_delayed', 'otc_delayed', 'cta_a_delayed', 'cta_b_delayed', 'nasdaq_basic'].include?(opts[:'stock_price_source']) fail ArgumentError, 'invalid value for "stock_price_source", must be one of iex, bats_delayed, intrinio_mx, intrinio_mx_plus, delayed_sip, utp_delayed, otc_delayed, cta_a_delayed, cta_b_delayed, nasdaq_basic' end if @api_client.config.client_side_validation && opts[:'model'] && !['black_scholes', 'bjerk'].include?(opts[:'model']) fail ArgumentError, 'invalid value for "model", must be one of black_scholes, bjerk' end # resource path local_var_path = "/options/prices/realtime/batch" # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'show_stats'] = opts[:'show_stats'] if !opts[:'show_stats'].nil? query_params[:'stock_price_source'] = opts[:'stock_price_source'] if !opts[:'stock_price_source'].nil? query_params[:'model'] = opts[:'model'] if !opts[:'model'].nil? query_params[:'show_extended_price'] = opts[:'show_extended_price'] if !opts[:'show_extended_price'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsPricesBatchRealtime') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_prices_batch_realtime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_prices_eod(identifier, opts = {}) ⇒ ApiResponseOptionsPricesEod
Option Prices EOD Returns all option prices for a given option contract identifier.
1255 1256 1257 1258 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1255 def (identifier, opts = {}) data, _status_code, _headers = (identifier, opts) return data end |
#get_options_prices_eod_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOptionsPricesEod, Fixnum, Hash)>
Option Prices EOD Returns all option prices for a given option contract identifier.
1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1268 def (identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_prices_eod ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling OptionsApi.get_options_prices_eod" end # resource path local_var_path = "/options/prices/{identifier}/eod".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsPricesEod') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_prices_eod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_prices_realtime(identifier, opts = {}) ⇒ ApiResponseOptionsPriceRealtime
Option Prices Realtime Returns all option prices for a given option contract identifier.
1318 1319 1320 1321 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1318 def (identifier, opts = {}) data, _status_code, _headers = (identifier, opts) return data end |
#get_options_prices_realtime_by_ticker(symbol, opts = {}) ⇒ ApiResponseOptionsPricesByTickerRealtime
Option Prices Realtime By Ticker 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.
1395 1396 1397 1398 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1395 def (symbol, opts = {}) data, _status_code, _headers = (symbol, opts) return data end |
#get_options_prices_realtime_by_ticker_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsPricesByTickerRealtime, Fixnum, Hash)>
Option Prices Realtime By Ticker 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.
1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1412 def (symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_prices_realtime_by_ticker ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_options_prices_realtime_by_ticker" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end if @api_client.config.client_side_validation && opts[:'iv_mode'] && !['out_of_the_money'].include?(opts[:'iv_mode']) fail ArgumentError, 'invalid value for "iv_mode", must be one of out_of_the_money' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OptionsApi.get_options_prices_realtime_by_ticker, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && opts[:'stock_price_source'] && !['iex', 'bats_delayed', 'intrinio_mx', 'intrinio_mx_plus', 'delayed_sip', 'utp_delayed', 'otc_delayed', 'cta_a_delayed', 'cta_b_delayed', 'nasdaq_basic'].include?(opts[:'stock_price_source']) fail ArgumentError, 'invalid value for "stock_price_source", must be one of iex, bats_delayed, intrinio_mx, intrinio_mx_plus, delayed_sip, utp_delayed, otc_delayed, cta_a_delayed, cta_b_delayed, nasdaq_basic' end if @api_client.config.client_side_validation && opts[:'model'] && !['black_scholes', 'bjerk'].include?(opts[:'model']) fail ArgumentError, 'invalid value for "model", must be one of black_scholes, bjerk' end # resource path local_var_path = "/options/prices/by_ticker/{symbol}/realtime".sub('{' + 'symbol' + '}', symbol.to_s) # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'iv_mode'] = opts[:'iv_mode'] if !opts[:'iv_mode'].nil? query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'stock_price_source'] = opts[:'stock_price_source'] if !opts[:'stock_price_source'].nil? query_params[:'model'] = opts[:'model'] if !opts[:'model'].nil? query_params[:'show_extended_price'] = opts[:'show_extended_price'] if !opts[:'show_extended_price'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsPricesByTickerRealtime') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_prices_realtime_by_ticker\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_prices_realtime_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOptionsPriceRealtime, Fixnum, Hash)>
Option Prices Realtime Returns all option prices for a given option contract identifier.
1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1332 def (identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_prices_realtime ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling OptionsApi.get_options_prices_realtime" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end if @api_client.config.client_side_validation && opts[:'stock_price_source'] && !['iex', 'bats_delayed', 'intrinio_mx', 'intrinio_mx_plus', 'delayed_sip', 'utp_delayed', 'otc_delayed', 'cta_a_delayed', 'cta_b_delayed', 'nasdaq_basic'].include?(opts[:'stock_price_source']) fail ArgumentError, 'invalid value for "stock_price_source", must be one of iex, bats_delayed, intrinio_mx, intrinio_mx_plus, delayed_sip, utp_delayed, otc_delayed, cta_a_delayed, cta_b_delayed, nasdaq_basic' end if @api_client.config.client_side_validation && opts[:'model'] && !['black_scholes', 'bjerk'].include?(opts[:'model']) fail ArgumentError, 'invalid value for "model", must be one of black_scholes, bjerk' end # resource path local_var_path = "/options/prices/{identifier}/realtime".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'stock_price_source'] = opts[:'stock_price_source'] if !opts[:'stock_price_source'].nil? query_params[:'model'] = opts[:'model'] if !opts[:'model'].nil? query_params[:'show_extended_price'] = opts[:'show_extended_price'] if !opts[:'show_extended_price'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsPriceRealtime') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_prices_realtime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_prices_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOptionPrices, Fixnum, Hash)>
Option Prices Returns all price data from inception to expiration for a particular contract.
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1122 def (identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_prices ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling OptionsApi.get_options_prices" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OptionsApi.get_options_prices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/options/prices/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionPrices') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_snapshots(opts = {}) ⇒ OptionSnapshotsResult
Option Prices Realtime Snapshot Returns all options snapshots for the queried interval with links to download.
1479 1480 1481 1482 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1479 def (opts = {}) data, _status_code, _headers = (opts) return data end |
#get_options_snapshots_with_http_info(opts = {}) ⇒ Array<(OptionSnapshotsResult, Fixnum, Hash)>
Option Prices Realtime Snapshot Returns all options snapshots for the queried interval with links to download.
1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1490 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_snapshots ..." end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end # resource path local_var_path = "/options/snapshots" # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'at_datetime'] = opts[:'at_datetime'] if !opts[:'at_datetime'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OptionSnapshotsResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_snapshots\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_stats_realtime(identifier, opts = {}) ⇒ ApiResponseOptionsStatsRealtime
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.
1536 1537 1538 1539 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1536 def (identifier, opts = {}) data, _status_code, _headers = (identifier, opts) return data end |
#get_options_stats_realtime_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOptionsStatsRealtime, Fixnum, Hash)>
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.
1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1548 def (identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options_stats_realtime ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling OptionsApi.get_options_stats_realtime" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end # resource path local_var_path = "/options/prices/{identifier}/realtime/stats".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'show_extended_price'] = opts[:'show_extended_price'] if !opts[:'show_extended_price'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsStatsRealtime') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options_stats_realtime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_options_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptions, Fixnum, Hash)>
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.
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 304 def (symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_options ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_options" end if @api_client.config.client_side_validation && opts[:'type'] && !['call', 'put'].include?(opts[:'type']) fail ArgumentError, 'invalid value for "type", must be one of call, put' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OptionsApi.get_options, must be smaller than or equal to 10000.' end # resource path local_var_path = "/options/{symbol}".sub('{' + 'symbol' + '}', symbol.to_s) # query parameters query_params = {} query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'strike'] = opts[:'strike'] if !opts[:'strike'].nil? query_params[:'strike_greater_than'] = opts[:'strike_greater_than'] if !opts[:'strike_greater_than'].nil? query_params[:'strike_less_than'] = opts[:'strike_less_than'] if !opts[:'strike_less_than'].nil? query_params[:'expiration'] = opts[:'expiration'] if !opts[:'expiration'].nil? query_params[:'expiration_after'] = opts[:'expiration_after'] if !opts[:'expiration_after'].nil? query_params[:'expiration_before'] = opts[:'expiration_before'] if !opts[:'expiration_before'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptions') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_unusual_activity(symbol, opts = {}) ⇒ ApiResponseOptionsUnusualActivity
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.
1597 1598 1599 1600 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1597 def get_unusual_activity(symbol, opts = {}) data, _status_code, _headers = get_unusual_activity_with_http_info(symbol, opts) return data end |
#get_unusual_activity_intraday(symbol, opts = {}) ⇒ ApiResponseOptionsUnusualActivity
Options Unusual Activity Intraday Returns unusual trades for a given identifier within the query parameters.
1663 1664 1665 1666 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1663 def get_unusual_activity_intraday(symbol, opts = {}) data, _status_code, _headers = get_unusual_activity_intraday_with_http_info(symbol, opts) return data end |
#get_unusual_activity_intraday_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>
Options Unusual Activity Intraday Returns unusual trades for a given identifier within the query parameters.
1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1681 def get_unusual_activity_intraday_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_unusual_activity_intraday ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_unusual_activity_intraday" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OptionsApi.get_unusual_activity_intraday, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && opts[:'activity_type'] && !['block', 'sweep', 'large'].include?(opts[:'activity_type']) fail ArgumentError, 'invalid value for "activity_type", must be one of block, sweep, large' end if @api_client.config.client_side_validation && opts[:'sentiment'] && !['bullish', 'bearish', 'neutral'].include?(opts[:'sentiment']) fail ArgumentError, 'invalid value for "sentiment", must be one of bullish, bearish, neutral' end # resource path local_var_path = "/options/unusual_activity/{symbol}/intraday".sub('{' + 'symbol' + '}', symbol.to_s) # query parameters query_params = {} query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'activity_type'] = opts[:'activity_type'] if !opts[:'activity_type'].nil? query_params[:'sentiment'] = opts[:'sentiment'] if !opts[:'sentiment'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'minimum_total_value'] = opts[:'minimum_total_value'] if !opts[:'minimum_total_value'].nil? query_params[:'maximum_total_value'] = opts[:'maximum_total_value'] if !opts[:'maximum_total_value'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsUnusualActivity') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_unusual_activity_intraday\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_unusual_activity_universal(opts = {}) ⇒ ApiResponseOptionsUnusualActivity
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.
1742 1743 1744 1745 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1742 def get_unusual_activity_universal(opts = {}) data, _status_code, _headers = get_unusual_activity_universal_with_http_info(opts) return data end |
#get_unusual_activity_universal_intraday(opts = {}) ⇒ ApiResponseOptionsUnusualActivity
Options Unusual Activity Universal Intraday Returns unusual trades for all underlying security symbols within the query parameters.
1802 1803 1804 1805 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1802 def get_unusual_activity_universal_intraday(opts = {}) data, _status_code, _headers = get_unusual_activity_universal_intraday_with_http_info(opts) return data end |
#get_unusual_activity_universal_intraday_with_http_info(opts = {}) ⇒ Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>
Options Unusual Activity Universal Intraday Returns unusual trades for all underlying security symbols within the query parameters.
1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1819 def get_unusual_activity_universal_intraday_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_unusual_activity_universal_intraday ..." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OptionsApi.get_unusual_activity_universal_intraday, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && opts[:'activity_type'] && !['block', 'sweep', 'large'].include?(opts[:'activity_type']) fail ArgumentError, 'invalid value for "activity_type", must be one of block, sweep, large' end if @api_client.config.client_side_validation && opts[:'sentiment'] && !['bullish', 'bearish', 'neutral'].include?(opts[:'sentiment']) fail ArgumentError, 'invalid value for "sentiment", must be one of bullish, bearish, neutral' end # resource path local_var_path = "/options/unusual_activity/intraday" # query parameters query_params = {} query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'activity_type'] = opts[:'activity_type'] if !opts[:'activity_type'].nil? query_params[:'sentiment'] = opts[:'sentiment'] if !opts[:'sentiment'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'minimum_total_value'] = opts[:'minimum_total_value'] if !opts[:'minimum_total_value'].nil? query_params[:'maximum_total_value'] = opts[:'maximum_total_value'] if !opts[:'maximum_total_value'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsUnusualActivity') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_unusual_activity_universal_intraday\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_unusual_activity_universal_with_http_info(opts = {}) ⇒ Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>
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.
1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1752 def get_unusual_activity_universal_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_unusual_activity_universal ..." end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end # resource path local_var_path = "/options/unusual_activity" # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsUnusualActivity') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_unusual_activity_universal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_unusual_activity_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>
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.
1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1608 def get_unusual_activity_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OptionsApi.get_unusual_activity ..." end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling OptionsApi.get_unusual_activity" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed' end # resource path local_var_path = "/options/unusual_activity/{symbol}".sub('{' + 'symbol' + '}', symbol.to_s) # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseOptionsUnusualActivity') if @api_client.config.debugging @api_client.config.logger.debug "API called: OptionsApi#get_unusual_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |