This API provides access to financial data in JSON format, which can be utilized within your models through API functions.
To make it easy to access and process financial data from the API within valuation models, we have the following functions with their respective endpoints.
Function Name | Endpoint | Description |
---|---|---|
get_income_statement() | /api/income-statement/AAPL/ | Income Statement Annual |
get_income_statement_quarterly() | /api/income-statement/quarterly/AAPL/ | Income Statement Quarterly |
get_income_statement_ltm() | /api/income-statement/ltm/AAPL/ | Income Statement LTM |
get_balance_sheet_statement() | /api/balance-sheet-statement/AAPL/ | Balance Sheet Statement Annual |
get_balance_sheet_statement_quarterly() | /api/balance-sheet-statement/quarterly/AAPL/ | Balance Sheet Statement Quarterly |
get_cash_flow_statement() | /api/cash-flow-statement/AAPL/ | Cash Flow Statement Annual |
get_cash_flow_statement_quarterly() | /api/cash-flow-statement/quarterly/AAPL/ | Cash Flow Statement Quarterly |
get_cash_flow_statement_ltm() | /api/cash-flow-statement/ltm/AAPL/ | Cash Flow Statement LTM |
get_quote() | /api/quote/AAPL/ | Stock Market Quotes |
get_profile() | /api/profile/AAPL/ | Company's Profile |
get_treasury() | /api/treasury/ | Latest Treasury Rates |
get_treasury_daily() | /api/treasury/daily/ | Daily Treasury Rates (Full History) |
get_treasury_monthly() | /api/treasury/monthly/ | Monthly Treasury Rates (Full History) |
get_treasury_annual() | /api/treasury/annual/ | Annual Treasury Rates (Full History) |
get_ratios() | /api/ratios/AAPL/ | Financial Ratios Annual |
get_ratios_quarterly() | /api/ratios/quarterly/AAPL/ | Financial Ratios Quarterly |
get_ratios_ltm() | /api/ratios/ltm/AAPL/ | Financial Ratios LTM |
get_dividends_annual() | /api/dividends/AAPL/ | Annually adjusted dividends |
get_dividends_quarterly() | /api/dividends/quarterly/AAPL/ | Quarterly adjusted dividends |
get_dividends_reported() | /api/dividends/reported/AAPL/ | Dividends as reported |
get_prices_daily() | /api/prices/daily/AAPL/ | Full history of daily market prices |
get_prices_annual() | /api/prices/annual/AAPL/ | Full history of market share prices for each year |
get_cpi_annual() | /api/economic/annual/CPI/ | Annual CPI Data |
get_fx() | /api/fx/ | FX Market Prices for all currencies |
get_risk_premium() | /api/risk-premium/ | Equity Risk Premium for all countries |
The following API endpoints do not have a "get" function, but can still be used externally.
Data is premium only. Accessing it requires an active subscription.
URL Pattern: /api/revenue-analysis/<ticker>/<type>/<period>/
- ticker=[AAPL, MSFT, ... ]
- type=[geographic, product]
- period=[annual, quarter]
Examples:
-
Annual Geographic Breakdown: /api/revenue-analysis/AAPL/geographic/
-
Quarterly Geographic Breakdown: /api/revenue-analysis/AAPL/geographic/quarter/
-
Annual Product Breakdown: /api/revenue-analysis/AAPL/product/
-
Quarterly Product Breakdown: /api/revenue-analysis/AAPL/product/quarter/
URL Pattern: /api/transcript/<ticker>/<quarter>/<year>/
- ticker=[AAPL, MSFT, ... ]
- quarter=[Q1, Q2, Q3, Q4]
- year=[2023, 2022, ... ]
Example: /api/transcript/AAPL/Q4/2023/
URL Pattern: /api/sec-filings/<ticker>/
- ticker=[AAPL, MSFT, ... ]
Example: /api/sec-filings/AAPL/
URL Pattern: /api/institutional-holders/<ticker>/<date>/
- ticker=[AAPL, MSFT, ... ]
- date=[2023-06-30, ... ] (Filing report date)
Example: /api/institutional-holders/AAPL/2023-06-30/
URL Pattern: /api/news/<ticker>/<limit>/
- ticker=[AAPL, MSFT, ... ]
- limit=[1, 2, ... ] (Optional - Defaults to 10)
Example: /api/news/AAPL/5/
URL Pattern: /api/commodities/list/
Example: /api/commodities/list/
Data is split into free and premium data:
- Free plan: Most recent day quote
- Subscription: 5 years of daily quotes
URL Pattern: /api/commodities/<symbol>/
- symbol=[GCUSD, SIUSD, ... ]
Example: /api/commodities/GCUSD/
Data is premium only. Accessing it requires an active subscription.
URL Pattern: /api/commodities/intraday/<symbol>/<timestamp>/
- symbol=[GCUSD, SIUSD, ... ]
- timestamp=[1min, 5min, 15min, 30min, 1hour, 4hour] (Optional - Defaults to 1hour)
Example: /api/commodities/intraday/GCUSD/
A request limit is enforced for each individual API endpoint based on the following user types:
- Unauthenticated users: 500 requests per hour.
- Authenticated users: 1,000 requests per hour.
- Essential users: 15,000 requests per hour.
- Ultimate users: Unlimited requests.
If the API request limit is reached, any additional requests will result in an HTTP 403 Forbidden Response for the respective API endpoint.
This feature is only available for Essential and Ultimate users.
API data can be accessed externally, such as in your Python projects, using a uniquely generated sharing key. Your account's request limit is also shared when using the sharing key. Keep your sharing key secure and only share it with trusted individuals, as misuse can temporarily block your account's API access.
Here are the steps to access data externally:
- Go to your User profile
- Enable Data Sharing and click the "Update" button.
- Press the "Generate a New Key" button.
- Choose your desired data format: HTML or JSON.
- Copy the URL that contains your generated key.
Full quarterly data is only available to Essential and Ultimate plans and it refers to the following API endpoints:
- Income Statement Quarterly
- Balance Sheet Statement Quarterly
- Cash Flow Statement Quarterly
- Financial Ratios Quarterly
For Free or Unauthenticated users, only the most recent 6 quarters are accessible. All other quarters are categorized as premium data, and their values will be marked as null.
To use the API functions and retrieve financial data, simply add the desired functions to the $.when
function parameters and pass them in a Response
object as in the example below:
// (Optional) Assumptions...
$.when(
get_income_statement(),
get_income_statement_ltm(),
get_balance_sheet_statement(),
get_balance_sheet_statement_quarterly(2),
get_cash_flow_statement(),
get_cash_flow_statement_ltm(),
get_profile(),
get_treasury(),
get_fx(),
get_risk_premium(),
get_prices_annual()).done(
function($income, $income_ltm, $balance, $balance_quarterly, $flows, $flows_ltm, $profile, $treasury, $fx, $risk_premium, $prices){
try{
var response = new Response({
income: $income,
income_ltm: $income_ltm,
balance: $balance,
balance_quarterly: $balance_quarterly,
balance_ltm: 'balance_quarterly:0',
flows: $flows,
flows_ltm: $flows_ltm,
profile: $profile,
treasury: $treasury,
risk_premium: $risk_premium,
prices: $prices,
}).toOneCurrency('income', $fx).merge('_ltm');
response.balance[0]['date'] = 'LTM';
// Rest of the code...
}
catch (error) {
throwError(error);
}
});