Intrinio::IndexApi

All URIs are relative to https://api-v2.intrinio.com

Method HTTP request Description
get_all_economic_indices GET /indices/economic All Economic Indices
get_all_sic_indices GET /indices/sic All SIC Indices
get_all_stock_market_indices GET /indices/stock_market All Stock Market Indices
get_economic_index_by_id GET /indices/economic/identifier Lookup Economic Index
get_economic_index_data_point_number GET /indices/economic/identifier/data_point/tag/number Data Point (Number) for an Economic Index
get_economic_index_data_point_text GET /indices/economic/identifier/data_point/tag/text Data Point (Text) for an Economic Index
get_economic_index_historical_data GET /indices/economic/identifier/historical_data/tag Historical Data for an Economic Index
get_realtime_index_price_by_id GET /indices/identifier/realtime Realtime Index Price
get_sic_index_by_id GET /indices/sic/identifier Lookup SIC Index
get_sic_index_data_point_number GET /indices/sic/identifier/data_point/tag/number Data Point (Number) for an SIC Index
get_sic_index_data_point_text GET /indices/sic/identifier/data_point/tag/text Data Point (Text) for an SIC Index
get_sic_index_historical_data GET /indices/sic/identifier/historical_data/tag Historical Data for an SIC Index
get_stock_market_index_by_id GET /indices/stock_market/identifier Lookup Stock Market Index
get_stock_market_index_data_point_number GET /indices/stock_market/identifier/data_point/tag/number Data Point (Number) for Stock Market Index
get_stock_market_index_data_point_text GET /indices/stock_market/identifier/data_point/tag/text Data Point (Text) for Stock Market Index
get_stock_market_index_historical_data GET /indices/stock_market/identifier/historical_data/tag Historical Data for Stock Market Index
search_economic_indices GET /indices/economic/search Search Economic Indices
search_sic_indices GET /indices/sic/search Search SIC Indices
search_stock_markets_indices GET /indices/stock_market/search Search Stock Market Indices

get_all_economic_indices

View Intrinio API Documentation

ApiResponseEconomicIndices get_all_economic_indices(opts)

All Economic Indices

Returns a list of reference data on more than 200,000 economic indices from the Federal Reserve Economic Data (FRED) database.

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new

opts = {
  page_size: 100,
  next_page: nil
}

result = index_api.get_all_economic_indices(opts)
pp result

Parameters

Name Type Description Notes
page_size Integer The number of results to return [optional] [default to 100]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseEconomicIndices

get_all_sic_indices

View Intrinio API Documentation

ApiResponseSICIndices get_all_sic_indices(opts)

All SIC Indices

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new

opts = {
  page_size: 100,
  next_page: nil
}

result = index_api.get_all_sic_indices(opts)
pp result

Parameters

Name Type Description Notes
page_size Integer The number of results to return [optional] [default to 100]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseSICIndices

get_all_stock_market_indices

View Intrinio API Documentation

ApiResponseStockMarketIndices get_all_stock_market_indices(opts)

All Stock Market Indices

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new

opts = {
  page_size: 100,
  next_page: nil
}

result = index_api.get_all_stock_market_indices(opts)
pp result

Parameters

Name Type Description Notes
page_size Integer The number of results to return [optional] [default to 100]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseStockMarketIndices

get_economic_index_by_id

View Intrinio API Documentation

EconomicIndex get_economic_index_by_id(identifier)

Lookup Economic Index

Returns reference data for a specified Federal Reserve Economic Data (FRED) series ID.

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$GDP"

result = index_api.get_economic_index_by_id(identifier)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  

Return type

EconomicIndex

get_economic_index_data_point_number

View Intrinio API Documentation

Float get_economic_index_data_point_number(identifier, tag)

Data Point (Number) for an Economic Index

Returns latest data for a specified Federal Reserve Economic Data (FRED) ID.

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$GDP"
tag = "level"

