{"id":6606,"date":"2025-12-17T14:56:18","date_gmt":"2025-12-17T14:56:18","guid":{"rendered":"https:\/\/eodhd.com\/financial-academy\/?p=6606"},"modified":"2025-12-17T15:32:23","modified_gmt":"2025-12-17T15:32:23","slug":"understanding-discounted-cash-flow-with-eodhd-api-and-python","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python","title":{"rendered":"Understanding Discounted Cash Flow with EODHD API and Python"},"content":{"rendered":"\n<p>Discounted Cash Flow (DCF) is a valuation method that calculates what a business or project is worth today by looking at the cash it is expected to generate in the future. The idea is simple: cash received in the future is worth less than cash in your hand now, so future cash flows are discounted back to present value using a rate that reflects the risk of the investment. When you add up these discounted amounts you arrive at an estimate of the enterprise value. Investors use this technique to decide whether a share or project is fairly priced.<\/p>\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-discounted-cash-flow-matters\">Why discounted cash flow matters<\/h2>\n\n\n\n<p>There are several reasons to use a discounted cash flow model. It forces a structured examination of the underlying business, including revenue growth, margins and capital expenditure. Because it is based on cash rather than accounting profits, it can be a more accurate reflection of economic reality. It is also flexible; you can adjust assumptions about growth and risk to see how sensitive the valuation is to these inputs. This makes it a useful tool for corporate finance teams evaluating acquisitions, venture capitalists assessing start\u2011ups and individual investors thinking about buying or selling a share.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-you-need-to-build-a-model\">What you need to build a model<\/h2>\n\n\n\n<p>Three ingredients are essential for a discounted cash flow calculation. First, you need free cash flow, which is the cash generated by operations after investing in capital assets. Second, you need a discount rate, often the weighted average cost of capital for a company, which represents the return required by investors. Third, you need an assumption about long term growth, used when calculating the terminal value of the business beyond the explicit forecast period. With these inputs you can project future cash flows, discount them back to the present and sum them up.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-getting-data-from-the-eodhd-fundamentals-api\">Getting data from the EODHD fundamentals API<\/h2>\n\n\n\n<p>Gathering free cash flow and other inputs manually can be time consuming. The <a href=\"https:\/\/eodhd.com\/financial-apis\/stock-etfs-fundamental-data-feeds\" target=\"_blank\" rel=\"noreferrer noopener\">EODHD Fundamentals API<\/a> makes it easy by returning comprehensive financial statements for thousands of companies. In the cash flow statement section you will find fields such as operating cash flow, capital expenditure and, in many cases, free cash flow. By calling the API for a symbol like AAPL.US you receive several years of free cash flow figures, which can be used as the base for your projections. The example below uses the free demo token provided by EODHD, but a subscription unlocks more markets and higher limits.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-discounted-cash-flow-formula\">Discounted cash flow formula<\/h2>\n\n\n\n<p>The discounted cash flow method values a business by summing the present value of the cash it will generate in the future. You take each projected cash flow and discount it back to today using a rate that reflects the risk or return you expect. The basic formula looks like this:<\/p>\n\n\n\n<p>DCF = CF1 \u00f7 (1 + r)^1&nbsp;&nbsp;+&nbsp;&nbsp;CF2 \u00f7 (1 + r)^2&nbsp;&nbsp;+&nbsp;&nbsp;\u2026&nbsp;&nbsp;+&nbsp;&nbsp;CFn \u00f7 (1 + r)^n<\/p>\n\n\n\n<p>In this equation each CF represents the expected cash flow for that year, r is the discount rate and n is the number of years into the future. You can then calculate an equity value per share by taking the resulting enterprise value, subtracting any net debt and dividing by the number of shares outstanding.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-breaking-down-a-python-script-to-make-light-work-of-calculations\">Breaking down a Python script to make light work of calculations<\/h2>\n\n\n\n<p>I have provided a self\u2011contained discounted cash flow calculator and I set up the environment by importing the handful of Python modules it needs. There is a module for parsing command\u2011line options so you can pass in your own parameters when they run it. I import a module for simple data structures called data classes to keep the classes neat and easy to read, and I bring in support for handling dates and times. I also specify the types of data used throughout the script to improve clarity and ensure consistency, and I import a library for making web requests.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">#!\/usr\/bin\/env python3\n\"\"\"DCF calculator using the EODHD fundamentals API.\"\"\"\nfrom __future__ import annotations\n\nimport argparse\nfrom dataclasses import dataclass\nfrom datetime import datetime\nfrom typing import Dict, List, Optional, Tuple\n\nimport requests\n\n\nclass EODHDAPIClient:\n    \"\"\"Client for interacting with the EODHD fundamentals API.\"\"\"\n\n    def __init__(self, api_token: str, base_url: str | None = None) -&gt; None:\n        if not api_token:\n            raise ValueError(\"An API token is required to use the EODHD API.\")\n        self.api_token = api_token\n        self.base_url = base_url or \"https:\/\/eodhd.com\/api\/fundamentals\"\n\n    def get_fundamentals(self, symbol: str, fmt: str = \"json\") -&gt; Dict:\n        \"\"\"Retrieve fundamental data for a given ticker.\"\"\"\n        params = {\n            \"api_token\": self.api_token,\n            \"fmt\": fmt,\n        }\n        response = requests.get(f\"{self.base_url}\/{symbol}\", params=params, timeout=30)\n        response.raise_for_status()\n        return response.json()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>To talk to the EODHD fundamentals service I define a small class. It needs your API token when you create an instance and optionally lets you override the default base URL if the service changes. The class stores these values and has a single method that fetches fundamentals for a specified ticker symbol. When you call that method it builds the right URL with the token and format, sends an HTTP GET request and checks for any errors. If the response is successful it returns the data in dictionary form so the rest of the code can use it.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">@dataclass\nclass FreeCashFlowService:\n    \"\"\"Service for extracting free cash flow history from fundamentals data.\"\"\"\n\n    api_client: EODHDAPIClient\n\n    def get_free_cash_flow_history(\n        self, symbol: str, years: int = 5\n    ) -&gt; List[Tuple[int, float]]:\n        \"\"\"Return a list of (year, free cash flow) tuples for the most recent years.\"\"\"\n        data = self.api_client.get_fundamentals(symbol)\n        try:\n            cash_flow_yearly = data[\"Financials\"][\"Cash_Flow\"][\"yearly\"]\n        except KeyError as exc:\n            raise RuntimeError(f\"Cash flow data missing for {symbol}: {exc}\") from exc\n\n        items = list(cash_flow_yearly.items())\n        if not items:\n            raise RuntimeError(f\"No cash flow data available for {symbol}.\")\n\n        # Sort by date descending\n        items.sort(key=lambda item: item[0], reverse=True)\n        result: List[Tuple[int, float]] = []\n        for date_str, record in items:\n            if len(result) &gt;= years:\n                break\n            year = datetime.strptime(date_str, \"%Y-%m-%d\").year\n            fcf = self._extract_free_cash_flow(record)\n            if fcf is not None:\n                result.append((year, fcf))\n        return result\n\n    def _extract_free_cash_flow(self, record: Dict) -&gt; Optional[float]:\n        \"\"\"Extract free cash flow from a cash flow record. Compute if missing.\"\"\"\n        fcf = record.get(\"freeCashFlow\") or record.get(\"free_cash_flow\")\n        if fcf is not None:\n            return float(fcf)\n        # Fallback calculation: operating cash flow \u2013 capital expenditure\n        op_cash = record.get(\"operatingCashFlow\") or record.get(\n            \"cash_from_operating_activities\"\n        )\n        capex = record.get(\"capitalExpenditures\") or record.get(\"capital_expenditure\")\n        if op_cash is None or capex is None:\n            return None\n        try:\n            return float(op_cash) - float(capex)\n        except (TypeError, ValueError):\n            return None<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>For extracting usable numbers from the raw data I wrap the parsing into another class. This service takes the client I just described and calls it to obtain the company\u2019s fundamentals. It then looks specifically at the cash flow section, picks out the most recent annual entries and orders them from latest to oldest. For each year it tries to read the free cash flow directly. If that value isn\u2019t provided, it calculates it by subtracting capital expenditure from operating cash flow. It assembles these year and cash flow pairs into a list and returns them.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">@dataclass\nclass DiscountedCashFlowCalculator:\n    \"\"\"Perform DCF projections and valuations. Optionally allows overriding\n    the projected growth rate instead of using the historical average.\"\"\"\n\n    discount_rate: float\n    projection_years: int = 5\n    terminal_growth_rate: float = 0.025\n\n    def __post_init__(self) -&gt; None:\n        if self.discount_rate &lt;= 0:\n            raise ValueError(\"Discount rate must be positive.\")\n\n    def calculate_average_growth(self, cash_flows: List[float]) -&gt; float:\n        \"\"\"Compute the average year\u2011over\u2011year growth rate.\"\"\"\n        if len(cash_flows) &lt; 2:\n            return 0.0\n        growth_rates: List[float] = []\n        for previous, current in zip(cash_flows[1:], cash_flows[:-1]):\n            if previous == 0:\n                continue\n            growth_rates.append((current \/ previous) - 1)\n        return sum(growth_rates) \/ len(growth_rates) if growth_rates else 0.0\n\n    def project_cash_flows(\n        self, last_cash_flow: float, growth_rate: float\n    ) -&gt; List[float]:\n        \"\"\"Project future free cash flows based on the last cash flow and growth rate.\"\"\"\n        projected: List[float] = []\n        fcf = last_cash_flow\n        for _ in range(self.projection_years):\n            fcf *= 1 + growth_rate\n            projected.append(fcf)\n        return projected\n\n    def discount_cash_flows(self, cash_flows: List[float]) -&gt; List[float]:\n        \"\"\"Discount each projected cash flow back to present value.\"\"\"\n        discounted: List[float] = []\n        for idx, fcf in enumerate(cash_flows, start=1):\n            discounted.append(fcf \/ ((1 + self.discount_rate) ** idx))\n        return discounted\n\n    def calculate_terminal_value(self, last_cash_flow: float) -&gt; float:\n        \"\"\"Calculate the terminal value using the Gordon growth model.\"\"\"\n        return (\n            last_cash_flow\n            * (1 + self.terminal_growth_rate)\n            \/ (self.discount_rate - self.terminal_growth_rate)\n        )\n\n    def discount_terminal_value(self, terminal_value: float) -&gt; float:\n        \"\"\"Discount the terminal value back to present.\"\"\"\n        return terminal_value \/ ((1 + self.discount_rate) ** self.projection_years)\n\n    def run(\n        self,\n        free_cash_flow_history: List[Tuple[int, float]],\n        shares_outstanding: Optional[float] = None,\n        growth_override: Optional[float] = None,\n    ) -&gt; Dict[str, object]:\n        \"\"\"Run the DCF calculation and return a results dictionary.\n\n        If ``growth_override`` is provided, use it as the projected growth rate\n        rather than computing an average from historical free cash flows.\n        \"\"\"\n        historical_flows = [fcf for _, fcf in free_cash_flow_history]\n        if growth_override is not None:\n            avg_growth = growth_override\n        else:\n            avg_growth = self.calculate_average_growth(historical_flows)\n\n        last_fcf = historical_flows[0] if historical_flows else 0\n        projected_flows = self.project_cash_flows(last_fcf, avg_growth)\n        discounted_flows = self.discount_cash_flows(projected_flows)\n\n        terminal_value = self.calculate_terminal_value(projected_flows[-1])\n        pv_terminal = self.discount_terminal_value(terminal_value)\n\n        enterprise_value = sum(discounted_flows) + pv_terminal\n\n        result: Dict[str, object] = {\n            \"historical\": free_cash_flow_history,\n            \"average_growth_rate\": avg_growth,\n            \"projected_cash_flows\": projected_flows,\n            \"present_values\": discounted_flows,\n            \"terminal_value\": terminal_value,\n            \"present_value_terminal\": pv_terminal,\n            \"enterprise_value\": enterprise_value,\n        }\n\n        if shares_outstanding:\n            result[\"intrinsic_value_per_share\"] = enterprise_value \/ shares_outstanding\n\n        return result<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>The core financial logic is encapsulated in a calculator class. When you construct it you specify a discount rate and can adjust how many future years to forecast and what terminal growth rate to assume. Given a list of historical cash flows, it first works out an average growth rate from year to year. It then uses that rate to project the cash flow forward over the chosen number of years. Each of those forecasts is discounted back to today using the discount rate. The final cash flow in the series is used to estimate a terminal value using a steady growth formula. The calculator discounts that value back to today, sums everything to give an enterprise value and, if you provide a share count, divides by the shares to produce an intrinsic value per share.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">@dataclass\nclass DCFReportFormatter:\n    \"\"\"Format a dictionary of DCF results into a human\u2011readable report.\"\"\"\n\n    currency_symbol: str = \"$\"\n\n    def format_report(self, dcf_result: Dict[str, object], symbol: str) -&gt; str:\n        lines: List[str] = []\n        lines.append(f\"Discounted Cash Flow Analysis for {symbol}\")\n        lines.append(\"-\" * 60)\n        lines.append(\"\\nHistorical Free Cash Flow:\")\n        for year, value in dcf_result[\"historical\"]:\n            lines.append(f\"  {year}: {self.currency_symbol}{value:,.0f}\")\n\n        avg_growth = dcf_result[\"average_growth_rate\"]\n        lines.append(\n            f\"\\nAverage annual growth rate used for projections: {avg_growth * 100:.2f}%\"\n        )\n\n        lines.append(\"\\nProjected Free Cash Flows:\")\n        for idx, fcf in enumerate(dcf_result[\"projected_cash_flows\"], start=1):\n            lines.append(f\"  Year +{idx}: {self.currency_symbol}{fcf:,.2f}\")\n\n        lines.append(\"\\nPresent Value of Projected Cash Flows:\")\n        for idx, pv in enumerate(dcf_result[\"present_values\"], start=1):\n            lines.append(f\"  Year +{idx}: {self.currency_symbol}{pv:,.2f}\")\n\n        lines.append(\n            f'\\nTerminal value (undiscounted): {self.currency_symbol}{dcf_result[\"terminal_value\"]:,.2f}'\n        )\n        lines.append(\n            f'Present value of terminal value: {self.currency_symbol}{dcf_result[\"present_value_terminal\"]:,.2f}'\n        )\n        lines.append(\n            f'Enterprise value: {self.currency_symbol}{dcf_result[\"enterprise_value\"]:,.2f}'\n        )\n\n        if \"intrinsic_value_per_share\" in dcf_result:\n            lines.append(\n                f'Intrinsic value per share: {self.currency_symbol}{dcf_result[\"intrinsic_value_per_share\"]:,.2f}'\n            )\n\n        return \"\\n\".join(lines)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Once the calculations are complete I want to present the results clearly, so I define a formatter. This class takes the dictionary of outputs from the calculator along with the stock\u2019s ticker symbol and builds a human\u2011readable report. It starts with a title and a separator line, then lists each historical cash flow by year. It notes the average growth rate used in the projections and lays out each projected cash flow along with its present value. It then states the terminal value, the present value of the terminal value and the resulting enterprise value. If a per\u2011share figure has been computed, it includes that too at the end of the report.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">def main() -&gt; None:\n    parser = argparse.ArgumentParser(\n        description=\"Compute a discounted cash flow valuation for a stock.\"\n    )\n    parser.add_argument(\"symbol\", help=\"Stock ticker symbol (e.g. AAPL.US)\")\n    parser.add_argument(\"--token\", required=True, help=\"EODHD API token\")\n    parser.add_argument(\n        \"--discount\", type=float, default=0.09, help=\"Discount rate (e.g. 0.09 for 9%)\"\n    )\n    parser.add_argument(\n        \"--growth\",\n        type=float,\n        default=0.025,\n        help=\"Terminal growth rate (e.g. 0.025 for 2.5%)\",\n    )\n    parser.add_argument(\n        \"--years\", type=int, default=5, help=\"Number of projection years\"\n    )\n    parser.add_argument(\"--shares\", type=float, help=\"Number of shares outstanding\")\n    parser.add_argument(\n        \"--project-growth\",\n        type=float,\n        help=\"Override the projected growth rate (e.g. 0.152 for 15.2%%). If not provided, use the historical average.\",\n    )\n    args = parser.parse_args()\n\n    client = EODHDAPIClient(api_token=args.token)\n    fcf_service = FreeCashFlowService(api_client=client)\n    history = fcf_service.get_free_cash_flow_history(args.symbol, years=args.years)\n\n    calculator = DiscountedCashFlowCalculator(\n        discount_rate=args.discount,\n        projection_years=args.years,\n        terminal_growth_rate=args.growth,\n    )\n    results = calculator.run(\n        history, shares_outstanding=args.shares, growth_override=args.project_growth\n    )\n\n    formatter = DCFReportFormatter()\n    report = formatter.format_report(results, args.symbol)\n    print(report)\n\n\nif __name__ == \"__main__\":\n    main()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>The script ends with a main function that glues everything together. It sets up the command\u2011line parser so you can enter the stock symbol, your API token, discount and growth assumptions, the number of years you want to forecast and optionally the number of shares outstanding. It then creates an API client, uses the cash flow service to get the historical free cash flows, passes them to the calculator to generate the valuation and, finally, hands the results to the formatter to produce a report. The report is printed to the console so that you can see the full discounted cash flow analysis when you run the programme.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-the-script-produces\">What the script produces<\/h2>\n\n\n\n<p>When run with Apple\u2019s recent free cash flows and assumptions of a nine per cent discount rate and a two and a half per cent terminal growth rate, the script generates a report that looks like this:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">% python3 dcf_calculator.py --token 6694f8f1ad3951.60000586 --discount 0.11 --growth 0.04 --years 10 --shares 14815307000 --project-growth 0.152 AAPL.US\nDiscounted Cash Flow Analysis for AAPL.US\n------------------------------------------------------------\n\nHistorical Free Cash Flow:\n  2025: $98,767,000,000\n  2024: $108,807,000,000\n  2023: $99,584,000,000\n  2022: $111,443,000,000\n  2021: $92,953,000,000\n  2020: $73,365,000,000\n  2019: $58,896,000,000\n  2018: $64,121,000,000\n  2017: $50,803,000,000\n  2016: $52,276,000,000\n\nAverage annual growth rate used for projections: 15.20%\n\nProjected Free Cash Flows:\n  Year +1: $113,779,584,000.00\n  Year +2: $131,074,080,768.00\n  Year +3: $150,997,341,044.74\n  Year +4: $173,948,936,883.54\n  Year +5: $200,389,175,289.83\n  Year +6: $230,848,329,933.89\n  Year +7: $265,937,276,083.84\n  Year +8: $306,359,742,048.58\n  Year +9: $352,926,422,839.97\n  Year +10: $406,571,239,111.64\n\nPresent Value of Projected Cash Flows:\n  Year +1: $102,504,129,729.73\n  Year +2: $106,382,664,368.15\n  Year +3: $110,407,954,371.27\n  Year +4: $114,585,552,644.78\n  Year +5: $118,921,222,204.31\n  Year +6: $123,420,944,125.56\n  Year +7: $128,090,925,795.17\n  Year +8: $132,937,609,473.91\n  Year +9: $137,967,681,183.73\n  Year +10: $143,188,079,931.22\n\nTerminal value (undiscounted): $6,040,486,981,087.25\nPresent value of terminal value: $2,127,365,758,978.17\nEnterprise value: $3,345,772,522,805.99\nIntrinsic value per share: $225.83<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Apple\u2019s free cash flow can grow at 15.2 percent annually for ten years, with a discount rate of 11 percent and a terminal growth rate of 4\u202f percent. Based on historical cash flows that range from about 52\u202fbillion to nearly 111 billion dollars over the past decade, the model projects future cash flows rising from roughly 113.8\u202fbillion in year one to more than 406\u202fbillion dollars in year ten. Discounting these projections at 11\u202fper\u202fcent produces present values between 102.5\u202fbillion and 143.2\u202fbillion. The terminal value representing all cash flows beyond year ten comes out at over six trillion dollars undiscounted, contributing about 2.127\u202ftrillion to the present value when discounted. Summing these amounts yields an enterprise value of roughly 3.346\u202ftrillion dollars. When divided by the 14.8\u202fbillion shares outstanding, this gives an intrinsic value of around $225.83 per share.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-turning-the-calculator-into-a-rest-api\">Turning the calculator into a REST API<\/h2>\n\n\n\n<p>The same logic can be exposed as a web service. Using Flask, a lightweight web framework, you can create an endpoint that accepts a share code and returns a JSON response with the valuation. Here is a simple example:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">from flask import Flask, jsonify, request\nfrom dcf_calculator import EODHDAPIClient, FreeCashFlowService, DiscountedCashFlowCalculator\n\napp = Flask(__name__)\n\n@app.route('\/dcf\/&lt;symbol&gt;')\ndef dcf(symbol):\n    api_token = request.args.get('token')\n    years = int(request.args.get('years', 5))\n    discount_rate = float(request.args.get('discount_rate', 0.09))\n    terminal_growth = float(request.args.get('terminal_growth', 0.025))\n    shares = request.args.get('shares')\n    shares_outstanding = float(shares) if shares else None\n\n    # Optional override for projected growth rate (e.g. 0.152 for 15.2%)\n    project_growth = request.args.get('project_growth')\n    growth_override = float(project_growth) if project_growth else None\n\n    api_client = EODHDAPIClient(api_token)\n    fcf_service = FreeCashFlowService(api_client)\n    history = fcf_service.get_free_cash_flow_history(symbol, years)\n\n    calculator = DiscountedCashFlowCalculator(\n        discount_rate,\n        projection_years=years,\n        terminal_growth_rate=terminal_growth\n    )\n\n    # Use the override growth rate if provided\n    dcf_result = calculator.run(\n        history,\n        shares_outstanding=shares_outstanding,\n        growth_override=growth_override\n    )\n\n    return jsonify(dcf_result)\n\nif __name__ == '__main__':\n    app.run(debug=True)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>This REST API allows you to make a GET request to an address like<strong> <\/strong><\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\"><strong>\/dcf\/AAPL.US?token=6694f8f1ad3951.60000586&amp;years=10&amp;discount_rate=0.11&amp;terminal_growth=0.04&amp;shares=14815307000&amp;project_growth=0.152<\/strong><\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p><br><strong> <\/strong>and receive a JSON object containing the historical free cash flows, the projected cash flows, their present values, the terminal value, the present value of the terminal and the enterprise value. Including the number of shares will also produce a per share value. You can deploy this service to a cloud platform or integrate it into an existing system, making it easy for other applications to fetch valuations on demand. Combining the EODHD fundamentals API with a well structured Python script and a simple Flask wrapper offers a powerful and flexible way to analyse investments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Discounted Cash Flow (DCF) is a valuation method that calculates what a business or project is worth today by looking at the cash it is expected to generate in the future. The idea is simple: cash received in the future is worth less than cash in your hand now, so future cash flows are discounted [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":6607,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"coding-language":[30],"ready-to-go-solution":[],"qualification":[31],"financial-apis-category":[36],"financial-apis-manuals":[37],"class_list":["post-6606","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fundamental-analysis-examples","coding-language-python","qualification-experienced","financial-apis-category-stock-market-prices","financial-apis-manuals-stocks-fundamentals","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.9 (Yoast SEO v26.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Understanding Discounted Cash Flow with EODHD API and Python | EODHD APIs Academy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding Discounted Cash Flow with EODHD API and Python\" \/>\n<meta property=\"og:description\" content=\"Discounted Cash Flow (DCF) is a valuation method that calculates what a business or project is worth today by looking at the cash it is expected to generate in the future. The idea is simple: cash received in the future is worth less than cash in your hand now, so future cash flows are discounted [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python\" \/>\n<meta property=\"og:site_name\" content=\"Financial Academy\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/eodhistoricaldata\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-17T14:56:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-17T15:32:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"853\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Whittle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:site\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Whittle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python\"},\"author\":{\"name\":\"Michael Whittle\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\"},\"headline\":\"Understanding Discounted Cash Flow with EODHD API and Python\",\"datePublished\":\"2025-12-17T14:56:18+00:00\",\"dateModified\":\"2025-12-17T15:32:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python\"},\"wordCount\":1552,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg\",\"articleSection\":[\"Fundamental Analysis Examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python\",\"name\":\"Understanding Discounted Cash Flow with EODHD API and Python | EODHD APIs Academy\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg\",\"datePublished\":\"2025-12-17T14:56:18+00:00\",\"dateModified\":\"2025-12-17T15:32:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#primaryimage\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg\",\"width\":1280,\"height\":853,\"caption\":\"The word cash flow on calculator display screen with business office desktop. To calculate or analyze financial cash flow concept.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-academy\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding Discounted Cash Flow with EODHD API and Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"name\":\"Financial APIs Academy | EODHD\",\"description\":\"Financial Stock Market Academy\",\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\",\"name\":\"EODHD (EOD Historical Data)\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"width\":159,\"height\":82,\"caption\":\"EODHD (EOD Historical Data)\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/eodhistoricaldata\",\"https:\/\/x.com\/EOD_data\",\"https:\/\/www.reddit.com\/r\/EODHistoricalData\/\",\"https:\/\/eod-historical-data.medium.com\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\",\"name\":\"Michael Whittle\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"caption\":\"Michael Whittle\"},\"description\":\"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Understanding Discounted Cash Flow with EODHD API and Python | EODHD APIs Academy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python","og_locale":"en_US","og_type":"article","og_title":"Understanding Discounted Cash Flow with EODHD API and Python","og_description":"Discounted Cash Flow (DCF) is a valuation method that calculates what a business or project is worth today by looking at the cash it is expected to generate in the future. The idea is simple: cash received in the future is worth less than cash in your hand now, so future cash flows are discounted [&hellip;]","og_url":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python","og_site_name":"Financial Academy","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2025-12-17T14:56:18+00:00","article_modified_time":"2025-12-17T15:32:23+00:00","og_image":[{"width":1280,"height":853,"url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg","type":"image\/jpeg"}],"author":"Michael Whittle","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"Michael Whittle","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python"},"author":{"name":"Michael Whittle","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad"},"headline":"Understanding Discounted Cash Flow with EODHD API and Python","datePublished":"2025-12-17T14:56:18+00:00","dateModified":"2025-12-17T15:32:23+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python"},"wordCount":1552,"publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg","articleSection":["Fundamental Analysis Examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python","url":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python","name":"Understanding Discounted Cash Flow with EODHD API and Python | EODHD APIs Academy","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg","datePublished":"2025-12-17T14:56:18+00:00","dateModified":"2025-12-17T15:32:23+00:00","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#primaryimage","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg","width":1280,"height":853,"caption":"The word cash flow on calculator display screen with business office desktop. To calculate or analyze financial cash flow concept."},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/understanding-discounted-cash-flow-with-eodhd-api-and-python#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-academy\/"},{"@type":"ListItem","position":2,"name":"Understanding Discounted Cash Flow with EODHD API and Python"}]},{"@type":"WebSite","@id":"https:\/\/eodhd.com\/financial-academy\/#website","url":"https:\/\/eodhd.com\/financial-academy\/","name":"Financial APIs Academy | EODHD","description":"Financial Stock Market Academy","publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eodhd.com\/financial-academy\/#organization","name":"EODHD (EOD Historical Data)","url":"https:\/\/eodhd.com\/financial-academy\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","width":159,"height":82,"caption":"EODHD (EOD Historical Data)"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/eodhistoricaldata","https:\/\/x.com\/EOD_data","https:\/\/www.reddit.com\/r\/EODHistoricalData\/","https:\/\/eod-historical-data.medium.com\/"]},{"@type":"Person","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad","name":"Michael Whittle","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","caption":"Michael Whittle"},"description":"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).","url":"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle"}]}},"jetpack_featured_media_url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/11\/AdobeStock_436424495.jpg","jetpack_shortlink":"https:\/\/wp.me\/pdOdVT-1Iy","jetpack_sharing_enabled":true,"acf":[],"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/6606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/comments?post=6606"}],"version-history":[{"count":5,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/6606\/revisions"}],"predecessor-version":[{"id":6631,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/6606\/revisions\/6631"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media\/6607"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media?parent=6606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/categories?post=6606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/tags?post=6606"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/coding-language?post=6606"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/ready-to-go-solution?post=6606"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/qualification?post=6606"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-category?post=6606"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-manuals?post=6606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}