All URIs are relative to https://api-v2.intrinio.com
Method | HTTP request | Description |
---|---|---|
get_historical_data | GET /historical_data/{identifier}/{tag} | Historical Data |
View Intrinio API Documentation
ApiResponseHistoricalData get_historical_data(identifier, tag, opts)
Returns historical values for the given tag
and the entity represented by the given identifier
# Setup client
client <- IntrinioSDK::ApiClient$new()
# Configure API key authorization: ApiKeyAuth
client$configuration$apiKey <- "YOUR_API_KEY"
#Configure retries
client$configuration$allowRetries <- TRUE
# Setup API with client
HistoricalDataApi <- IntrinioSDK::HistoricalDataApi$new(client)
# Required params
identifier <- "AAPL"
tag <- "marketcap"
# Optional params
opts <- list(
frequency = "daily",
type = NULL,
start_date = as.Date("2015-01-01"),
end_date = NULL,
sort_order = "desc",
page_size = 100,
next_page = NULL
)
response <- HistoricalDataApi$get_historical_data(identifier, tag, opts)
print(response)
print(response$content)
Name | Type | Description | Notes |
---|---|---|---|
identifier | Character | An identifier for an entity such as a Company, Security, Index, etc (Ticker, FIGI, ISIN, CUSIP, CIK, LEI, Intrinio ID) | |
tag | Character | An Intrinio data tag ID or code (<a href='https://data.intrinio.com/data-tags'>reference</a>) | |
frequency | Character | Return historical data in the given frequency | [optional] [default to daily] |
type | Character | 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 | Character | 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 | Character | Gets the next page of data from a previous API call | [optional] |