result = index_api.get_economic_index_data_point_number(identifier, tag)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  
tag String An Intrinio data tag <a href='https://data.intrinio.com/data-tags/economic&#39;&gt;reference&lt;/a>  

Return type

Float

get_economic_index_data_point_text

View Intrinio API Documentation

String get_economic_index_data_point_text(identifier, tag)

Data Point (Text) for an Economic Index

Returns a text value for the given tag for the Economic Index with the given identifier

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$GDP"
tag = "level"

result = index_api.get_economic_index_data_point_text(identifier, tag)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  
tag String An Intrinio data tag ID or code-name  

Return type

String

get_economic_index_historical_data

View Intrinio API Documentation

ApiResponseEconomicIndexHistoricalData get_economic_index_historical_data(identifier, tag, opts)

Historical Data for an Economic Index

Returns historical data for a specified Federal Reserve Economic Data (FRED) ID over a period of time.

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$GDP"
tag = "level"

opts = {
  type: nil,
  start_date: Date.parse("2018-01-01"),
  end_date: nil,
  sort_order: "desc",
  page_size: 100,
  next_page: nil
}

result = index_api.get_economic_index_historical_data(identifier, tag, opts)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  
tag String An Intrinio data tag <a href='https://data.intrinio.com/data-tags/economic&#39;&gt;reference&lt;/a>  
type String Filter by type, when applicable [optional]  
start_date Date Get historical data on or after this date [optional]  
end_date Date Get historical data on or before this date [optional]  
sort_order String Sort by date `asc` or `desc` [optional] [default to desc]  
page_size Integer The number of results to return [optional] [default to 100]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseEconomicIndexHistoricalData

get_realtime_index_price_by_id

View Intrinio API Documentation

RealtimeIndexPrice get_realtime_index_price_by_id(identifier)

Realtime Index Price

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "SPX"

result = index_api.get_realtime_index_price_by_id(identifier)
pp result

Parameters

Name Type Description Notes
identifier String The ticker symbol of the currently trading index  

Return type

RealtimeIndexPrice

get_sic_index_by_id

View Intrinio API Documentation

SICIndex get_sic_index_by_id(identifier)

Lookup SIC Index

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$SIC.2911"

result = index_api.get_sic_index_by_id(identifier)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  

Return type

SICIndex

get_sic_index_data_point_number

View Intrinio API Documentation

Float get_sic_index_data_point_number(identifier, tag)

Data Point (Number) for an SIC Index

Returns a numeric value for the given tag for the SIC Index with the given identifier

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$SIC.2911"
tag = "marketcap"

result = index_api.get_sic_index_data_point_number(identifier, tag)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  
tag String An Intrinio data tag ID or code-name  

Return type

Float

get_sic_index_data_point_text

View Intrinio API Documentation

String get_sic_index_data_point_text(identifier, tag)

Data Point (Text) for an SIC Index

Returns a text value for the given tag for the SIC Index with the given identifier

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$SIC.2911"
tag = "marketcap"

result = index_api.get_sic_index_data_point_text(identifier, tag)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  
tag String An Intrinio data tag ID or code-name  

Return type

String

get_sic_index_historical_data

View Intrinio API Documentation

ApiResponseSICIndexHistoricalData get_sic_index_historical_data(identifier, tag, opts)

Historical Data for an SIC Index

Returns historical values for the given tag and the SIC Index with the given identifier

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$SIC.1"
tag = "marketcap"

opts = {
  type: nil,
  start_date: Date.parse("2018-01-01"),
  end_date: nil,
  sort_order: "desc",
  page_size: 100,
  next_page: nil
}

result = index_api.get_sic_index_historical_data(identifier, tag, opts)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  
tag String An Intrinio data tag ID or code-name  
type String Filter by type, when applicable [optional]  
start_date Date Get historical data on or after this date [optional]  
end_date Date Get historical data on or before this date [optional]  
sort_order String Sort by date `asc` or `desc` [optional] [default to desc]  
page_size Integer The number of results to return [optional] [default to 100]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseSICIndexHistoricalData

