Skip to content

Latest commit

 

History

History
109 lines (72 loc) · 3.55 KB

HistoricalDataApi.md

File metadata and controls

109 lines (72 loc) · 3.55 KB

HistoricalDataApi

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

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

getHistoricalData

View Intrinio API Documentation

ApiResponseHistoricalData getHistoricalData(identifier, tag, frequency, type, startDate, endDate, sortOrder, pageSize, nextPage)

Historical Data

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

Example

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);
  }
}

Parameters

Name Type Description Notes
identifier String An identifier for an entity such as a Company, Security, Index, etc (Ticker, FIGI, ISIN, CUSIP, CIK, LEI, Intrinio ID)  
tag String An Intrinio data tag ID or code (<a href='https://data.intrinio.com/data-tags&#39;&gt;reference&lt;/a>)  
frequency String Return historical data in the given frequency [optional] [default to daily] [enum: daily, weekly, monthly, quarterly, yearly]  
type String Filter by type, when applicable [optional]  
startDate LocalDate Get historical data on or after this date [optional]  
endDate LocalDate Get historical date on or before this date [optional]  
sortOrder String Sort by date `asc` or `desc` [optional] [default to desc] [enum: asc, desc]  
pageSize Integer The number of results to return [optional] [default to 100]  
nextPage String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseHistoricalData