class Intrinio::OptionsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/intrinio-sdk/api/options_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_all_options_tickers(opts = {}) click to toggle source

Options Tickers Returns all tickers that have existing options contracts. @param [Hash] opts the optional parameters @return [ApiResponseOptionsTickers]

# File lib/intrinio-sdk/api/options_api.rb, line 27
def get_all_options_tickers(opts = {})
  data, _status_code, _headers = get_all_options_tickers_with_http_info(opts)
  return data
end
get_all_options_tickers_with_http_info(opts = {}) click to toggle source

Options Tickers Returns all tickers that have existing options contracts. @param [Hash] opts the optional parameters @return [Array<(ApiResponseOptionsTickers, Fixnum, Hash)>] ApiResponseOptionsTickers data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 36
def get_all_options_tickers_with_http_info(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 = {}) click to toggle source

Option Expirations Realtime Returns all realtime option contract expiration dates for a given symbol. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :after Return option contract expiration dates after this date. @option opts [String] :before Return option contract expiration dates before this date. @option opts [String] :source Realtime or 15-minute delayed contracts. @return [ApiResponseOptionsExpirations]

# 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 = {}) click to toggle source

Option Expirations Realtime Returns all realtime option contract expiration dates for a given symbol. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :after Return option contract expiration dates after this date. @option opts [String] :before Return option contract expiration dates before this date. @option opts [String] :source Realtime or 15-minute delayed contracts. @return [Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>] ApiResponseOptionsExpirations data, response status code and response headers

# 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 = {}) click to toggle source

Option Strikes Realtime Returns all realtime options contracts and their prices for the given symbol and strike. @param symbol The option symbol, corresponding to the underlying security. @param strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @param [Hash] opts the optional parameters @return [ApiResponseOptionsChainRealtime]

# 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 = {}) click to toggle source

Option Strikes Realtime Returns all realtime options contracts and their prices for the given symbol and strike. @param symbol The option symbol, corresponding to the underlying security. @param strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @param [Hash] opts the optional parameters @return [Array<(ApiResponseOptionsChainRealtime, Fixnum, Hash)>] ApiResponseOptionsChainRealtime data, response status code and response headers

# 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 = {}) click to toggle source

Options Returns the master list of option contracts for a given symbol. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :type The option contract type. @option opts [Float] :strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @option opts [Float] :strike_greater_than The strike price of the option contract. This will return options contracts with strike prices greater than this price. @option opts [Float] :strike_less_than The strike price of the option contract. This will return options contracts with strike prices less than this price. @option opts [String] :expiration The expiration date of the option contract. This will return options contracts with expiration dates on this date. @option opts [String] :expiration_after The expiration date of the option contract. This will return options contracts with expiration dates after this date. @option opts [String] :expiration_before The expiration date of the option contract. This will return options contracts with expiration dates before this date. @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseOptions]

# File lib/intrinio-sdk/api/options_api.rb, line 208
def get_options(symbol, opts = {})
  data, _status_code, _headers = get_options_with_http_info(symbol, opts)
  return data
end
get_options_by_symbol_realtime(symbol, opts = {}) click to toggle source

Options by Symbol Realtime Returns the master list of realtime option contracts for a given symbol. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :type The option contract type. @option opts [Float] :strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @option opts [Float] :strike_greater_than The strike price of the option contract. This will return options contracts with strike prices greater than this price. @option opts [Float] :strike_less_than The strike price of the option contract. This will return options contracts with strike prices less than this price. @option opts [String] :expiration The expiration date of the option contract. This will return options contracts with expiration dates on this date. @option opts [String] :expiration_after The expiration date of the option contract. This will return options contracts with expiration dates after this date. @option opts [String] :expiration_before The expiration date of the option contract. This will return options contracts with expiration dates before this date. @option opts [String] :source Realtime or 15-minute delayed contracts. @return [ApiResponseOptionsRealtime]

# File lib/intrinio-sdk/api/options_api.rb, line 294
def get_options_by_symbol_realtime(symbol, opts = {})
  data, _status_code, _headers = get_options_by_symbol_realtime_with_http_info(symbol, opts)
  return data
end
get_options_by_symbol_realtime_with_http_info(symbol, opts = {}) click to toggle source

Options by Symbol Realtime Returns the master list of realtime option contracts for a given symbol. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :type The option contract type. @option opts [Float] :strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @option opts [Float] :strike_greater_than The strike price of the option contract. This will return options contracts with strike prices greater than this price. @option opts [Float] :strike_less_than The strike price of the option contract. This will return options contracts with strike prices less than this price. @option opts [String] :expiration The expiration date of the option contract. This will return options contracts with expiration dates on this date. @option opts [String] :expiration_after The expiration date of the option contract. This will return options contracts with expiration dates after this date. @option opts [String] :expiration_before The expiration date of the option contract. This will return options contracts with expiration dates before this date. @option opts [String] :source Realtime or 15-minute delayed contracts. @return [Array<(ApiResponseOptionsRealtime, Fixnum, Hash)>] ApiResponseOptionsRealtime data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 312
def get_options_by_symbol_realtime_with_http_info(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 = {}) click to toggle source

Options Chain Returns all options contracts and their prices for the given symbol and expiration date. @param symbol The option symbol, corresponding to the underlying security. @param expiration The expiration date of the options contract @param [Hash] opts the optional parameters @option opts [Date] :date The date of the option price. Returns option prices on this date. @option opts [String] :type The option contract type. @option opts [Float] :strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @option opts [Float] :strike_greater_than The strike price of the option contract. This will return options contracts with strike prices greater than this price. @option opts [Float] :strike_less_than The strike price of the option contract. This will return options contracts with strike prices less than this price. @option opts [String] :moneyness The moneyness of the options contracts to return. &#39;all&#39; will return all options contracts. &#39;in_the_money&#39; will return options contracts that are in the money (call options with strike prices below the current price, put options with strike prices above the current price). &#39;out_of_they_money&#39; will return options contracts that are out of the money (call options with strike prices above the current price, put options with strike prices below the current price). &#39;near_the_money&#39; will return options contracts that are $0.50 or less away from being in the money. @option opts [Integer] :page_size The number of results to return (default to 100) @return [ApiResponseOptionsChain]

# File lib/intrinio-sdk/api/options_api.rb, line 377
def get_options_chain(symbol, expiration, opts = {})
  data, _status_code, _headers = get_options_chain_with_http_info(symbol, expiration, opts)
  return data
end
get_options_chain_realtime(symbol, expiration, opts = {}) click to toggle source

Options Chain Realtime Returns all realtime options contracts and their prices for the given symbol and expiration date. @param symbol The option symbol, corresponding to the underlying security. @param expiration The expiration date of the options contract @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @option opts [String] :type The option contract type. @option opts [Float] :strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @option opts [Float] :strike_greater_than The strike price of the option contract. This will return options contracts with strike prices greater than this price. @option opts [Float] :strike_less_than The strike price of the option contract. This will return options contracts with strike prices less than this price. @option opts [Float] :volume_greater_than The volume of the option contract. This will return options contracts with volumes greater than this amount. @option opts [Float] :volume_less_than The volume of the option contract. This will return options contracts with volumes less than this amout. @option opts [Float] :open_interest_greater_than The open interest of the option contract. This will return options contracts with open interest greater than this amount. @option opts [Float] :open_interest_less_than The open interest of the option contract. This will return options contracts with open interest less than this amount. @option opts [String] :moneyness The moneyness of the options contracts to return. &#39;all&#39; will return all options contracts. &#39;in_the_money&#39; will return options contracts that are in the money (call options with strike prices below the current price, put options with strike prices above the current price). &#39;out_of_they_money&#39; will return options contracts that are out of the money (call options with strike prices above the current price, put options with strike prices below the current price). &#39;near_the_money&#39; will return options contracts that are $0.50 or less away from being in the money. Requires subscription to realtime stock price data. @return [ApiResponseOptionsChainRealtime]

# File lib/intrinio-sdk/api/options_api.rb, line 470
def get_options_chain_realtime(symbol, expiration, opts = {})
  data, _status_code, _headers = get_options_chain_realtime_with_http_info(symbol, expiration, opts)
  return data
end
get_options_chain_realtime_with_http_info(symbol, expiration, opts = {}) click to toggle source

