Historical Data for Security

Historical Data for Security Python API Documentation

Returns historical values for the given `tag` and the Security with the given `identifier`

API Class:
SecurityApi
Instance Method:
get_security_historical_data()

Stock Price Code Example

Use my API Key
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 = 'adj_close_price'
frequency = 'daily'
type = ''
start_date = '2018-01-01'
end_date = ''
sort_order = 'desc'
page_size = 100
next_page = ''
response = intrinio.SecurityApi().get_security_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)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierstrA Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) 
tagstrAn Intrinio data tag ID or code (reference) 
frequencystrReturn historical data in the given frequency[optional] [default to daily]  
typestrFilter by type, when applicable[optional]  
start_datedateGet historical data on or after this date[optional]  
end_datedateGet historical date on or before this date[optional]  
sort_orderstrSort by date `asc` or `desc`[optional] [default to desc]  
page_sizeintThe number of results to return[optional] [default to 100]  
next_pagestrGets the next page of data from a previous API call[optional]  


Return Type

object
ApiResponseSecurityHistoricalData

Properties

NameTypeDescription
historical_datalist[HistoricalData] 
securitySecuritySummary 
next_pagestrThe token required to request the next page of the data. If null, no further results are available.  
object
HistoricalData

Properties

NameTypeDescription
datedateThe date that the value is present  
valuefloatThe historical value  
object
SecuritySummary

Properties

NameTypeDescription
idstrThe Intrinio ID for Security  
company_idstrThe Intrinio ID for the Company for which the Security is issued  
exchangestrThe exchange's MIC  
exchange_micstrThe security's exchange MIC  
stock_exchange_idstrThe exchange's Intrinio ID  
namestrThe name of the Security  
codestrA 2-3 digit code classifying the Security (reference)  
currencystrThe currency in which the Security is traded on the exchange  
tickerstrThe common/local ticker of the Security  
composite_tickerstrThe country-composite ticker of the Security  
figistrThe OpenFIGI identifier  
composite_figistrThe country-composite OpenFIGI identifier  
share_class_figistrThe global-composite OpenFIGI identifier  
primary_listingboolIf True, the Security is the primary issue for the company, otherwise it is a secondary issue on a secondary stock exchange