Skip to content

Latest commit

 

History

History
100 lines (63 loc) · 3.21 KB

HistoricalDataApi.md

File metadata and controls

100 lines (63 loc) · 3.21 KB

intrinio_sdk.HistoricalDataApi

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

Method HTTP request Description
get_historical_data GET /historical_data/{identifier}/{tag} Historical Data

get_historical_data

View Intrinio API Documentation

ApiResponseHistoricalData get_historical_data(identifier, tag, frequency=frequency, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, page_size=page_size, next_page=next_page)

Historical Data

Returns historical values for the given tag and the entity represented by 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 = 'AAPL'
tag = 'marketcap'
frequency = 'daily'
type = ''
start_date = '2015-01-01'
end_date = ''
sort_order = 'desc'
page_size = 100
next_page = ''

response = intrinio.HistoricalDataApi().get_historical_data(identifier, tag, frequency=frequency, 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 identifier for an entity such as a Company, Security, Index, etc (Ticker, FIGI, ISIN, CUSIP, CIK, LEI, Intrinio ID)  
tag str An Intrinio data tag ID or code (<a href='https://data.intrinio.com/data-tags&#39;&gt;reference&lt;/a>)  
frequency str Return historical data in the given frequency [optional] [default to daily]  
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 date 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

ApiResponseHistoricalData