Class: Intrinio::ETFsApi
- Inherits:
-
Object
- Object
- Intrinio::ETFsApi
- Defined in:
- lib/intrinio-sdk/api/et_fs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_all_etfs(opts = {}) ⇒ ApiResponseETFs
All ETFs Returns a list of Exchange Traded Funds (ETFs) sourced from FirstBridge.
-
#get_all_etfs_with_http_info(opts = {}) ⇒ Array<(ApiResponseETFs, Fixnum, Hash)>
All ETFs Returns a list of Exchange Traded Funds (ETFs) sourced from FirstBridge.
-
#get_etf(identifier, opts = {}) ⇒ ETF
Lookup ETF Returns the Exchange Traded Fund (ETF) with the given identifier.
-
#get_etf_analytics(identifier, opts = {}) ⇒ ETFAnalytics
ETF Analytics Returns analytics for the Exchange Traded Fund (ETF) including volume, market cap, 52 week high, and 52 week low.
-
#get_etf_analytics_with_http_info(identifier, opts = {}) ⇒ Array<(ETFAnalytics, Fixnum, Hash)>
ETF Analytics Returns analytics for the Exchange Traded Fund (ETF) including volume, market cap, 52 week high, and 52 week low.
-
#get_etf_holdings(identifier, opts = {}) ⇒ ApiResponseETFHoldings
ETF Holdings Returns the holdings sorted by weight descending and the Exchange Traded Fund (ETF) summary.
-
#get_etf_holdings_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseETFHoldings, Fixnum, Hash)>
ETF Holdings Returns the holdings sorted by weight descending and the Exchange Traded Fund (ETF) summary.
-
#get_etf_stats(identifier, opts = {}) ⇒ ETFStats
Exchange Traded Fund (ETF) stats Returns daily stats for the Exchange Traded Fund (ETF) including net asset value, beta vs spy, returns, and volatility.
-
#get_etf_stats_with_http_info(identifier, opts = {}) ⇒ Array<(ETFStats, Fixnum, Hash)>
Exchange Traded Fund (ETF) stats Returns daily stats for the Exchange Traded Fund (ETF) including net asset value, beta vs spy, returns, and volatility.
-
#get_etf_with_http_info(identifier, opts = {}) ⇒ Array<(ETF, Fixnum, Hash)>
Lookup ETF Returns the Exchange Traded Fund (ETF) with the given identifier.
-
#initialize(api_client = ApiClient.default) ⇒ ETFsApi
constructor
A new instance of ETFsApi.
-
#search_etfs(query, opts = {}) ⇒ ApiResponseETFs
Search ETFs Searches for Exchange Traded Funds (ETFs) matching the text ‘query`.
-
#search_etfs_with_http_info(query, opts = {}) ⇒ Array<(ApiResponseETFs, Fixnum, Hash)>
Search ETFs Searches for Exchange Traded Funds (ETFs) matching the text `query`.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_all_etfs(opts = {}) ⇒ ApiResponseETFs
All ETFs Returns a list of Exchange Traded Funds (ETFs) sourced from FirstBridge
30 31 32 33 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 30 def get_all_etfs(opts = {}) data, _status_code, _headers = get_all_etfs_with_http_info(opts) return data end |
#get_all_etfs_with_http_info(opts = {}) ⇒ Array<(ApiResponseETFs, Fixnum, Hash)>
All ETFs Returns a list of Exchange Traded Funds (ETFs) sourced from FirstBridge
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 79 80 81 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 42 def get_all_etfs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ETFsApi.get_all_etfs ..." 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 ETFsApi.get_all_etfs, must be smaller than or equal to 10000.' end # resource path local_var_path = "/etfs" # query parameters query_params = {} query_params[:'exchange'] = opts[:'exchange'] if !opts[:'exchange'].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 => 'ApiResponseETFs') if @api_client.config.debugging @api_client.config.logger.debug "API called: ETFsApi#get_all_etfs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_etf(identifier, opts = {}) ⇒ ETF
Lookup ETF Returns the Exchange Traded Fund (ETF) with the given identifier
88 89 90 91 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 88 def get_etf(identifier, opts = {}) data, _status_code, _headers = get_etf_with_http_info(identifier, opts) return data end |
#get_etf_analytics(identifier, opts = {}) ⇒ ETFAnalytics
ETF Analytics Returns analytics for the Exchange Traded Fund (ETF) including volume, market cap, 52 week high, and 52 week low
141 142 143 144 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 141 def get_etf_analytics(identifier, opts = {}) data, _status_code, _headers = get_etf_analytics_with_http_info(identifier, opts) return data end |
#get_etf_analytics_with_http_info(identifier, opts = {}) ⇒ Array<(ETFAnalytics, Fixnum, Hash)>
ETF Analytics Returns analytics for the Exchange Traded Fund (ETF) including volume, market cap, 52 week high, and 52 week low
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 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 151 def get_etf_analytics_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ETFsApi.get_etf_analytics ..." 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 ETFsApi.get_etf_analytics" end # resource path local_var_path = "/etfs/{identifier}/analytics".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 => 'ETFAnalytics') if @api_client.config.debugging @api_client.config.logger.debug "API called: ETFsApi#get_etf_analytics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_etf_holdings(identifier, opts = {}) ⇒ ApiResponseETFHoldings
ETF Holdings Returns the holdings sorted by weight descending and the Exchange Traded Fund (ETF) summary
196 197 198 199 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 196 def get_etf_holdings(identifier, opts = {}) data, _status_code, _headers = get_etf_holdings_with_http_info(identifier, opts) return data end |
#get_etf_holdings_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseETFHoldings, Fixnum, Hash)>
ETF Holdings Returns the holdings sorted by weight descending and the Exchange Traded Fund (ETF) summary
208 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 250 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 208 def get_etf_holdings_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ETFsApi.get_etf_holdings ..." 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 ETFsApi.get_etf_holdings" 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 ETFsApi.get_etf_holdings, must be smaller than or equal to 10000.' end # resource path local_var_path = "/etfs/{identifier}/holdings".sub('{' + 'identifier' + '}', identifier.to_s) # 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 => 'ApiResponseETFHoldings') if @api_client.config.debugging @api_client.config.logger.debug "API called: ETFsApi#get_etf_holdings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_etf_stats(identifier, opts = {}) ⇒ ETFStats
Exchange Traded Fund (ETF) stats Returns daily stats for the Exchange Traded Fund (ETF) including net asset value, beta vs spy, returns, and volatility
257 258 259 260 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 257 def get_etf_stats(identifier, opts = {}) data, _status_code, _headers = get_etf_stats_with_http_info(identifier, opts) return data end |
#get_etf_stats_with_http_info(identifier, opts = {}) ⇒ Array<(ETFStats, Fixnum, Hash)>
Exchange Traded Fund (ETF) stats Returns daily stats for the Exchange Traded Fund (ETF) including net asset value, beta vs spy, returns, and volatility
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 267 def get_etf_stats_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ETFsApi.get_etf_stats ..." 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 ETFsApi.get_etf_stats" end # resource path local_var_path = "/etfs/{identifier}/stats".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 => 'ETFStats') if @api_client.config.debugging @api_client.config.logger.debug "API called: ETFsApi#get_etf_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_etf_with_http_info(identifier, opts = {}) ⇒ Array<(ETF, Fixnum, Hash)>
Lookup ETF Returns the Exchange Traded Fund (ETF) with the given identifier
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 98 def get_etf_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ETFsApi.get_etf ..." 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 ETFsApi.get_etf" end # resource path local_var_path = "/etfs/{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 => 'ETF') if @api_client.config.debugging @api_client.config.logger.debug "API called: ETFsApi#get_etf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_etfs(query, opts = {}) ⇒ ApiResponseETFs
Search ETFs Searches for Exchange Traded Funds (ETFs) matching the text ‘query`
310 311 312 313 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 310 def search_etfs(query, opts = {}) data, _status_code, _headers = search_etfs_with_http_info(query, opts) return data end |
#search_etfs_with_http_info(query, opts = {}) ⇒ Array<(ApiResponseETFs, Fixnum, Hash)>
Search ETFs Searches for Exchange Traded Funds (ETFs) matching the text `query`
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/intrinio-sdk/api/et_fs_api.rb', line 320 def search_etfs_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ETFsApi.search_etfs ..." 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 ETFsApi.search_etfs" end # resource path local_var_path = "/etfs/search" # query parameters query_params = {} query_params[:'query'] = query # 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 => 'ApiResponseETFs') if @api_client.config.debugging @api_client.config.logger.debug "API called: ETFsApi#search_etfs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |