Historical Data

Historical Data Java API Documentation

Returns historical values for the given `tag` and the entity represented by the given `identifier`

API Class:
HistoricalDataApi
Instance Method:
getHistoricalData()

Stock Price Code Example

Use my API Key
import com.intrinio.api.*;
import com.intrinio.models.*;
import com.intrinio.invoker.*;
import com.intrinio.invoker.auth.*;
import org.threeten.bp.*;
import java.math.BigDecimal;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
ApiClient defaultClient = Configuration.getDefaultApiClient();
ApiKeyAuth auth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
auth.setApiKey("YOUR_API_KEY");
defaultClient.setAllowRetries(true);
HistoricalDataApi historicalDataApi = new HistoricalDataApi();
String identifier = "AAPL";
String tag = "marketcap";
String frequency = "daily";
String type = null;
LocalDate startDate = LocalDate.of(2015,1,01);
LocalDate endDate = null;
String sortOrder = "desc";
Integer pageSize = 100;
String nextPage = null;
ApiResponseHistoricalData result = historicalDataApi.getHistoricalData(identifier, tag, frequency, type, startDate, endDate, sortOrder, pageSize,
      nextPage);
System.out.println(result);
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierStringAn identifier for an entity such as a Company, Security, Index, etc (Ticker, FIGI, ISIN, CUSIP, CIK, LEI, Intrinio ID) 
tagStringAn Intrinio data tag ID or code (reference) 
frequencyStringReturn historical data in the given frequency[optional] [default to daily] [enum: daily, weekly, monthly, quarterly, yearly]  
typeStringFilter by type, when applicable[optional]  
startDateLocalDateGet historical data on or after this date[optional]  
endDateLocalDateGet historical date on or before this date[optional]  
sortOrderStringSort by date `asc` or `desc`[optional] [default to desc] [enum: asc, desc]  
pageSizeIntegerThe number of results to return[optional] [default to 100]  
nextPageStringGets the next page of data from a previous API call[optional]  


Return Type

object
ApiResponseHistoricalData

Properties

NameTypeDescription
historicalDataList 
nextPageStringThe token required to request the next page of the data. If null, no further results are available.  
object
HistoricalData

Properties

NameTypeDescription
dateLocalDateThe date that the value is present  
valueBigDecimalThe historical value