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_expirations_realtime(symbol, opts = {}) ⇒ ApiResponseOptionsExpirations
Option Expirations Realtime Returns all realtime option contract expiration dates for a given symbol.
-
#get_option_expirations_realtime_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>
Option Expirations Realtime Returns all realtime option contract expiration dates for a given symbol.
-
#get_option_strikes_realtime(symbol, strike, opts = {}) ⇒ ApiResponseOptionsChainRealtime
Option Strikes Realtime Returns all realtime options contracts and their prices for the given symbol and strike.
-
#get_option_strikes_realtime_with_http_info(symbol, strike, opts = {}) ⇒ Array<(ApiResponseOptionsChainRealtime, Fixnum, Hash)>
Option Strikes Realtime Returns all realtime options contracts and their prices for the given symbol and strike.
-
#get_options(symbol, opts = {}) ⇒ ApiResponseOptions
Options Returns the master list of option contracts for a given symbol.
-
#get_options_by_symbol_realtime(symbol, opts = {}) ⇒ ApiResponseOptionsRealtime
Options by Symbol Realtime Returns the master list of realtime option contracts for a given symbol.
-
#get_options_by_symbol_realtime_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsRealtime, Fixnum, Hash)>
Options by Symbol Realtime Returns the master list of realtime option contracts for a given symbol.
-
#get_options_chain(symbol, expiration, opts = {}) ⇒ ApiResponseOptionsChain
Options Chain Returns all options contracts and their prices for the given symbol and expiration date.
-
#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 all realtime options contracts and their prices for the given symbol and expiration date.
-
#get_options_chain_realtime_with_http_info(symbol, expiration, opts = {}) ⇒ Array<(ApiResponseOptionsChainRealtime, Fixnum, Hash)>
Options Chain Realtime Returns all realtime options contracts and their prices for the given symbol and expiration date.
-
#get_options_chain_with_http_info(symbol, expiration, opts = {}) ⇒ Array<(ApiResponseOptionsChain, Fixnum, Hash)>
Options Chain Returns all options contracts and their prices for the given symbol and expiration date.
-
#get_options_expirations(symbol, opts = {}) ⇒ ApiResponseOptionsExpirations
Options Expirations Returns all option contract expiration dates for a given symbol.
-
#get_options_expirations_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>
Options Expirations Returns all option contract expiration dates for a given symbol.
-
#get_options_prices(identifier, opts = {}) ⇒ ApiResponseOptionPrices
Option Prices Returns all option prices for a given option contract identifier.
-
#get_options_prices_batch_realtime(body, opts = {}) ⇒ ApiResponseOptionsPricesBatchRealtime
Option Prices Batch Realtime Returns options prices for a supplied list of option symbols.
-
#get_options_prices_batch_realtime_with_http_info(body, opts = {}) ⇒ Array<(ApiResponseOptionsPricesBatchRealtime, Fixnum, Hash)>
Option Prices Batch Realtime Returns options prices for a supplied list of option symbols.
-
#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_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 option prices for a given option contract identifier.
-
#get_options_stats_realtime(identifier, opts = {}) ⇒ ApiResponseOptionsStatsRealtime
Option Stats Realtime Returns all option stats (greeks and implied volatility) and factors used to calculate them, for a given option contract identifier.
-
#get_options_stats_realtime_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseOptionsStatsRealtime, Fixnum, Hash)>
Option Stats Realtime Returns all option stats (greeks and implied volatility) and factors used to calculate them, for a given option contract identifier.
-
#get_options_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptions, Fixnum, Hash)>
Options Returns the master list of option contracts for a given symbol.
-
#get_unusual_activity(symbol, opts = {}) ⇒ ApiResponseOptionsUnusualActivity
Options Unusual Activity Returns unusual trades for a given identifier.
-
#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 nusual trades for all underlying security symbols.
-
#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 nusual trades for all underlying security symbols.
-
#get_unusual_activity_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>
Options Unusual Activity Returns unusual trades for a given identifier.
-
#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_expirations_realtime(symbol, opts = {}) ⇒ ApiResponseOptionsExpirations
Option Expirations Realtime Returns all realtime option contract expiration dates for a given symbol.
78 79 80 81 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 78 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)>
Option Expirations Realtime Returns all realtime option contract expiration dates for a given symbol.
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 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 91 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? # 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 all realtime options contracts and their prices for the given symbol and strike.
141 142 143 144 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 141 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 all realtime options contracts and their prices for the given symbol and strike.
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 187 188 189 190 191 192 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 152 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 # resource path local_var_path = "/options/strikes/{symbol}/{strike}/realtime".sub('{' + 'symbol' + '}', symbol.to_s).sub('{' + 'strike' + '}', strike.to_s) # 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 => '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 the master list of option contracts for a given symbol.
208 209 210 211 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 208 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 the master list of realtime option contracts for a given symbol.
294 295 296 297 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 294 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 the master list of realtime option contracts for a given symbol.
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 357 358 359 360 361 362 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 312 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? # 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 all options contracts and their prices for the given symbol and expiration date.
377 378 379 380 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 377 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.
464 465 466 467 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 464 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.
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 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 479 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? # 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 all realtime options contracts and their prices for the given symbol and expiration date.
544 545 546 547 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 544 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 all realtime options contracts and their prices for the given symbol and expiration date.
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 613 614 615 616 617 618 619 620 621 622 623 624 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 565 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 # 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? # 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 all options contracts and their prices for the given symbol and expiration date.
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 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 395 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 all option contract expiration dates for a given symbol.
633 634 635 636 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 633 def (symbol, opts = {}) data, _status_code, _headers = (symbol, opts) return data end |
#get_options_expirations_with_http_info(symbol, opts = {}) ⇒ Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>
Options Expirations Returns all option contract expiration dates for a given symbol.
645 646 647 648 649 650 651 652 653 654 655 656 657 658 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 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 645 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_prices(identifier, opts = {}) ⇒ ApiResponseOptionPrices
Option Prices Returns all option prices for a given option contract identifier.
694 695 696 697 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 694 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 options prices for a supplied list of option symbols.
760 761 762 763 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 760 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 options prices for a supplied list of option symbols.
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 771 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 # resource path local_var_path = "/options/prices/realtime/batch" # 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']) # 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.
820 821 822 823 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 820 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.
830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 830 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 = {} # 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.
874 875 876 877 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 874 def (identifier, opts = {}) data, _status_code, _headers = (identifier, opts) return data 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.
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 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 885 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 # 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? # 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 option prices for a given option contract identifier.
708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 708 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_stats_realtime(identifier, opts = {}) ⇒ ApiResponseOptionsStatsRealtime
Option Stats Realtime Returns all option stats (greeks and implied volatility) and factors used to calculate them, for a given option contract identifier.
933 934 935 936 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 933 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) and factors used to calculate them, for a given option contract identifier.
944 945 946 947 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 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 944 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? # 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 the master list of option contracts for a given symbol.
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 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 227 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 trades for a given identifier.
992 993 994 995 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 992 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.
1058 1059 1060 1061 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1058 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.
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1076 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 nusual trades for all underlying security symbols.
1137 1138 1139 1140 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1137 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.
1197 1198 1199 1200 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1197 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.
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 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1214 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 nusual trades for all underlying security symbols.
1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1147 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 trades for a given identifier.
1003 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 1042 1043 |
# File 'lib/intrinio-sdk/api/options_api.rb', line 1003 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 |