Fundamental Data API

fundamental data api

Fundamental financial data for stocks worldwide

We offer our premium customers access to the following Fundamental Data APIs:

  1. API_Fundamentals contains fundamental data from annual reports: earnings per share (diluted), total liabilities, equity, operating net cash flow, capital expenditures, free cash flow, profit/loss, shares outstanding, net revenue.
  2. API_Dividend contains the annual dividends (split-adjusted, excluding special dividends).
  3. API_Fscore contains our F-Score for every past trading day.
  4. API_Pricetobook contains the price-to-book ratio (KBV) for every past trading day.
  5. API_Pricetocashflow contains the price-to-cash-flow ratio (KCV) for every past trading day.
  6. API_Pricetoearning contains the price-to-earnings ratio (KGV) for every past trading day.
  7. API_Pricetofreecashflow contains the price-to-free-cash-flow ratio (KFCV) for every past trading day.
  8. API_Pricetosales contains the price-to-sales ratio (KUV) for every past trading day.
  9. API_Roa contains the profitability (GKR) for the fiscal year.
  10. API_Roe contains the equity ratio (EKQ) for the fiscal year.

Finding the Shareuid

To query fundamental data via our API, you need the Shareuid for the stock you are looking for. You can either determine it via the API itself or take it from the Excel table. IMPORTANT: This also binds the currency in which the API_Fundamentals results are returned.

Syntax: name = search by company name, wkn = search by WKN, isin = search by ISIN, token = your Finanzoo token (https://www.finanzoo.de/account/api.html) – a Premium account is required for use.

Example calls:

https://api.finanzoo.de/v2/public/?API_Index&name=ibm&token=YOURTOKEN
https://api.finanzoo.de/v2/public/?API_Index&wkn=851399&token=YOURTOKEN
https://api.finanzoo.de/v2/public/?API_Index&isin=US4592001014&token=YOURTOKEN

Example response:

{"shareuid":"2","isin":"US4592001014","wkn":"851399","currency":"USD","shortname":"IBM","name":"International Business Machines Corp.","country":"United States of America","indizes":"Dow Jones Industrial Average,S&P 500","sector":"Technology","lastbalanceupdate":"2020-01-26"}

Note: We no longer maintain a static Shareuid table, since IDs keep changing as new stocks are added. Instead, always look up the current Shareuid via API_Index (see above).

API_Fundamentals

Syntax: shareuid, from, to, token – a Premium account is required for use.

https://api.finanzoo.de/v2/public/?API_Fundamentals&shareuid=2&from=2019-01-01&to=2020-03-31&token=YOURTOKEN

Example response:

[{"year":"2019","eps":"10.566","total_liabilities":"152186000000","operating_cashflow":"14770000000","capex":"-2370000000","free_cashflow":"12400000000.00","total_equity":"20841000000","net_income":"9431000000","net_revenue":"77147000000","outstandingshares":"892580000"}]

API_Dividend

Syntax: shareuid, from, to, token – a Premium account is required for use.

https://api.finanzoo.de/v2/public/?API_Dividend&shareuid=2&from=1919-01-01&to=2020-03-31&token=YOURTOKEN

API_Fscore

https://api.finanzoo.de/v2/public/?API_Fscore&shareuid=2&from=2020-02-15&to=2020-03-15&token=YOURTOKEN

API_Pricetobook

https://api.finanzoo.de/v2/public/?API_Pricetobook&shareuid=2&from=2019-12-15&to=2020-03-15&token=YOURTOKEN

API_Pricetocashflow

https://api.finanzoo.de/v2/public/?API_Pricetocashflow&shareuid=2&from=2020-02-15&to=2020-03-15&token=YOURTOKEN

API_Pricetoearning

https://api.finanzoo.de/v2/public/?API_Pricetoearning&shareuid=2&from=2019-12-15&to=2020-03-15&token=YOURTOKEN

API_Pricetofreecashflow

https://api.finanzoo.de/v2/public/?API_Pricetofreecashflow&shareuid=2&from=2020-01-02&to=2020-03-15&token=YOURTOKEN

API_Pricetosales

https://api.finanzoo.de/v2/public/?API_Pricetosales&shareuid=2&from=2020-01-01&to=2020-03-15&token=YOURTOKEN

API_Roa

https://api.finanzoo.de/v2/public/?API_Roa&shareuid=2&from=2019-01-01&to=2020-03-15&token=YOURTOKEN

API_Roe

https://api.finanzoo.de/v2/public/?API_Roe&shareuid=2&from=2019-01-01&to=2020-03-31&token=YOURTOKEN

Finanzoo V2 API

Our current API version is V2, available at the base URL https://api.finanzoo.de/v2/public/ (see example calls above). It uses the same call syntax as the previous V1 API (endpoint name as a query flag, followed by the respective parameters and your token).

A complete, interactive Swagger documentation of all V2 endpoints (including example calls and response schemas) can be found under /swagger under the tag PublicApi.

Note on API_Fundamentals (V2): In addition to the legacy fields shown above, API_Fundamentals in V2 also returns the following metrics per fiscal year when available: gross_profit, operating_income, investing_cashflow, financing_cashflow, total_assets, current_assets, current_liabilities, long_term_debt and dividends_paid. All previous fields remain unchanged.

Access rights per account type (V2):

  • Business accounts receive unrestricted access to all stocks, as in V1.
  • Paying Premium accounts (non-Business) receive access to Apple, Siemens and Makita.
  • Free accounts only receive access to Apple.

If you query a stock your account type does not have access to, the API responds with HTTP status 403 Forbidden. An invalid or expired token results in 401 Unauthorized. The stock filter endpoints API_Getfilteredshares, API_Getindices, API_Getcountries and API_Gics are currently only available in the V1 API and have no V2 equivalent yet.

Fundamental Data API access with PHP

$requesturl = "https://api.finanzoo.de/v2/public/?API_Fundamentals&shareuid=2&from=2019-01-01&to=2020-03-31&token=YOURTOKEN";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $requesturl);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );

$response = curl_exec($ch);

curl_close($ch);

var_dump(json_decode($response,true));

Fundamental Data RESTful API C#

using System;
using System.Net;

namespace FundamentalData
{
    class Program
    {
        static void Main(string[] args)
        {
            string url = "https://api.finanzoo.de/v2/public/?API_Fundamentals&shareuid=2&from=2019-01-01&to=2020-03-31&token=YOURTOKEN";
            string response = GetFundamentalData(url);
            Console.WriteLine(response);
            Console.ReadLine();
        }

        public static string GetFundamentalData(string url)
        {
            string response = string.Empty;
            using (WebClient client = new WebClient())
            {
                client.Headers["User-Agent"] = "Mozilla/4.0 (Compatible; Windows NT 5.1; MSIE 6.0)";
                response = client.DownloadString(url);
            }
            return response;
        }
    }
}

Questions and suggestions

Do you have questions or suggestions about our API? Please use our contact form with the subject "API Question".