Skip to content

Latest commit

 

History

History
1973 lines (1144 loc) · 49.3 KB

IndexApi.md

File metadata and controls

1973 lines (1144 loc) · 49.3 KB

intrinio_sdk.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_eod_index_prices GET /indices/prices/eod All End of Day Index Prices
get_all_index_summaries GET /indices All Index Summaries
get_all_realtime_index_prices GET /indices/prices/realtime All Realtime Index Prices
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_eod_index_price_by_id GET /indices/{identifier}/eod End of Day Index Prices By Identifier
get_index_constituents_by_id GET /indices/{identifier}/constituents Index Constituents By Index Identifier
get_index_summary_by_id GET /indices/{identifier} Index Summary By Identifier
get_realtime_index_price_by_id GET /indices/{identifier}/realtime Realtime Index Price By Identifier
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(page_size=page_size, next_page=next_page)

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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

page_size = 100
next_page = ''

response = intrinio.IndexApi().get_all_economic_indices(page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

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

Return type

ApiResponseEconomicIndices

get_all_eod_index_prices

View Intrinio API Documentation

ApiResponseEodIndexPricesAll get_all_eod_index_prices(page_size=page_size, start_date=start_date, end_date=end_date)

All End of Day Index Prices

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

page_size = 100
start_date = ''
end_date = ''

response = intrinio.IndexApi().get_all_eod_index_prices(page_size=page_size, start_date=start_date, end_date=end_date)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
page_size int The number of results to return [optional] [default to 100]  
start_date date Limit prices to those on or after this date [optional]  
end_date date Limit prices to those on or before this date [optional]  

Return type

ApiResponseEodIndexPricesAll

get_all_index_summaries

View Intrinio API Documentation

ApiResponseIndices get_all_index_summaries(page_size=page_size)

All Index Summaries

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

page_size = 100

response = intrinio.IndexApi().get_all_index_summaries(page_size=page_size)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
page_size int The number of results to return [optional] [default to 100]  

Return type

ApiResponseIndices

get_all_realtime_index_prices

View Intrinio API Documentation

ApiResponseRealtimeIndexPrices get_all_realtime_index_prices(page_size=page_size)

All Realtime Index Prices

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

page_size = 100

response = intrinio.IndexApi().get_all_realtime_index_prices(page_size=page_size)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
page_size int The number of results to return [optional] [default to 100]  

Return type

ApiResponseRealtimeIndexPrices

get_all_sic_indices

View Intrinio API Documentation

ApiResponseSICIndices get_all_sic_indices(page_size=page_size, next_page=next_page)

All SIC Indices

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

page_size = 100
next_page = ''

response = intrinio.IndexApi().get_all_sic_indices(page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
page_size int The number of results to return [optional] [default to 100]  
next_page str 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(page_size=page_size, next_page=next_page)

All Stock Market Indices

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

page_size = 100
next_page = ''

response = intrinio.IndexApi().get_all_stock_market_indices(page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
page_size int The number of results to return [optional] [default to 100]  
next_page str 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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$GDP'

response = intrinio.IndexApi().get_economic_index_by_id(identifier)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str 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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$GDP'
tag = 'level'

response = intrinio.IndexApi().get_economic_index_data_point_number(identifier, tag)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An Index Identifier (symbol, Intrinio ID)  
tag str 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

str 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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$GDP'
tag = 'level'

response = intrinio.IndexApi().get_economic_index_data_point_text(identifier, tag)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

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

Return type

str

get_economic_index_historical_data

View Intrinio API Documentation

ApiResponseEconomicIndexHistoricalData get_economic_index_historical_data(identifier, tag, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, page_size=page_size, next_page=next_page)

Historical Data for an Economic Index

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

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$GDP'
tag = 'level'
type = ''
start_date = '2018-01-01'
end_date = ''
sort_order = 'desc'
page_size = 100
next_page = ''

response = intrinio.IndexApi().get_economic_index_historical_data(identifier, tag, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An Index Identifier (symbol, Intrinio ID)  
tag str An Intrinio data tag <a href='https://data.intrinio.com/data-tags/economic&#39;&gt;reference&lt;/a>  
type str 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 str Sort by date `asc` or `desc` [optional] [default to desc]  
page_size int The number of results to return [optional] [default to 100]  
next_page str Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseEconomicIndexHistoricalData

get_eod_index_price_by_id

View Intrinio API Documentation

ApiResponseEodIndexPrices get_eod_index_price_by_id(identifier, page_size=page_size, start_date=start_date, end_date=end_date)

End of Day Index Prices By Identifier

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPX'
page_size = 100
start_date = ''
end_date = ''

response = intrinio.IndexApi().get_eod_index_price_by_id(identifier, page_size=page_size, start_date=start_date, end_date=end_date)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str The index symbol  
page_size int The number of results to return [optional] [default to 100]  
start_date date Limit prices to those on or after this date [optional]  
end_date date Limit prices to those on or before this date [optional]  

Return type

ApiResponseEodIndexPrices

get_index_constituents_by_id

View Intrinio API Documentation

ApiResponseIndexConstituents get_index_constituents_by_id(identifier)

Index Constituents By Index Identifier

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'DJI'

response = intrinio.IndexApi().get_index_constituents_by_id(identifier)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str The index symbol  

Return type

ApiResponseIndexConstituents

get_index_summary_by_id

View Intrinio API Documentation

ApiResponseIndex get_index_summary_by_id(identifier)

Index Summary By Identifier

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPX'

response = intrinio.IndexApi().get_index_summary_by_id(identifier)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str The index symbol  

Return type

ApiResponseIndex

get_realtime_index_price_by_id

View Intrinio API Documentation

RealtimeIndexPrice get_realtime_index_price_by_id(identifier)

Realtime Index Price By Identifier

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPX'

response = intrinio.IndexApi().get_realtime_index_price_by_id(identifier)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str The index symbol  

Return type

RealtimeIndexPrice

get_sic_index_by_id

View Intrinio API Documentation

SICIndex get_sic_index_by_id(identifier)

Lookup SIC Index

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$SIC.2911'

response = intrinio.IndexApi().get_sic_index_by_id(identifier)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str 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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$SIC.2911'
tag = 'marketcap'

response = intrinio.IndexApi().get_sic_index_data_point_number(identifier, tag)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

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

Return type

float

get_sic_index_data_point_text

View Intrinio API Documentation

str 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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$SIC.2911'
tag = 'marketcap'

response = intrinio.IndexApi().get_sic_index_data_point_text(identifier, tag)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

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

Return type

str

get_sic_index_historical_data

View Intrinio API Documentation

ApiResponseSICIndexHistoricalData get_sic_index_historical_data(identifier, tag, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, page_size=page_size, next_page=next_page)

Historical Data for an SIC Index

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

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$SIC.1'
tag = 'marketcap'
type = ''
start_date = '2018-01-01'
end_date = ''
sort_order = 'desc'
page_size = 100
next_page = ''

response = intrinio.IndexApi().get_sic_index_historical_data(identifier, tag, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An Index Identifier (symbol, Intrinio ID)  
tag str An Intrinio data tag ID or code-name  
type str 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 str Sort by date `asc` or `desc` [optional] [default to desc]  
page_size int The number of results to return [optional] [default to 100]  
next_page str 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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$DJI'

response = intrinio.IndexApi().get_stock_market_index_by_id(identifier)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str 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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$DJI'
tag = 'level'

response = intrinio.IndexApi().get_stock_market_index_data_point_number(identifier, tag)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

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

Return type

float

get_stock_market_index_data_point_text

View Intrinio API Documentation

str 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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$DJI'
tag = 'level'

response = intrinio.IndexApi().get_stock_market_index_data_point_text(identifier, tag)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

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

Return type

str

get_stock_market_index_historical_data

View Intrinio API Documentation

ApiResponseStockMarketIndexHistoricalData get_stock_market_index_historical_data(identifier, tag, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, page_size=page_size, next_page=next_page)

Historical Data for Stock Market Index

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

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = '$DJI'
tag = 'level'
type = ''
start_date = '2018-01-01'
end_date = ''
sort_order = 'desc'
page_size = 100
next_page = ''

response = intrinio.IndexApi().get_stock_market_index_historical_data(identifier, tag, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An Index Identifier (symbol, Intrinio ID)  
tag str An Intrinio data tag ID or code-name  
type str 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 str Sort by date `asc` or `desc` [optional] [default to desc]  
page_size int The number of results to return [optional] [default to 100]  
next_page str 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, page_size=page_size)

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

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

query = 'GDP'
page_size = 100

response = intrinio.IndexApi().search_economic_indices(query, page_size=page_size)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
query str Search query  
page_size int 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, page_size=page_size)

Search SIC Indices

Searches for indices using the text in query

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

query = 'agriculture'
page_size = 100

response = intrinio.IndexApi().search_sic_indices(query, page_size=page_size)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
query str Search query  
page_size int 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, page_size=page_size)

Search Stock Market Indices

Searches for indices using the text in query

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

query = 'dow'
page_size = 100

response = intrinio.IndexApi().search_stock_markets_indices(query, page_size=page_size)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

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

Return type

ApiResponseStockMarketIndicesSearch