Options Chain Realtime Returns all realtime options contracts and their prices for the given symbol and expiration date. @param symbol The option symbol, corresponding to the underlying security. @param expiration The expiration date of the options contract @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @option opts [String] :type The option contract type. @option opts [Float] :strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @option opts [Float] :strike_greater_than The strike price of the option contract. This will return options contracts with strike prices greater than this price. @option opts [Float] :strike_less_than The strike price of the option contract. This will return options contracts with strike prices less than this price. @option opts [Float] :volume_greater_than The volume of the option contract. This will return options contracts with volumes greater than this amount. @option opts [Float] :volume_less_than The volume of the option contract. This will return options contracts with volumes less than this amout. @option opts [Float] :open_interest_greater_than The open interest of the option contract. This will return options contracts with open interest greater than this amount. @option opts [Float] :open_interest_less_than The open interest of the option contract. This will return options contracts with open interest less than this amount. @option opts [String] :moneyness The moneyness of the options contracts to return. &#39;all&#39; will return all options contracts. &#39;in_the_money&#39; will return options contracts that are in the money (call options with strike prices below the current price, put options with strike prices above the current price). &#39;out_of_they_money&#39; will return options contracts that are out of the money (call options with strike prices above the current price, put options with strike prices below the current price). &#39;near_the_money&#39; will return options contracts that are $0.50 or less away from being in the money. Requires subscription to realtime stock price data. @return [Array<(ApiResponseOptionsChainRealtime, Fixnum, Hash)>] ApiResponseOptionsChainRealtime data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 491
def get_options_chain_realtime_with_http_info(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 = {}) click to toggle source

Options Chain Returns all options contracts and their prices for the given symbol and expiration date. @param symbol The option symbol, corresponding to the underlying security. @param expiration The expiration date of the options contract @param [Hash] opts the optional parameters @option opts [Date] :date The date of the option price. Returns option prices on this date. @option opts [String] :type The option contract type. @option opts [Float] :strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @option opts [Float] :strike_greater_than The strike price of the option contract. This will return options contracts with strike prices greater than this price. @option opts [Float] :strike_less_than The strike price of the option contract. This will return options contracts with strike prices less than this price. @option opts [String] :moneyness The moneyness of the options contracts to return. &#39;all&#39; will return all options contracts. &#39;in_the_money&#39; will return options contracts that are in the money (call options with strike prices below the current price, put options with strike prices above the current price). &#39;out_of_they_money&#39; will return options contracts that are out of the money (call options with strike prices above the current price, put options with strike prices below the current price). &#39;near_the_money&#39; will return options contracts that are $0.50 or less away from being in the money. @option opts [Integer] :page_size The number of results to return @return [Array<(ApiResponseOptionsChain, Fixnum, Hash)>] ApiResponseOptionsChain data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 395
def get_options_chain_with_http_info(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 = {}) click to toggle source

Options Expirations Returns all option contract expiration dates for a given symbol. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :after Return option contract expiration dates after this date. @option opts [String] :before Return option contract expiration dates before this date. @return [ApiResponseOptionsExpirations]

# File lib/intrinio-sdk/api/options_api.rb, line 559
def get_options_expirations(symbol, opts = {})
  data, _status_code, _headers = get_options_expirations_with_http_info(symbol, opts)
  return data
end
get_options_expirations_with_http_info(symbol, opts = {}) click to toggle source

Options Expirations Returns all option contract expiration dates for a given symbol. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :after Return option contract expiration dates after this date. @option opts [String] :before Return option contract expiration dates before this date. @return [Array<(ApiResponseOptionsExpirations, Fixnum, Hash)>] ApiResponseOptionsExpirations data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 571
def get_options_expirations_with_http_info(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 = {}) click to toggle source

Option Prices Returns all option prices for a given option contract identifier. @param identifier The Intrinio ID or code of the options contract to request prices for. @param [Hash] opts the optional parameters @option opts [String] :start_date Return option contract prices on or after this date. @option opts [String] :end_date Return option contract prices on or before this date. @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseOptionPrices]

# File lib/intrinio-sdk/api/options_api.rb, line 620
def get_options_prices(identifier, opts = {})
  data, _status_code, _headers = get_options_prices_with_http_info(identifier, opts)
  return data
end
get_options_prices_batch_realtime(body, opts = {}) click to toggle source

Option Prices Batch Realtime Returns options prices for a supplied list of option symbols. @param body The contract symbols for which to return options prices for. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [ApiResponseOptionsPricesBatchRealtime]

# File lib/intrinio-sdk/api/options_api.rb, line 686
def get_options_prices_batch_realtime(body, opts = {})
  data, _status_code, _headers = get_options_prices_batch_realtime_with_http_info(body, opts)
  return data
end
get_options_prices_batch_realtime_with_http_info(body, opts = {}) click to toggle source

