Class: Intrinio::SecurityApi
- Inherits:
-
Object
- Object
- Intrinio::SecurityApi
- Defined in:
- lib/intrinio-sdk/api/security_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_all_securities(opts = {}) ⇒ ApiResponseSecurities
All Securities.
-
#get_all_securities_with_http_info(opts = {}) ⇒ Array<(ApiResponseSecurities, Fixnum, Hash)>
All Securities.
-
#get_security_by_id(identifier, opts = {}) ⇒ Security
Lookup Security Returns the Security with the given ‘identifier`.
-
#get_security_by_id_with_http_info(identifier, opts = {}) ⇒ Array<(Security, Fixnum, Hash)>
Lookup Security Returns the Security with the given `identifier`.
-
#get_security_data_point_number(identifier, tag, opts = {}) ⇒ Float
Data Point (Number) for Security Returns a numeric value for the given ‘tag` for the Security with the given `identifier`.
-
#get_security_data_point_number_with_http_info(identifier, tag, opts = {}) ⇒ Array<(Float, Fixnum, Hash)>
Data Point (Number) for Security Returns a numeric value for the given `tag` for the Security with the given `identifier`.
-
#get_security_data_point_text(identifier, tag, opts = {}) ⇒ String
Data Point (Text) for Security Returns a text value for the given ‘tag` for the Security with the given `identifier`.
-
#get_security_data_point_text_with_http_info(identifier, tag, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Data Point (Text) for Security Returns a text value for the given `tag` for the Security with the given `identifier`.
-
#get_security_historical_data(identifier, tag, opts = {}) ⇒ ApiResponseSecurityHistoricalData
Historical Data for Security Returns historical values for the given ‘tag` and the Security with the given `identifier`.
-
#get_security_historical_data_with_http_info(identifier, tag, opts = {}) ⇒ Array<(ApiResponseSecurityHistoricalData, Fixnum, Hash)>
Historical Data for Security Returns historical values for the given `tag` and the Security with the given `identifier`.
-
#get_security_intraday_prices(identifier, opts = {}) ⇒ ApiResponseSecurityIntradayPrices
Intraday Stock Prices for Security Return intraday stock prices for the Security with the given ‘identifier`.
-
#get_security_intraday_prices_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseSecurityIntradayPrices, Fixnum, Hash)>
Intraday Stock Prices for Security Return intraday stock prices for the Security with the given `identifier`.
-
#get_security_latest_dividend_record(identifier, opts = {}) ⇒ DividendRecord
Lastest Dividend Record for Security Returns the latest available dividend information for the Security with the given ‘identifier`.
-
#get_security_latest_dividend_record_with_http_info(identifier, opts = {}) ⇒ Array<(DividendRecord, Fixnum, Hash)>
Lastest Dividend Record for Security Returns the latest available dividend information for the Security with the given `identifier`.
-
#get_security_latest_earnings_record(identifier, opts = {}) ⇒ EarningsRecord
Lastest Earnings Record for Security Returns latest available earnings information for the Security with the given ‘identifier`.
-
#get_security_latest_earnings_record_with_http_info(identifier, opts = {}) ⇒ Array<(EarningsRecord, Fixnum, Hash)>
Lastest Earnings Record for Security Returns latest available earnings information for the Security with the given `identifier`.
-
#get_security_realtime_price(identifier, opts = {}) ⇒ RealtimeStockPrice
Realtime Stock Price for Security Return the realtime stock price for the Security with the given ‘identifier`.
-
#get_security_realtime_price_with_http_info(identifier, opts = {}) ⇒ Array<(RealtimeStockPrice, Fixnum, Hash)>
Realtime Stock Price for Security Return the realtime stock price for the Security with the given `identifier`.
-
#get_security_stock_price_adjustments(identifier, opts = {}) ⇒ ApiResponseSecurityStockPriceAdjustments
Stock Price Adjustments by Security Returns stock price adjustments for the Security with the given ‘identifier`.
-
#get_security_stock_price_adjustments_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseSecurityStockPriceAdjustments, Fixnum, Hash)>
Stock Price Adjustments by Security Returns stock price adjustments for the Security with the given `identifier`.
-
#get_security_stock_prices(identifier, opts = {}) ⇒ ApiResponseSecurityStockPrices
Stock Prices by Security Return end-of-day stock prices for the Security with the given ‘identifier`.
-
#get_security_stock_prices_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseSecurityStockPrices, Fixnum, Hash)>
Stock Prices by Security Return end-of-day stock prices for the Security with the given `identifier`.
-
#initialize(api_client = ApiClient.default) ⇒ SecurityApi
constructor
A new instance of SecurityApi.
-
#screen_securities(opts = {}) ⇒ Array<SecurityScreenResult>
Screen Securities Screen Securities using complex logic.
-
#screen_securities_with_http_info(opts = {}) ⇒ Array<(Array<SecurityScreenResult>, Fixnum, Hash)>
Screen Securities Screen Securities using complex logic.
-
#search_securities(query, opts = {}) ⇒ ApiResponseSecuritiesSearch
Search Securities Searches for Securities matching the text ‘query`.
-
#search_securities_with_http_info(query, opts = {}) ⇒ Array<(ApiResponseSecuritiesSearch, Fixnum, Hash)>
Search Securities Searches for Securities matching the text `query`.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SecurityApi
Returns a new instance of SecurityApi.
19 20 21 |
# File 'lib/intrinio-sdk/api/security_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/security_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_all_securities(opts = {}) ⇒ ApiResponseSecurities
All Securities
29 30 31 32 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 29 def get_all_securities(opts = {}) data, _status_code, _headers = get_all_securities_with_http_info(opts) return data end |
#get_all_securities_with_http_info(opts = {}) ⇒ Array<(ApiResponseSecurities, Fixnum, Hash)>
All Securities
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 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 40 def get_all_securities_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_all_securities ..." 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 SecurityApi.get_all_securities, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities" # query parameters query_params = {} 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 => 'ApiResponseSecurities') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_all_securities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_by_id(identifier, opts = {}) ⇒ Security
Lookup Security Returns the Security with the given ‘identifier`
85 86 87 88 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 85 def get_security_by_id(identifier, opts = {}) data, _status_code, _headers = get_security_by_id_with_http_info(identifier, opts) return data end |
#get_security_by_id_with_http_info(identifier, opts = {}) ⇒ Array<(Security, Fixnum, Hash)>
Lookup Security Returns the Security with the given `identifier`
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 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 95 def get_security_by_id_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_by_id ..." 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 SecurityApi.get_security_by_id" end # resource path local_var_path = "/securities/{identifier}".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 => 'Security') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_data_point_number(identifier, tag, opts = {}) ⇒ Float
Data Point (Number) for Security Returns a numeric value for the given ‘tag` for the Security with the given `identifier`
139 140 141 142 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 139 def get_security_data_point_number(identifier, tag, opts = {}) data, _status_code, _headers = get_security_data_point_number_with_http_info(identifier, tag, opts) return data end |
#get_security_data_point_number_with_http_info(identifier, tag, opts = {}) ⇒ Array<(Float, Fixnum, Hash)>
Data Point (Number) for Security Returns a numeric value for the given `tag` for the Security with the given `identifier`
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 150 def get_security_data_point_number_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_data_point_number ..." 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 SecurityApi.get_security_data_point_number" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling SecurityApi.get_security_data_point_number" end # resource path local_var_path = "/securities/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8']) # 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 => 'Float') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_data_point_text(identifier, tag, opts = {}) ⇒ String
Data Point (Text) for Security Returns a text value for the given ‘tag` for the Security with the given `identifier`
198 199 200 201 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 198 def get_security_data_point_text(identifier, tag, opts = {}) data, _status_code, _headers = get_security_data_point_text_with_http_info(identifier, tag, opts) return data end |
#get_security_data_point_text_with_http_info(identifier, tag, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Data Point (Text) for Security Returns a text value for the given `tag` for the Security with the given `identifier`
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 209 def get_security_data_point_text_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_data_point_text ..." 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 SecurityApi.get_security_data_point_text" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling SecurityApi.get_security_data_point_text" end # resource path local_var_path = "/securities/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8']) # 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_historical_data(identifier, tag, opts = {}) ⇒ ApiResponseSecurityHistoricalData
Historical Data for Security Returns historical values for the given ‘tag` and the Security with the given `identifier`
264 265 266 267 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 264 def get_security_historical_data(identifier, tag, opts = {}) data, _status_code, _headers = get_security_historical_data_with_http_info(identifier, tag, opts) return data end |
#get_security_historical_data_with_http_info(identifier, tag, opts = {}) ⇒ Array<(ApiResponseSecurityHistoricalData, Fixnum, Hash)>
Historical Data for Security Returns historical values for the given `tag` and the Security with the given `identifier`
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 282 def get_security_historical_data_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_historical_data ..." 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 SecurityApi.get_security_historical_data" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling SecurityApi.get_security_historical_data" end if @api_client.config.client_side_validation && opts[:'frequency'] && !['daily', 'weekly', 'monthly', 'quarterly', 'yearly'].include?(opts[:'frequency']) fail ArgumentError, 'invalid value for "frequency", must be one of daily, weekly, monthly, quarterly, yearly' end if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc' 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 SecurityApi.get_security_historical_data, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} query_params[:'frequency'] = opts[:'frequency'] if !opts[:'frequency'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].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[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].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 => 'ApiResponseSecurityHistoricalData') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_intraday_prices(identifier, opts = {}) ⇒ ApiResponseSecurityIntradayPrices
Intraday Stock Prices for Security Return intraday stock prices for the Security with the given ‘identifier`
351 352 353 354 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 351 def get_security_intraday_prices(identifier, opts = {}) data, _status_code, _headers = get_security_intraday_prices_with_http_info(identifier, opts) return data end |
#get_security_intraday_prices_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseSecurityIntradayPrices, Fixnum, Hash)>
Intraday Stock Prices for Security Return intraday stock prices for the Security with the given `identifier`
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 366 def get_security_intraday_prices_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_intraday_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 SecurityApi.get_security_intraday_prices" end if @api_client.config.client_side_validation && opts[:'source'] && !['iex', 'bats'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of iex, bats' end # resource path local_var_path = "/securities/{identifier}/prices/intraday".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseSecurityIntradayPrices') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_intraday_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_latest_dividend_record(identifier, opts = {}) ⇒ DividendRecord
Lastest Dividend Record for Security Returns the latest available dividend information for the Security with the given ‘identifier`
417 418 419 420 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 417 def get_security_latest_dividend_record(identifier, opts = {}) data, _status_code, _headers = get_security_latest_dividend_record_with_http_info(identifier, opts) return data end |
#get_security_latest_dividend_record_with_http_info(identifier, opts = {}) ⇒ Array<(DividendRecord, Fixnum, Hash)>
Lastest Dividend Record for Security Returns the latest available dividend information for the Security with the given `identifier`
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 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 427 def get_security_latest_dividend_record_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_latest_dividend_record ..." 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 SecurityApi.get_security_latest_dividend_record" end # resource path local_var_path = "/securities/{identifier}/dividends/latest".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 => 'DividendRecord') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_latest_dividend_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_latest_earnings_record(identifier, opts = {}) ⇒ EarningsRecord
Lastest Earnings Record for Security Returns latest available earnings information for the Security with the given ‘identifier`
470 471 472 473 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 470 def get_security_latest_earnings_record(identifier, opts = {}) data, _status_code, _headers = get_security_latest_earnings_record_with_http_info(identifier, opts) return data end |
#get_security_latest_earnings_record_with_http_info(identifier, opts = {}) ⇒ Array<(EarningsRecord, Fixnum, Hash)>
Lastest Earnings Record for Security Returns latest available earnings information for the Security with the given `identifier`
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 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 480 def get_security_latest_earnings_record_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_latest_earnings_record ..." 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 SecurityApi.get_security_latest_earnings_record" end # resource path local_var_path = "/securities/{identifier}/earnings/latest".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 => 'EarningsRecord') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_latest_earnings_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_realtime_price(identifier, opts = {}) ⇒ RealtimeStockPrice
Realtime Stock Price for Security Return the realtime stock price for the Security with the given ‘identifier`
524 525 526 527 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 524 def get_security_realtime_price(identifier, opts = {}) data, _status_code, _headers = get_security_realtime_price_with_http_info(identifier, opts) return data end |
#get_security_realtime_price_with_http_info(identifier, opts = {}) ⇒ Array<(RealtimeStockPrice, Fixnum, Hash)>
Realtime Stock Price for Security Return the realtime stock price for the Security with the given `identifier`
535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 535 def get_security_realtime_price_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_realtime_price ..." 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 SecurityApi.get_security_realtime_price" end if @api_client.config.client_side_validation && opts[:'source'] && !['iex', 'bats', 'bats_delayed'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of iex, bats, bats_delayed' end # resource path local_var_path = "/securities/{identifier}/prices/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 => 'RealtimeStockPrice') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_realtime_price\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_stock_price_adjustments(identifier, opts = {}) ⇒ ApiResponseSecurityStockPriceAdjustments
Stock Price Adjustments by Security Returns stock price adjustments for the Security with the given ‘identifier`
586 587 588 589 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 586 def get_security_stock_price_adjustments(identifier, opts = {}) data, _status_code, _headers = get_security_stock_price_adjustments_with_http_info(identifier, opts) return data end |
#get_security_stock_price_adjustments_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseSecurityStockPriceAdjustments, Fixnum, Hash)>
Stock Price Adjustments by Security Returns stock price adjustments for the Security with the given `identifier`
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 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 600 def get_security_stock_price_adjustments_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_stock_price_adjustments ..." 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 SecurityApi.get_security_stock_price_adjustments" 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 SecurityApi.get_security_stock_price_adjustments, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/adjustments".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 => 'ApiResponseSecurityStockPriceAdjustments') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_stock_price_adjustments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_security_stock_prices(identifier, opts = {}) ⇒ ApiResponseSecurityStockPrices
Stock Prices by Security Return end-of-day stock prices for the Security with the given ‘identifier`
656 657 658 659 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 656 def get_security_stock_prices(identifier, opts = {}) data, _status_code, _headers = get_security_stock_prices_with_http_info(identifier, opts) return data end |
#get_security_stock_prices_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseSecurityStockPrices, Fixnum, Hash)>
Stock Prices by Security Return end-of-day stock prices for the Security with the given `identifier`
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 671 def get_security_stock_prices_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_stock_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 SecurityApi.get_security_stock_prices" end if @api_client.config.client_side_validation && opts[:'frequency'] && !['daily', 'weekly', 'monthly', 'quarterly', 'yearly'].include?(opts[:'frequency']) fail ArgumentError, 'invalid value for "frequency", must be one of daily, weekly, monthly, quarterly, yearly' 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 SecurityApi.get_security_stock_prices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices".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[:'frequency'] = opts[:'frequency'] if !opts[:'frequency'].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 => 'ApiResponseSecurityStockPrices') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_stock_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screen_securities(opts = {}) ⇒ Array<SecurityScreenResult>
Screen Securities Screen Securities using complex logic
730 731 732 733 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 730 def screen_securities(opts = {}) data, _status_code, _headers = screen_securities_with_http_info(opts) return data end |
#screen_securities_with_http_info(opts = {}) ⇒ Array<(Array<SecurityScreenResult>, Fixnum, Hash)>
Screen Securities Screen Securities using complex logic
744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 744 def screen_securities_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.screen_securities ..." end if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction']) fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc' 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 SecurityApi.screen_securities, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/screen" # query parameters query_params = {} query_params[:'order_column'] = opts[:'order_column'] if !opts[:'order_column'].nil? query_params[:'order_direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil? query_params[:'primary_only'] = opts[:'primary_only'] if !opts[:'primary_only'].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']) # 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(opts[:'logic']) 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 => 'Array<SecurityScreenResult>') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#screen_securities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_securities(query, opts = {}) ⇒ ApiResponseSecuritiesSearch
Search Securities Searches for Securities matching the text ‘query`
797 798 799 800 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 797 def search_securities(query, opts = {}) data, _status_code, _headers = search_securities_with_http_info(query, opts) return data end |
#search_securities_with_http_info(query, opts = {}) ⇒ Array<(ApiResponseSecuritiesSearch, Fixnum, Hash)>
Search Securities Searches for Securities matching the text `query`
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 |
# File 'lib/intrinio-sdk/api/security_api.rb', line 808 def search_securities_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.search_securities ..." end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling SecurityApi.search_securities" 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 SecurityApi.search_securities, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/search" # query parameters query_params = {} query_params[:'query'] = query 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 => 'ApiResponseSecuritiesSearch') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#search_securities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |