Historical
The API also provides historical of stocks earnings and fundamental information. Category is always a required parameter.
By symbol and category
Get financials historical data by specific or multiple symbols and categories
/financials/historical/{symbol:category}
import tradingeconomics as te
te.login('your_api_key')
te.getFinancialsHistorical(symbol = 'aapl:us', category = 'assets')
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getFinancialsHistorical(symbol = 'aapl:us', category = 'assets' ).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/financials/historical/aapl:us:assets?c=guest:guest");
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,symbol:category}
te.getFinancialsHistorical(symbol = ['aapl:us' , 'msft:us'], category = 'assets')
data = te.getFinancialsHistorical(symbol = ['aapl:us', 'msft:us'],
category = 'assets' ).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/financials/historical/aapl:us:assets,msft:us:assets?c=guest:guest");
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 |
msft:us | assets | 6/30/2010 12:00:00 AM | 86113.0000 | 6/30/2010 12:00:00 AM | FY2010Q4 |
By symbol, category and date
Get financials historical data by specific or multiple symbols and categories, and a date interval
/financials/historical/{symbol:category}?d1=yyyy-mm-dd&d2=yyyy-mm-dd
te.getFinancialsHistorical(symbol = 'aapl:us', category = 'assets',
initDate = '2022-01-01', endDate ='2023-01-01')
data = te.getFinancialsHistorical(symbol = 'aapl:us', category = 'assets',
start_date = '2022-01-01', end_date = '2023-01-01').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/financials/historical/aapl:us:assets?d1=2022-01-01&d2=2023-01-01&c=guest:guest");
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 |
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 | Date Reporting date | “2009-12-26T00:00:00” |
Reference | string | Fiscal reference date | “FY2010Q1” |