Option Prices Batch Realtime Returns options prices for a supplied list of option symbols. @param body The contract symbols for which to return options prices for. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [Array<(ApiResponseOptionsPricesBatchRealtime, Fixnum, Hash)>] ApiResponseOptionsPricesBatchRealtime data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 697
def get_options_prices_batch_realtime_with_http_info(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_realtime(identifier, opts = {}) click to toggle source

Option Prices Realtime Returns all option prices for a given option contract identifier. @param identifier The Intrinio ID or code of the options contract to request prices for. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [ApiResponseOptionsPriceRealtime]

# File lib/intrinio-sdk/api/options_api.rb, line 747
def get_options_prices_realtime(identifier, opts = {})
  data, _status_code, _headers = get_options_prices_realtime_with_http_info(identifier, opts)
  return data
end
get_options_prices_realtime_with_http_info(identifier, opts = {}) click to toggle source

Option Prices Realtime Returns all option prices for a given option contract identifier. @param identifier The Intrinio ID or code of the options contract to request prices for. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [Array<(ApiResponseOptionsPriceRealtime, Fixnum, Hash)>] ApiResponseOptionsPriceRealtime data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 758
def get_options_prices_realtime_with_http_info(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 = {}) click to toggle source

Option Prices Returns all option prices for a given option contract identifier. @param identifier The Intrinio ID or code of the options contract to request prices for. @param [Hash] opts the optional parameters @option opts [String] :start_date Return option contract prices on or after this date. @option opts [String] :end_date Return option contract prices on or before this date. @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseOptionPrices, Fixnum, Hash)>] ApiResponseOptionPrices data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 634
def get_options_prices_with_http_info(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 = {}) click to toggle source

Option Stats Realtime Returns all option stats (greeks and implied volatility) and factors used to calculate them, for a given option contract identifier. @param identifier The Intrinio ID or code of the options contract to request prices for. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [ApiResponseOptionsStatsRealtime]

# File lib/intrinio-sdk/api/options_api.rb, line 806
def get_options_stats_realtime(identifier, opts = {})
  data, _status_code, _headers = get_options_stats_realtime_with_http_info(identifier, opts)
  return data
end
get_options_stats_realtime_with_http_info(identifier, opts = {}) click to toggle source

Option Stats Realtime Returns all option stats (greeks and implied volatility) and factors used to calculate them, for a given option contract identifier. @param identifier The Intrinio ID or code of the options contract to request prices for. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [Array<(ApiResponseOptionsStatsRealtime, Fixnum, Hash)>] ApiResponseOptionsStatsRealtime data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 817
def get_options_stats_realtime_with_http_info(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 = {}) click to toggle source

Options Returns the master list of option contracts for a given symbol. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :type The option contract type. @option opts [Float] :strike The strike price of the option contract. This will return options contracts with strike price equal to this price. @option opts [Float] :strike_greater_than The strike price of the option contract. This will return options contracts with strike prices greater than this price. @option opts [Float] :strike_less_than The strike price of the option contract. This will return options contracts with strike prices less than this price. @option opts [String] :expiration The expiration date of the option contract. This will return options contracts with expiration dates on this date. @option opts [String] :expiration_after The expiration date of the option contract. This will return options contracts with expiration dates after this date. @option opts [String] :expiration_before The expiration date of the option contract. This will return options contracts with expiration dates before this date. @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseOptions, Fixnum, Hash)>] ApiResponseOptions data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 227
def get_options_with_http_info(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 = {}) click to toggle source

Options Unusual Activity Returns unusual trades for a given identifier. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [ApiResponseOptionsUnusualActivity]

# File lib/intrinio-sdk/api/options_api.rb, line 865
def get_unusual_activity(symbol, opts = {})
  data, _status_code, _headers = get_unusual_activity_with_http_info(symbol, opts)
  return data
end
get_unusual_activity_universal(opts = {}) click to toggle source

Options Unusual Activity Universal Returns nusual trades for all underlying security symbols. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [ApiResponseOptionsUnusualActivity]

# File lib/intrinio-sdk/api/options_api.rb, line 923
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_with_http_info(opts = {}) click to toggle source

Options Unusual Activity Universal Returns nusual trades for all underlying security symbols. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>] ApiResponseOptionsUnusualActivity data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 933
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 = {}) click to toggle source

Options Unusual Activity Returns unusual trades for a given identifier. @param symbol The option symbol, corresponding to the underlying security. @param [Hash] opts the optional parameters @option opts [String] :source Realtime or 15-minute delayed contracts. @return [Array<(ApiResponseOptionsUnusualActivity, Fixnum, Hash)>] ApiResponseOptionsUnusualActivity data, response status code and response headers

# File lib/intrinio-sdk/api/options_api.rb, line 876
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