This endpoint aggregates all financial statements for a ticker into a single API call.
So, instead of calling 3 endpoints to get income statements, balance sheets, and cash flow statements, you can call this endpoint once and get all financial statements in one go.
The endpoint returns the following financial statements:
You can filter the data by ticker, period, limit, and report_period.
Note: ticker and period are required. Alternatively, you can use cik instead of ticker as a company identifier in your request.
By default, period is ttm,limit is 4, and report_period is null.
The period parameter can be set to annual, quarterly, or ttm (trailing twelve months). The limit parameter is used to specify the number of periods to return.
The report_period parameter is used to specify the date of the statement. For example, you can include filters like report_period_lte=2024-09-30 and report_period_gte=2024-01-01 to get statements between January 1, 2024 and September 30, 2024.
import requests# add your API key to the headersheaders ={"X-API-KEY":"your_api_key_here"}# set your query paramsticker ='NVDA'# stock tickerperiod ='annual'# possible values are 'annual', 'quarterly', or 'ttm'limit =30# number of statements to return# create the URLurl =(f'https://api.financialdatasets.ai/financials/'f'?ticker={ticker}'f'&period={period}'f'&limit={limit}')# make API requestresponse = requests.get(url, headers=headers)# parse financials from the responsefinancials = response.json().get('financials')# get income statementsincome_statements = financials.get('income_statements')# get balance sheetsbalance_sheets = financials.get('balance_sheets')# get cash flow statementscash_flow_statements = financials.get('cash_flow_statements')
import requests# add your API key to the headersheaders ={"X-API-KEY":"your_api_key_here"}# set your query paramsticker ='NVDA'period ='annual'limit =100report_period_lte ='2024-01-01'# end datereport_period_gte ='2020-01-01'# start date# create the URLurl =(f'https://api.financialdatasets.ai/financials/'f'?ticker={ticker}'f'&period={period}'f'&limit={limit}'f'&report_period_lte={report_period_lte}'f'&report_period_gte={report_period_gte}')# make API requestresponse = requests.get(url, headers=headers)# parse financials from the responsefinancials = response.json().get('financials')