Historical Data for an Economic Index

Historical Data for an Economic Index Ruby API Documentation

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

API Class:
Intrinio::IndexApi
Instance Method:
get_economic_index_historical_data()

Stock Price Code Example

Use my API Key
# 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
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierStringAn Index Identifier (symbol, Intrinio ID) 
tagStringAn Intrinio data tag reference 
typeStringFilter by type, when applicable[optional]  
start_dateDateGet historical data on or after this date[optional]  
end_dateDateGet historical data on or before this date[optional]  
sort_orderStringSort by date `asc` or `desc`[optional] [default to desc]  
page_sizeIntegerThe number of results to return[optional] [default to 100]  
next_pageStringGets the next page of data from a previous API call[optional]  

Return Type

object
Intrinio::ApiResponseEconomicIndexHistoricalData

Properties

NameTypeDescription
historical_dataArray 
indexEconomicIndexSummary 
next_pageStringThe token required to request the next page of the data. If null, no further results are available.  
object
Intrinio::HistoricalData

Properties

NameTypeDescription
dateDateThe date that the value is present  
valueFloatThe historical value  
object
Intrinio::EconomicIndexSummary

Properties

NameTypeDescription
idStringThe Intrinio ID for the Index  
symbolStringThe symbol used to identify the Index  
nameStringThe name of the Index  
continentStringThe continent of the country of focus for the Index  
countryStringThe country of focus for the Index  
update_frequencyStringHow often the Index is updated  
last_updatedDateTimeWhen the Index was updated last  
observation_startDateThe earliest date for which data is available  
observation_endDateThe latest date for which data is available  
seasonal_adjustmentStringWhether the data is adjusted to account for seasonality  
unitsStringThe units of the data