Skip to content

Latest commit

 

History

History
113 lines (76 loc) · 3.63 KB

HistoricalDataApi.md

File metadata and controls

113 lines (76 loc) · 3.63 KB

Intrinio.SDK.Api.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 (string identifier, string tag, string frequency = null, string type = null, DateTime? startDate = null, DateTime? endDate = null, string sortOrder = null, int? pageSize = null, string nextPage = null)

Historical Data

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

Example

using System;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using Intrinio.SDK.Api;
using Intrinio.SDK.Client;
using Intrinio.SDK.Model;
using Newtonsoft.Json;

namespace Example
{
  public class GetHistoricalDataExample
  {
    public static void Main()
    {
      Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
      Configuration.Default.AllowRetries = true;
      
      var historicalDataApi = new HistoricalDataApi();
      
      string identifier = "AAPL";
      string tag = "marketcap";
      string frequency = "daily";
      string type = null;
      DateTime? startDate = DateTime.Parse("2015-01-01");
      DateTime? endDate = null;
      string sortOrder = "desc";
      int? pageSize = 100;
      string nextPage = null;
      
      ApiResponseHistoricalData result = historicalDataApi.GetHistoricalData(identifier, tag, frequency, type, startDate, endDate, sortOrder, pageSize, nextPage);
      Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented));
    }
  }
}

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]  
type string Filter by type, when applicable [optional]  
startDate DateTime? Get historical data on or after this date [optional]  
endDate DateTime? Get historical date on or before this date [optional]  
sortOrder string Sort by date `asc` or `desc` [optional] [default to desc]  
pageSize int? 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