Financials Historical
The historical endpoint contains a time series with an indicator identifier, category, fiscal calendar, the reference date, the report date, and the observed value. It allows one to check the evolution of key indicators over time.
By symbol and category
Using Requests:
import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/financials/historical/aapl:us:assets?c={api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
import tradingeconomics as te
te.login('your_api_key')
te.getFinancialsHistorical(symbol = 'aapl:us', category = 'assets')
Using Requests:
const axios = require('axios');
(async () => {
const api_key = 'YOUR_API_KEY'
const response = await axios.get(`https://api.tradingeconomics.com/financials/historical/aapl:us:assets?c=${api_key}`)
console.log(response.data)
})()
Or using our package:
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getFinancialsHistorical(symbol = 'aapl:us', category = 'assets' ).then(function(data){
console.log(data)
});
Using Requests:
using (var httpClient = new HttpClient())
{
using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/financials/historical/aapl:us:assets?c=your_api_key"))
{
request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
var response = await httpClient.SendAsync(request);
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
}
With multi symbols:
Using Requests:
import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/financials/historical/aapl:us:assets,msft:us:assets?c={api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
te.getFinancialsHistorical(symbol = ['aapl:us' , 'msft:us'], category = 'assets')
Using Requests:
const axios = require('axios');
(async () => {
const api_key = 'YOUR_API_KEY'
const response = await axios.get(`https://api.tradingeconomics.com/financials/historical/aapl:us:assets,msft:us:assets?c=${api_key}`)
console.log(response.data)
})()
Or using our package:
data = te.getFinancialsHistorical(symbol = ['aapl:us', 'msft:us'],
category = 'assets' ).then(function(data){
console.log(data)
});
Using Requests:
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/financials/historical/aapl:us:assets,msft:us:assets?c=your_api_key");
The response data format can be configured by appending the &f= parameter to the URL request.
/financials/historical/{symbol:category}
symbol | category | date | value | reportDate | reference |
---|---|---|---|---|---|
aapl:us | assets | 12/31/2009 12:00:00 AM | 53926.0000 | 12/26/2009 12:00:00 AM | FY2010Q1 |
aapl:us | assets | 3/31/2010 12:00:00 AM | 57057.0000 | 3/27/2010 12:00:00 AM | FY2010Q2 |
aapl:us | assets | 6/30/2010 12:00:00 AM | 64725.0000 | 6/26/2010 12:00:00 AM | FY2010Q3 |
/financials/historical/{symbol:category}?f=json
[{"symbol":"aapl:us","category":"assets","date":"2009-12-31T00:00:00","value":53926.0000,"reportDate":"2009-12-26T00:00:00","reference":"FY2010Q1 "},{"symbol":"aapl:us","category":"assets","date":"2010-03-31T00:00:00","value":57057.0000,"reportDate":"2010-03-27T00:00:00","reference":"FY2010Q2 "},{"symbol":"aapl:us","category":"assets","date":"2010-06-30T00:00:00","value":64725.0000,"reportDate":"2010-06-26T00:00:00","reference":"FY2010Q3 "}]
/financials/historical/{symbol:category}?f=csv
aapl:us,assets,12/31/2009 12:00:00 AM,53926.0000,12/26/2009 12:00:00 AM,FY2010Q1
aapl:us,assets,3/31/2010 12:00:00 AM,57057.0000,3/27/2010 12:00:00 AM,FY2010Q2
aapl:us,assets,6/30/2010 12:00:00 AM,64725.0000,6/26/2010 12:00:00 AM,FY2010Q3
/financials/historical/{symbol:category}?f=xml
<ArrayOfanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.FinancialHistoricalItem">
<d2p1:category>assets</d2p1:category>
<d2p1:date>2009-12-31T00:00:00</d2p1:date>
<d2p1:reference>FY2010Q1 </d2p1:reference>
<d2p1:reportDate>2009-12-26T00:00:00</d2p1:reportDate>
<d2p1:symbol>aapl:us</d2p1:symbol>
<d2p1:value>53926.0000</d2p1:value>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.FinancialHistoricalItem">
<d2p1:category>assets</d2p1:category>
<d2p1:date>2010-03-31T00:00:00</d2p1:date>
<d2p1:reference>FY2010Q2 </d2p1:reference>
<d2p1:reportDate>2010-03-27T00:00:00</d2p1:reportDate>
<d2p1:symbol>aapl:us</d2p1:symbol>
<d2p1:value>57057.0000</d2p1:value>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.FinancialHistoricalItem">
<d2p1:category>assets</d2p1:category>
<d2p1:date>2010-06-30T00:00:00</d2p1:date>
<d2p1:reference>FY2010Q3 </d2p1:reference>
<d2p1:reportDate>2010-06-26T00:00:00</d2p1:reportDate>
<d2p1:symbol>aapl:us</d2p1:symbol>
<d2p1:value>64725.0000</d2p1:value>
</anyType>
</ArrayOfanyType>
By symbol, category and date
Using Requests:
import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/financials/historical/aapl:us:assets?d1=2022-01-01&d2=2023-01-01&c={api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
te.getFinancialsHistorical(symbol = 'aapl:us', category = 'assets',
initDate = '2022-01-01', endDate ='2023-01-01')
Using Requests:
const axios = require('axios');
(async () => {
const api_key = 'YOUR_API_KEY'
const response = await axios.get(`https://api.tradingeconomics.com/financials/historical/aapl:us:assets?d1=2022-01-01&d2=2023-01-01&c=${api_key}`)
console.log(response.data)
})()
Or using our package:
data = te.getFinancialsHistorical(symbol = 'aapl:us', category = 'assets',
start_date = '2022-01-01', end_date = '2023-01-01').then(function(data){
console.log(data)
});
Using Requests:
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/financials/historical/aapl:us:assets?d1=2022-01-01&d2=2023-01-01&c=your_api_key");
/financials/historical/{symbol:category}?d1=yyyy-mm-dd&d2=yyyy-mm-dd
symbol | category | date | value | reportDate | reference |
---|---|---|---|---|---|
aapl:us | assets | 3/31/2022 12:00:00 AM | 350662.0000 | 3/26/2022 12:00:00 AM | FY2022Q2 |
aapl:us | assets | 6/30/2022 12:00:00 AM | 336309.0000 | 6/25/2022 12:00:00 AM | FY2022Q3 |
aapl:us | assets | 9/30/2022 12:00:00 AM | 352755.0000 | 9/24/2022 12:00:00 AM | FY2022Q4 |
/financials/historical/{symbol:category}?d1=yyyy-mm-dd&d2=yyyy-mm-dd?f=json
[{"symbol":"aapl:us","category":"assets","date":"2022-03-31T00:00:00","value":350662.0000,"reportDate":"2022-03-26T00:00:00","reference":"FY2022Q2 "},{"symbol":"aapl:us","category":"assets","date":"2022-06-30T00:00:00","value":336309.0000,"reportDate":"2022-06-25T00:00:00","reference":"FY2022Q3 "},{"symbol":"aapl:us","category":"assets","date":"2022-09-30T00:00:00","value":352755.0000,"reportDate":"2022-09-24T00:00:00","reference":"FY2022Q4 "}]
/financials/historical/{symbol:category}?d1=yyyy-mm-dd&d2=yyyy-mm-dd?f=csv
aapl:us,assets,3/31/2022 12:00:00 AM,350662.0000,3/26/2022 12:00:00 AM,FY2022Q2
aapl:us,assets,6/30/2022 12:00:00 AM,336309.0000,6/25/2022 12:00:00 AM,FY2022Q3
aapl:us,assets,9/30/2022 12:00:00 AM,352755.0000,9/24/2022 12:00:00 AM,FY2022Q4
/financials/historical/{symbol:category}?d1=yyyy-mm-dd&d2=yyyy-mm-dd?f=xml
<ArrayOfanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.FinancialHistoricalItem">
<d2p1:category>assets</d2p1:category>
<d2p1:date>2022-03-31T00:00:00</d2p1:date>
<d2p1:reference>FY2022Q2 </d2p1:reference>
<d2p1:reportDate>2022-03-26T00:00:00</d2p1:reportDate>
<d2p1:symbol>aapl:us</d2p1:symbol>
<d2p1:value>350662.0000</d2p1:value>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.FinancialHistoricalItem">
<d2p1:category>assets</d2p1:category>
<d2p1:date>2022-06-30T00:00:00</d2p1:date>
<d2p1:reference>FY2022Q3 </d2p1:reference>
<d2p1:reportDate>2022-06-25T00:00:00</d2p1:reportDate>
<d2p1:symbol>aapl:us</d2p1:symbol>
<d2p1:value>336309.0000</d2p1:value>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.FinancialHistoricalItem">
<d2p1:category>assets</d2p1:category>
<d2p1:date>2022-09-30T00:00:00</d2p1:date>
<d2p1:reference>FY2022Q4 </d2p1:reference>
<d2p1:reportDate>2022-09-24T00:00:00</d2p1:reportDate>
<d2p1:symbol>aapl:us</d2p1:symbol>
<d2p1:value>352755.0000</d2p1:value>
</anyType>
</ArrayOfanyType>
Response fields
Field | Type | Description | Example |
---|---|---|---|
Symbol | string | Unique symbol used by Trading Economics | “aapl:us” |
Category | string | Financials historical category | “assets” |
Date | string | Trading Economics date time in UTC | “2009-12-31T00:00:00” |
Value | number | Value of the historical date | 53926.0000 |
Report | string | Reporting date | “2009-12-26T00:00:00” |
Reference | string | Fiscal reference date | “FY2010Q1” |