get_stock_market_index_by_id

View Intrinio API Documentation

StockMarketIndex get_stock_market_index_by_id(identifier)

Lookup Stock Market Index

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$DJI"

result = index_api.get_stock_market_index_by_id(identifier)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  

Return type

StockMarketIndex

get_stock_market_index_data_point_number

View Intrinio API Documentation

Float get_stock_market_index_data_point_number(identifier, tag)

Data Point (Number) for Stock Market Index

Returns a numeric value for the given tag for the Stock Market Index with the given identifier

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$DJI"
tag = "level"

result = index_api.get_stock_market_index_data_point_number(identifier, tag)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  
tag String An Intrinio data tag ID or code-name  

Return type

Float

get_stock_market_index_data_point_text

View Intrinio API Documentation

String get_stock_market_index_data_point_text(identifier, tag)

Data Point (Text) for Stock Market Index

Returns a text value for the given tag for the Stock Market Index with the given identifier

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$DJI"
tag = "level"

result = index_api.get_stock_market_index_data_point_text(identifier, tag)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  
tag String An Intrinio data tag ID or code-name  

Return type

String

get_stock_market_index_historical_data

View Intrinio API Documentation

ApiResponseStockMarketIndexHistoricalData get_stock_market_index_historical_data(identifier, tag, opts)

Historical Data for Stock Market Index

Returns historical values for the given tag and the Stock Market Index with the given identifier

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
identifier = "$DJI"
tag = "level"

opts = {
  type: nil,
  start_date: Date.parse("2018-01-01"),
  end_date: nil,
  sort_order: "desc",
  page_size: 100,
  next_page: nil
}

result = index_api.get_stock_market_index_historical_data(identifier, tag, opts)
pp result

Parameters

Name Type Description Notes
identifier String An Index Identifier (symbol, Intrinio ID)  
tag String An Intrinio data tag ID or code-name  
type String Filter by type, when applicable [optional]  
start_date Date Get historical data on or after this date [optional]  
end_date Date Get historical data on or before this date [optional]  
sort_order String Sort by date `asc` or `desc` [optional] [default to desc]  
page_size Integer The number of results to return [optional] [default to 100]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseStockMarketIndexHistoricalData

search_economic_indices

View Intrinio API Documentation

ApiResponseEconomicIndicesSearch search_economic_indices(query, opts)

Search Economic Indices

Search the Federal Reserve Economic Data (FRED) database and return a list of economic indices matching the text query parameter passed through.

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
query = "GDP"

opts = {
  page_size: 100
}

result = index_api.search_economic_indices(query, opts)
pp result

Parameters

Name Type Description Notes
query String Search query  
page_size Integer The number of results to return [optional] [default to 100]  

Return type

ApiResponseEconomicIndicesSearch

search_sic_indices

View Intrinio API Documentation

ApiResponseSICIndicesSearch search_sic_indices(query, opts)

Search SIC Indices

Searches for indices using the text in query

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
query = "agriculture"

opts = {
  page_size: 100
}

result = index_api.search_sic_indices(query, opts)
pp result

Parameters

Name Type Description Notes
query String Search query  
page_size Integer The number of results to return [optional] [default to 100]  

Return type

ApiResponseSICIndicesSearch

search_stock_markets_indices

View Intrinio API Documentation

ApiResponseStockMarketIndicesSearch search_stock_markets_indices(query, opts)

Search Stock Market Indices

Searches for indices using the text in query

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

index_api = Intrinio::IndexApi.new
query = "dow"

opts = {
  page_size: 100
}

result = index_api.search_stock_markets_indices(query, opts)
pp result

Parameters

Name Type Description Notes
query String Search query  
page_size Integer The number of results to return [optional] [default to 100]  

Return type

ApiResponseStockMarketIndicesSearch