{"id":6113,"date":"2024-12-07T16:41:25","date_gmt":"2024-12-07T16:41:25","guid":{"rendered":"https:\/\/eodhd.com\/financial-academy\/?p=6113"},"modified":"2025-02-05T14:05:29","modified_gmt":"2025-02-05T14:05:29","slug":"fundamental-data-for-the-financial-trading-dashboard-with-python-django","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django","title":{"rendered":"Fundamental Data for the Financial Trading Dashboard with Python Django"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"1024\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10-809x1024.png\" alt=\"\" class=\"wp-image-6114\" srcset=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10-809x1024.png 809w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10-237x300.png 237w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10-768x972.png 768w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10-1214x1536.png 1214w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10-1618x2048.png 1618w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10-47x60.png 47w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10-119x150.png 119w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png 1830w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"bordered_paragraph\" style=\"font-size:16px\">Please note, API data availability depends on your subscription plan. Some data isn&#8217;t included in the free plan. Visit our <a href=\"https:\/\/eodhd.com\/pricing\" target=\"_blank\" rel=\"noreferrer noopener\">pricing page<\/a> to find the plan that fits your needs.<\/p>\n\n\n\n<p style=\"font-size:18px\">This article builds upon the previous three in the series, \u201c<em><a href=\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/build-a-financial-trading-dashboard-with-python-django\" target=\"_blank\" rel=\"noreferrer noopener\">Build a Financial Trading Dashboard with Python Django<\/a>\u201d, \u201c<a href=\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/enhancing-the-financial-trading-dashboard-with-python-django\" target=\"_blank\" rel=\"noreferrer noopener\">Enhancing the Financial Trading Dashboard with Python Django<\/a>\u201d<\/em>, and &#8220;<a href=\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/anychart-integration-for-the-financial-trading-dashboard-with-python-django\" target=\"_blank\" rel=\"noreferrer noopener\"><em>AnyChart integration for the Financial Trading Dashboard with Python Django<\/em><\/a>&#8220;.<\/p>\n\n\n\n<p>The EODHD APIs include an endpoint that provides Fundamental Data, which is <a href=\"https:\/\/eodhd.com\/financial-apis\/stock-etfs-fundamental-data-feeds\" target=\"_blank\" rel=\"noreferrer noopener\">documented here<\/a>. While it offers a substantial amount of data, I am primarily interested in extracting five specific sections for the Django application.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-a9c6eaa639f97234ae9958e42fa0c1a9\"><code lang=\"python\" class=\"language-python\">{\n  \"General\": {\n    \"Description\": \"Apple Inc. designs, manufactures, and markets smartphones, personal computers, tablets, wearables, and accessories worldwide. The company offers iPhone, a line of smartphones; Mac, a line of personal computers; iPad, a line of multi-purpose tablets; and wearables, home, and accessories comprising AirPods, Apple TV, Apple Watch, Beats products, and HomePod. It also provides AppleCare support and cloud services; and operates various platforms, including the App Store that allow customers to discover and download applications and digital content, such as books, music, video, games, and podcasts, as well as advertising services include third-party licensing arrangements and its own advertising platforms. In addition, the company offers various subscription-based services, such as Apple Arcade, a game subscription service; Apple Fitness+, a personalized fitness service; Apple Music, which offers users a curated listening experience with on-demand radio stations; Apple News+, a subscription news and magazine service; Apple TV+, which offers exclusive original content; Apple Card, a co-branded credit card; and Apple Pay, a cashless payment service, as well as licenses its intellectual property. The company serves consumers, and small and mid-sized businesses; and the education, enterprise, and government markets. It distributes third-party applications for its products through the App Store. The company also sells its products through its retail and online stores, and direct sales force; and third-party cellular network carriers, wholesalers, retailers, and resellers. Apple Inc. was founded in 1976 and is headquartered in Cupertino, California.\",\n    \"Address\": \"One Apple Park Way, Cupertino, CA, United States, 95014\",\n  },\n  \"Highlights\": {\n    \"MarketCapitalization\": 3553119698944,\n    \"MarketCapitalizationMln\": 3553119.6989,\n    \"EBITDA\": 134660997120,\n    \"PERatio\": 38.6612,\n    \"PEGRatio\": 2.4109,\n    \"WallStreetTargetPrice\": 244.4774,\n    \"BookValue\": 3.767,\n    \"DividendShare\": 0.98,\n    \"DividendYield\": 0.0043,\n    \"EarningsShare\": 6.08,\n    \"EPSEstimateCurrentYear\": 6.7,\n    \"EPSEstimateNextYear\": 7.46,\n    \"EPSEstimateNextQuarter\": 2.38,\n    \"EPSEstimateCurrentQuarter\": 1.6,\n    \"MostRecentQuarter\": \"2024-09-30\",\n    \"ProfitMargin\": 0.2397,\n    \"OperatingMarginTTM\": 0.3117,\n    \"ReturnOnAssetsTTM\": 0.2146,\n    \"ReturnOnEquityTTM\": 1.5741,\n    \"RevenueTTM\": 391034994688,\n    \"RevenuePerShareTTM\": 25.485,\n    \"QuarterlyRevenueGrowthYOY\": 0.061,\n    \"GrossProfitTTM\": 170782000000,\n    \"DilutedEpsTTM\": 6.08,\n    \"QuarterlyEarningsGrowthYOY\": -0.341\n  },\n  \"SharesStats\": {\n    \"SharesOutstanding\": 15115799552,\n    \"SharesFloat\": 15091184209,\n    \"PercentInsiders\": 2.056,\n    \"PercentInstitutions\": 61.915,\n    \"SharesShort\": null,\n    \"SharesShortPriorMonth\": null,\n    \"ShortRatio\": null,\n    \"ShortPercentOutstanding\": null,\n    \"ShortPercentFloat\": 0.0088\n  },\n  \"Earnings\": {\n    \"History\": {\n      \"2025-06-30\": {\n        \"reportDate\": \"2025-07-30\",\n        \"date\": \"2025-06-30\",\n        \"beforeAfterMarket\": \"BeforeMarket\",\n        \"currency\": \"USD\",\n        \"epsActual\": null,\n        \"epsEstimate\": null,\n        \"epsDifference\": null,\n        \"surprisePercent\": null\n      },\n      &lt;snip&gt;\n  },\n  \"Financials\": {\n    \"Cash_Flow\": {\n      \"currency_symbol\": \"USD\",\n      \"quarterly\": {\n        \"2024-09-30\": {\n          \"date\": \"2024-09-30\",\n          \"filing_date\": \"2024-11-01\",\n          \"currency_symbol\": \"USD\",\n          \"investments\": \"1445000000.00\",\n          \"changeToLiabilities\": null,\n          \"totalCashflowsFromInvestingActivities\": null,\n          \"netBorrowings\": null,\n          \"totalCashFromFinancingActivities\": \"-24948000000.00\",\n          \"changeToOperatingActivities\": null,\n          \"netIncome\": \"14736000000.00\",\n          \"changeInCash\": \"3308000000.00\",\n          \"beginPeriodCashFlow\": \"26635000000.00\",\n          \"endPeriodCashFlow\": \"29943000000.00\",\n          \"totalCashFromOperatingActivities\": \"26811000000.00\",\n          \"issuanceOfCapitalStock\": null,\n          \"depreciation\": \"2911000000.00\",\n          \"otherCashflowsFromInvestingActivities\": null,\n          \"dividendsPaid\": \"3804000000.00\",\n          \"changeToInventory\": \"-1087000000.00\",\n          \"changeToAccountReceivables\": \"-22941000000.00\",\n          \"salePurchaseOfStock\": \"-25083000000.00\",\n          \"otherCashflowsFromFinancingActivities\": \"-448000000.00\",\n          \"changeToNetincome\": null,\n          \"capitalExpenditures\": \"2908000000\",\n          \"changeReceivables\": null,\n          \"cashFlowsOtherOperating\": null,\n          \"exchangeRateChanges\": null,\n          \"cashAndCashEquivalentsChanges\": null,\n          \"changeInWorkingCapital\": \"6608000000.00\",\n          \"stockBasedCompensation\": \"2858000000.00\",\n          \"otherNonCashItems\": \"-302000000.00\",\n          \"freeCashFlow\": \"23903000000.00\"\n        },\n      &lt;snip&gt;\n  },\n}<\/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 is just a small subset of the data available. In addition to this, I also want to retrieve the Open, High, Close, Previous Close, and Volume. I obtained this data from the EOD endpoint, <a href=\"https:\/\/eodhd.com\/financial-apis\/api-for-historical-data-and-volumes\" target=\"_blank\" rel=\"noreferrer noopener\">as documented here<\/a>.<\/p>\n\n\n\n<p>And finally, I want to retrieve the market capitalisation for the market as well. This needs to be retrieved by another API endpoint <a href=\"https:\/\/eodhd.com\/financial-apis\/historical-market-capitalization-api\">which is documented here<\/a>.<\/p>\n\n\n\n<p>The data when graphed, will look like this&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"733\" height=\"1024\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-28-at-21.26.30-733x1024.png\" alt=\"\" class=\"wp-image-6126\" srcset=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-28-at-21.26.30-733x1024.png 733w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-28-at-21.26.30-215x300.png 215w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-28-at-21.26.30-768x1073.png 768w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-28-at-21.26.30-1099x1536.png 1099w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-28-at-21.26.30-1466x2048.png 1466w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-28-at-21.26.30-43x60.png 43w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-28-at-21.26.30-107x150.png 107w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-28-at-21.26.30.png 1682w\" sizes=\"auto, (max-width: 733px) 100vw, 733px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>I currently have a view that provides data for the AnyChart stock chart and the Bootstrap data table. My intention was to include this fundamental and market cap data on the same page by incorporating it into the existing view. However, I wanted to avoid chaining four API calls sequentially, as that would result in slower performance. Instead, I utilised the <code>asyncio<\/code> library and converted the view into an asynchronous function. This allowed me to dispatch the API requests asynchronously (all at the same time). Once all the data was retrieved, I processed it as required and returned it to the template as usual.<\/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\n\n\n<h2 class=\"wp-block-heading\" id=\"h-updating-the-view-fetch-historical-data\">Updating the View &#8211; fetch_historical_data<\/h2>\n\n\n\n<p>The first step is we need to import &#8220;asyncio&#8221; and &#8220;httpx&#8221; in our &#8220;views.py&#8221;.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-7c56f1e242d7cccc901eb2080c4966ee\"><code lang=\"python\" class=\"language-python\">import json\n<strong>import asyncio\nimport httpx<\/strong>\nfrom django.conf import settings\nfrom datetime import datetime, timedelta\nimport requests\nfrom django.shortcuts import render, get_object_or_404, redirect\nfrom .models import SPGlobalIndex, IndexConstituent, HistoricalMarketData, SearchData<\/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 updated &#8220;fetch_historical_data&#8221; in &#8220;views.py&#8221; now looks like this&#8230;<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-f8cbe6e79e35a9dc8b540471a73a6516\"><code lang=\"python\" class=\"language-python\">async def fetch_historical_data(request, market, interval):\n    now = datetime.now()\n\n    if interval in [\"m\", \"w\", \"d\"]:\n        end_date = now.date().isoformat()\n        start_date = (now - timedelta(days=300)).date().isoformat()\n    else:\n        end_date = now.strftime(\"%Y-%m-%dT%H:%M\")\n        start_date = (now - timedelta(hours=300)).strftime(\"%Y-%m-%dT%H:%M\")\n\n    start_date = request.GET.get(\"from\", start_date)\n    end_date = request.GET.get(\"to\", end_date)\n\n    def parse_datetime(dt_str):\n        try:\n            return datetime.strptime(dt_str, \"%Y-%m-%dT%H:%M:%S\")\n        except ValueError:\n            try:\n                return datetime.strptime(dt_str, \"%Y-%m-%dT%H:%M\")\n            except ValueError:\n                return datetime.strptime(dt_str, \"%Y-%m-%d\")\n\n    start_date_parsed = parse_datetime(start_date)\n    end_date_parsed = parse_datetime(end_date)\n\n    if interval in [\"m\", \"w\", \"d\"]:\n        start_date = start_date_parsed.strftime(\"%Y-%m-%d\")\n        end_date = end_date_parsed.strftime(\"%Y-%m-%d\")\n    else:\n        start_date_unix = int(start_date_parsed.timestamp())\n        end_date_unix = int(end_date_parsed.timestamp())\n\n    endpoint = \"eod\" if interval in [\"m\", \"w\", \"d\"] else \"intraday\"\n    interval_type = \"period\" if interval in [\"m\", \"w\", \"d\"] else \"interval\"\n\n    historical_url = (\n        f\"https:\/\/eodhd.com\/api\/{endpoint}\/{market}?\"\n        f\"{interval_type}={interval}&amp;from={start_date if interval in ['m', 'w', 'd'] else start_date_unix}\"\n        f\"&amp;to={end_date if interval in ['m', 'w', 'd'] else end_date_unix}\"\n        f\"&amp;api_token={settings.EODHD_API_TOKEN}&amp;fmt=json\"\n    )\n    fundamental_url = f\"https:\/\/eodhd.com\/api\/fundamentals\/{market}?api_token={settings.EODHD_API_TOKEN}&amp;fmt=json\"\n\n    today_minus_7_days = (now - timedelta(days=7)).strftime(\"%Y-%m-%d\")\n    ohlc_url = (\n        f\"https:\/\/eodhd.com\/api\/eod\/{market}?\"\n        f\"period=d&amp;from={today_minus_7_days}\"\n        f\"&amp;api_token={settings.EODHD_API_TOKEN}&amp;fmt=json\"\n    )\n\n    market_cap_url = f\"https:\/\/eodhd.com\/api\/historical-market-cap\/{market}?api_token={settings.EODHD_API_TOKEN}&amp;fmt=json\"\n\n    async def fetch_data(url):\n        async with httpx.AsyncClient() as client:\n            response = await client.get(url)\n            return response.json()\n\n    historical_data, fundamental_data, ohlc_data, market_cap_data = await asyncio.gather(\n        fetch_data(historical_url),\n        fetch_data(fundamental_url),\n        fetch_data(ohlc_url),\n        fetch_data(market_cap_url),\n    )\n\n    # Process historical data\n    def format_unix_timestamp(unix_ts):\n        return datetime.utcfromtimestamp(unix_ts).strftime(\"%Y-%m-%d %H:%M:%S\")\n\n    for entry in historical_data:\n        if \"date\" in entry:\n            entry[\"timestamp\"] = entry.pop(\"date\")\n        elif \"datetime\" in entry:\n            datetime_value = entry.pop(\"datetime\")\n            try:\n                entry[\"timestamp\"] = format_unix_timestamp(int(datetime_value))\n            except ValueError:\n                entry[\"timestamp\"] = datetime_value\n\n    if not historical_data or \"error\" in historical_data:\n        historical_data = []\n\n    raw_data = historical_data\n    historical_data_json = json.dumps(historical_data)\n\n    # Process OHLC data\n    ohlc_latest = {}\n    if ohlc_data and len(ohlc_data) &gt;= 2:\n        latest_entry = ohlc_data[-1]\n        second_last_entry = ohlc_data[-2]\n        ohlc_latest = {\n            \"Open\": latest_entry.get(\"open\", \"-\"),\n            \"High\": latest_entry.get(\"high\", \"-\"),\n            \"Low\": latest_entry.get(\"low\", \"-\"),\n            \"Close\": latest_entry.get(\"close\", \"-\"),\n            \"Volume\": latest_entry.get(\"volume\", \"-\"),\n            \"Prev_Close\": second_last_entry.get(\"close\", \"-\"),\n        }\n\n    # Process fundamental data\n    name = fundamental_data.get(\"General\", {}).get(\"Name\", \"Unknown Company\")\n    description = fundamental_data.get(\"General\", {}).get(\"Description\", \"-\")\n    highlights = fundamental_data.get(\"Highlights\", {})\n    technicals = fundamental_data.get(\"Technicals\", {})\n    shares_stats = fundamental_data.get(\"SharesStats\", {})\n\n    financials = fundamental_data.get(\"Financials\", {})\n    cash_flow = financials.get(\"Cash_Flow\", {})  # dividendsPaid\n    cash_flow_quarterly = cash_flow.get(\"quarterly\", {})\n\n    dividends_paid = [\n        {\"date\": value.get(\"date\"), \"value\": value.get(\"dividendsPaid\", 0) or 0}\n        for value in cash_flow_quarterly.values()\n    ]\n    dividends_paid = sorted(dividends_paid, key=lambda x: x[\"date\"])\n    dividends_paid_json = json.dumps(dividends_paid)\n\n    earnings = fundamental_data.get(\"Earnings\", {})\n    earnings_history = earnings.get(\"History\", {})  # epsActual\n\n    eps_actual = [\n        {\"date\": value.get(\"reportDate\"), \"value\": value.get(\"epsActual\", 0) or 0}\n        for value in earnings_history.values()\n    ]\n    eps_actual = sorted(eps_actual, key=lambda x: x[\"date\"])\n    eps_actual_json = json.dumps(eps_actual)\n\n    table_data = {\n        \"Prev_Close\": \"-\",\n        \"Volume\": \"-\",\n        \"Low\": \"-\",\n        \"Market_Cap\": highlights.get(\"MarketCapitalization\", \"-\"),\n        \"Shares_Outstanding\": shares_stats.get(\"SharesOutstanding\", \"-\"),\n        \"EPS\": highlights.get(\"EarningsShare\", \"-\"),\n        \"Beta\": technicals.get(\"Beta\", \"-\"),\n        \"Open\": \"-\",\n        \"High\": \"-\",\n        \"52_wk_Range\": f\"{technicals.get('52WeekLow', '-')} - {technicals.get('52WeekHigh', '-')}\",\n        \"PE_Ratio\": highlights.get(\"PERatio\", \"-\"),\n        \"Revenue\": highlights.get(\"RevenueTTM\", \"-\"),\n        \"Dividends_Yield\": highlights.get(\"DividendYield\", \"-\"),\n    }\n\n    market_cap = [\n        {\"date\": entry[\"date\"], \"value\": entry[\"value\"]}\n        for entry in market_cap_data.values()\n    ]\n\n    market_cap_json = json.dumps(market_cap, indent=4)\n\n    return render(\n        request,\n        \"historical\/historical_data.html\",\n        {\n            \"market\": market,\n            \"interval\": interval,\n            \"historical_data\": raw_data,  # Raw Python data for the table\n            \"historical_data_json\": historical_data_json,  # JSON for the script\n            \"fundamental_name\": name,\n            \"fundamental_description\": description,\n            \"fundamental_table\": table_data,\n            \"dividends_paid_json\": dividends_paid_json,\n            \"eps_actual_json\": eps_actual_json,\n            \"ohlc_latest\": ohlc_latest,\n            \"market_cap_json\": market_cap_json,\n            \"start_date\": (\n                start_date\n                if interval in [\"m\", \"w\", \"d\"]\n                else start_date_parsed.strftime(\"%Y-%m-%dT%H:%M\")\n            ),\n            \"end_date\": (\n                end_date\n                if interval in [\"m\", \"w\", \"d\"]\n                else end_date_parsed.strftime(\"%Y-%m-%dT%H:%M\")\n            ),\n        },\n    )<\/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>A few points to pay attention to here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The function &#8220;def&#8221; is now &#8220;async def&#8221;.<\/li>\n\n\n\n<li>The endpoint to retrieve the historical data is, &#8220;historical_url&#8221;, the endpoint to retrieve the fundamental data is, &#8220;fundamental_url&#8221;, the endpoint to retrieve the OHLC data is, &#8220;ohlc_url&#8221; and the endpoint to retrieve the market cap data is &#8220;market_cap_url&#8221;.<\/li>\n\n\n\n<li>You may wonder what I&#8217;m doing with &#8220;today_minus_7_days&#8221;. The EOD API by default returns almost all the data which is a lot more than we need. The API only supports a date range for filtering and I only need the last two days. To be on the safe side, I retrieved the last 7 days and will only use the last 2.<\/li>\n\n\n\n<li>The return has now been updated to include all the information we&#8217;ll need to be passed to our template, &#8220;historical_data.html&#8221;.<\/li>\n<\/ul>\n\n\n\n<p>What I like about Django is how structured it is. Once you have your application structure setup, it is quick to modify and expand on.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-updating-the-template-historical-data-html\">Updating the Template &#8211; historical_data.html<\/h2>\n\n\n\n<p>This template will now have three sections. The fundamental data, the AnyChart stock chart, and the Bootstrap data table. The updated like now looks like this&#8230;<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-f626d5e40038e530e459085b2a1e2285\"><code lang=\"python\" class=\"language-python\">&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n\n&lt;head&gt;\n    &lt;title&gt;Historical Data for {{ market }} ({{ interval }})&lt;\/title&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"&gt;\n\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.2\/css\/bootstrap.min.css\"&gt;\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/cdn.datatables.net\/1.10.21\/css\/dataTables.bootstrap4.min.css\"&gt;\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/cdn.datatables.net\/buttons\/1.7.1\/css\/buttons.bootstrap4.min.css\"&gt;\n\n    &lt;style&gt;\n        body {\n            background-color: #343a40;\n            color: #ffffff;\n        }\n\n        .table {\n            background-color: #212529;\n        }\n\n        .table th,\n        .table td {\n            color: #ffffff;\n        }\n\n        .chart-container {\n            margin-bottom: 20px;\n        }\n\n        .dt-buttons .btn {\n            margin-right: 10px;\n        }\n\n        .page-item.active .page-link {\n            z-index: 3;\n            color: #ffffff !important;\n            background-color: #495057 !important;\n            border-color: #495057 !important;\n        }\n\n        .page-link {\n            color: #ffffff !important;\n            background-color: #6c757d !important;\n            border-color: #343a40 !important;\n        }\n\n        .page-link:hover {\n            color: #adb5bd !important;\n            background-color: #5a6268 !important;\n            border-color: #343a40 !important;\n        }\n\n        .dataTables_wrapper .dataTables_paginate .paginate_button {\n            color: #ffffff !important;\n            background-color: #6c757d !important;\n            border: 1px solid #343a40 !important;\n        }\n\n        .dataTables_wrapper .dataTables_paginate .paginate_button:hover {\n            background-color: #5a6268 !important;\n            border: 1px solid #343a40 !important;\n        }\n\n        .dataTables_wrapper .dataTables_paginate .paginate_button.current {\n            color: #ffffff !important;\n            background-color: #495057 !important;\n            border: 1px solid #343a40 !important;\n        }\n\n        .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,\n        .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {\n            background-color: #6c757d !important;\n            color: #ffffff !important;\n        }\n\n        .btn-dark {\n            background-color: #6c757d !important;\n            border-color: #6c757d !important;\n            color: #ffffff !important;\n        }\n\n        .btn-dark:hover {\n            background-color: #5a6268 !important;\n            border-color: #5a6268 !important;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n\n&lt;body&gt;\n    &lt;div class=\"container mt-3\"&gt;    \n        &lt;!-- Fundamental Data --&gt;\n        &lt;div class=\"card mb-4\"&gt;\n            &lt;div class=\"card-header\"&gt;\n                &lt;h4 class=\"text-dark\"&gt;{{ fundamental_name }} Financial Data Overview&lt;\/h4&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"card-body\"&gt;\n                &lt;p class=\"text-dark\"&gt;{{ fundamental_description }}&lt;\/p&gt;\n                &lt;table class=\"table table-bordered\"&gt;\n                    &lt;thead&gt;\n                        &lt;tr&gt;\n                            &lt;th style=\"width: 25%;\"&gt;Metric&lt;\/th&gt;\n                            &lt;th style=\"width: 25%;\"&gt;Value&lt;\/th&gt;\n                            &lt;th style=\"width: 25%;\"&gt;Metric&lt;\/th&gt;\n                            &lt;th style=\"width: 25%;\"&gt;Value&lt;\/th&gt;\n                        &lt;\/tr&gt;\n                    &lt;\/thead&gt;\n                    &lt;tbody&gt;\n                        &lt;tr&gt;\n                            &lt;td&gt;Open&lt;\/td&gt;\n                            &lt;td&gt;{{ ohlc_latest.Open }}&lt;\/td&gt;\n                           \n                            &lt;td&gt;Market Cap&lt;\/td&gt;\n                            &lt;td&gt;{{ fundamental_table.Market_Cap }}&lt;\/td&gt;                            \n                        &lt;\/tr&gt;\n\n                        &lt;tr&gt;\n                            &lt;td&gt;High&lt;\/td&gt;\n                            &lt;td&gt;{{ ohlc_latest.High }}&lt;\/td&gt;\n\n                            &lt;td&gt;Dividends (Yield)&lt;\/td&gt;\n                            &lt;td&gt;{{ fundamental_table.Dividends_Yield }}&lt;\/td&gt;\n                        &lt;\/tr&gt;\n\n                        &lt;tr&gt;\n                            &lt;td&gt;Low&lt;\/td&gt;\n                            &lt;td&gt;{{ ohlc_latest.Low }}&lt;\/td&gt;\n\n                            &lt;td&gt;Revenue&lt;\/td&gt;\n                            &lt;td&gt;{{ fundamental_table.Revenue }}&lt;\/td&gt;\n                        &lt;\/tr&gt;\n\n                        &lt;tr&gt;\n                            &lt;td&gt;52 wk Range&lt;\/td&gt;\n                            &lt;td&gt;{{ fundamental_table.52_wk_Range }}&lt;\/td&gt;\n\n                            &lt;td&gt;P\/E Ratio&lt;\/td&gt;\n                            &lt;td&gt;{{ fundamental_table.PE_Ratio }}&lt;\/td&gt;\n                        &lt;\/tr&gt;\n\n                        &lt;tr&gt;\n                            &lt;td&gt;Prev. Close&lt;\/td&gt;\n                            &lt;td&gt;{{ ohlc_latest.Prev_Close }}&lt;\/td&gt;                           \n\n                            &lt;td&gt;Shares Outstanding&lt;\/td&gt;\n                            &lt;td&gt;{{ fundamental_table.Shares_Outstanding }}&lt;\/td&gt;\n                        &lt;\/tr&gt;\n\n                        &lt;tr&gt;\n                            &lt;td&gt;Close&lt;\/td&gt;\n                            &lt;td&gt;{{ ohlc_latest.Close }}&lt;\/td&gt;\n\n                            &lt;td&gt;EPS&lt;\/td&gt;\n                            &lt;td&gt;{{ fundamental_table.EPS }}&lt;\/td&gt;\n                        &lt;\/tr&gt;\n\n                        &lt;tr&gt;\n                            &lt;td&gt;Volume&lt;\/td&gt;\n                            &lt;td&gt;{{ ohlc_latest.Volume }}&lt;\/td&gt;\n                            \n                            &lt;td&gt;Beta&lt;\/td&gt;\n                            &lt;td&gt;{{ fundamental_table.Beta }}&lt;\/td&gt;\n                        &lt;\/tr&gt;\n                    &lt;\/tbody&gt;\n                &lt;\/table&gt;                \n            &lt;\/div&gt;\n        &lt;\/div&gt;\n    \n        &lt;!-- Historical Data - AnyChart and Bootstrap --&gt;\n        &lt;div id=\"historical-data\"&gt;\n            &lt;div class=\"container mt-5\"&gt;\n                &lt;h2 class=\"mb-4\"&gt;Historical Data for {{ market }} ({{ interval }})&lt;\/h2&gt;\n\n                &lt;div class=\"row\"&gt;\n                    &lt;div class=\"col-12 chart-container\"&gt;\n                        &lt;div id=\"candlestickChart\" style=\"height: 500px; width: 100%;\"&gt;&lt;\/div&gt;\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n\n                &lt;div class=\"row\"&gt;\n                    &lt;div class=\"col-12 chart-container\"&gt;\n                        &lt;div id=\"dividendsChart\" style=\"height: 500px; width: 100%;\"&gt;&lt;\/div&gt;\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n\n                &lt;div class=\"row\"&gt;\n                    &lt;div class=\"col-12 chart-container\"&gt;\n                        &lt;div id=\"epsChart\" style=\"height: 500px; width: 100%;\"&gt;&lt;\/div&gt;\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n\n                &lt;div class=\"row\"&gt;\n                    &lt;div class=\"col-12 chart-container\"&gt;\n                        &lt;div id=\"marketCapChart\" style=\"height: 500px; width: 100%;\"&gt;&lt;\/div&gt;\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n\n                &lt;div class=\"row\"&gt;\n                    &lt;div class=\"col-12\"&gt;\n                        &lt;table id=\"historicalTable\" class=\"table table-dark table-striped table-bordered\"&gt;\n                            &lt;thead class=\"thead-dark\"&gt;\n                                &lt;tr&gt;\n                                    &lt;th&gt;Timestamp&lt;\/th&gt;\n                                    &lt;th&gt;Open&lt;\/th&gt;\n                                    &lt;th&gt;High&lt;\/th&gt;\n                                    &lt;th&gt;Low&lt;\/th&gt;\n                                    &lt;th&gt;Close&lt;\/th&gt;\n                                    &lt;th&gt;Volume&lt;\/th&gt;\n                                &lt;\/tr&gt;\n                            &lt;\/thead&gt;\n                            &lt;tbody&gt;\n                                {% for entry in historical_data %}\n                                &lt;tr&gt;\n                                    &lt;td&gt;{{ entry.timestamp }}&lt;\/td&gt;\n                                    &lt;td&gt;{{ entry.open }}&lt;\/td&gt;\n                                    &lt;td&gt;{{ entry.high }}&lt;\/td&gt;\n                                    &lt;td&gt;{{ entry.low }}&lt;\/td&gt;\n                                    &lt;td&gt;{{ entry.close }}&lt;\/td&gt;\n                                    &lt;td&gt;{{ entry.volume }}&lt;\/td&gt;\n                                &lt;\/tr&gt;\n                                {% endfor %}\n                            &lt;\/tbody&gt;\n                        &lt;\/table&gt;\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n\n                &lt;a href=\"javascript:history.back()\" class=\"btn btn-dark mt-4\"&gt;Back&lt;\/a&gt;\n            &lt;\/div&gt;\n\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n\n    &lt;script id=\"historicalData\" type=\"application\/json\"&gt;\n        {{ historical_data_json|safe }}\n    &lt;\/script&gt;\n\n    &lt;script id=\"dividendsPaid\" type=\"application\/json\"&gt;\n        {{ dividends_paid_json|safe }}\n    &lt;\/script&gt;\n\n    &lt;script id=\"epsActual\" type=\"application\/json\"&gt;\n        {{ eps_actual_json|safe }}\n    &lt;\/script&gt;\n\n    &lt;script id=\"marketCap\" type=\"application\/json\"&gt;\n        {{ market_cap_json|safe }}\n    &lt;\/script&gt;\n\n    <a href=\"https:\/\/code.jquery.com\/jquery-3.5.1.min.js\">https:\/\/code.jquery.com\/jquery-3.5.1.min.js<\/a>\n    <a href=\"https:\/\/cdn.datatables.net\/1.10.21\/js\/jquery.dataTables.min.js\">https:\/\/cdn.datatables.net\/1.10.21\/js\/jquery.dataTables.min.js<\/a>\n    <a href=\"https:\/\/cdn.datatables.net\/1.10.21\/js\/dataTables.bootstrap4.min.js\">https:\/\/cdn.datatables.net\/1.10.21\/js\/dataTables.bootstrap4.min.js<\/a>\n    <a href=\"https:\/\/cdn.datatables.net\/buttons\/1.7.1\/js\/dataTables.buttons.min.js\">https:\/\/cdn.datatables.net\/buttons\/1.7.1\/js\/dataTables.buttons.min.js<\/a>\n    <a href=\"https:\/\/cdn.datatables.net\/buttons\/1.7.1\/js\/buttons.bootstrap4.min.js\">https:\/\/cdn.datatables.net\/buttons\/1.7.1\/js\/buttons.bootstrap4.min.js<\/a>\n    <a href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jszip\/3.1.3\/jszip.min.js\">https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jszip\/3.1.3\/jszip.min.js<\/a>\n    <a href=\"https:\/\/cdn.datatables.net\/buttons\/1.7.1\/js\/buttons.html5.min.js\">https:\/\/cdn.datatables.net\/buttons\/1.7.1\/js\/buttons.html5.min.js<\/a>\n    <a href=\"https:\/\/cdn.datatables.net\/buttons\/1.7.1\/js\/buttons.print.min.js\">https:\/\/cdn.datatables.net\/buttons\/1.7.1\/js\/buttons.print.min.js<\/a>\n    <a href=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-bundle.min.js\">https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-bundle.min.js<\/a>\n\n    &lt;script&gt;\n        $(document).ready(function () {\n            $('#historicalTable').DataTable({\n                paging: true,\n                searching: true,\n                ordering: true,\n                info: true,\n                lengthMenu: [10, 25, 50, 100],\n                order: [[4, \"desc\"]],\n                dom: 'Bfrtip',\n                buttons: [\n                    {\n                        extend: 'excel',\n                        text: 'Export to Excel'\n                    },\n                    {\n                        extend: 'print',\n                        text: 'Print'\n                    }\n                ]\n            });\n        });\n\n        document.addEventListener(\"DOMContentLoaded\", function () {\n            const dividendsPaidRaw = document.getElementById(\"dividendsPaid\").textContent;\n            const epsActualRaw = document.getElementById(\"epsActual\").textContent;\n            const marketCapRaw = document.getElementById(\"marketCap\").textContent;\n\n            const dividendsPaid = JSON.parse(dividendsPaidRaw);\n            const epsActual = JSON.parse(epsActualRaw);\n            const marketCap = JSON.parse(marketCapRaw);\n\n            anychart.onDocumentReady(function () {\n                const rawData = document.getElementById(\"historicalData\").textContent;\n                const historicalData = JSON.parse(rawData);\n                const candlestickData = historicalData.map(entry =&gt; [\n                    entry.timestamp,\n                    entry.open,\n                    entry.high,\n                    entry.low,\n                    entry.close\n                ]);\n\n                const table = anychart.data.table();\n                table.addData(candlestickData);\n\n                const candlestickMapping = table.mapAs({\n                    open: 1,\n                    high: 2,\n                    low: 3,\n                    close: 4\n                });\n\n                const candlestickChart = anychart.stock();\n                const candlestickPlot = candlestickChart.plot(0);\n                candlestickPlot.candlestick(candlestickMapping).name(\"Price\");\n                candlestickChart.container(\"candlestickChart\");\n                candlestickChart.draw();\n\n                \/\/ Dividends Paid Chart\n                const dividendsChart = anychart.line();\n                const dividendsData = dividendsPaid.map(entry =&gt; [entry.date, parseFloat(entry.value)]);\n\n                dividendsChart.data(dividendsData);\n                dividendsChart.title(\"Dividends Paid\");\n                dividendsChart.xAxis().title(\"Date\");\n                dividendsChart.yAxis().title(\"Dividends Paid\");\n                dividendsChart.container(\"dividendsChart\");\n                dividendsChart.draw();\n\n                \/\/ EPS Actual Chart\n                const epsChart = anychart.line();\n                const epsData = epsActual.map(entry =&gt; [entry.date, parseFloat(entry.value)]);\n\n                epsChart.data(epsData);\n                epsChart.title(\"Earnings Per Share (EPS)\");\n                epsChart.xAxis().title(\"Date\");\n                epsChart.yAxis().title(\"EPS\");\n                epsChart.container(\"epsChart\");\n                epsChart.draw();\n\n                \/\/ Market Cap Chart\n                const marketCapChart = anychart.line();\n                const marketCapData = marketCap.map(entry =&gt; [entry.date, parseFloat(entry.value)]);\n\n                marketCapChart.data(marketCapData);\n                marketCapChart.title(\"Market Capitalistion\");\n                marketCapChart.xAxis().title(\"Date\");\n                marketCapChart.yAxis().title(\"Market Cap\");\n                marketCapChart.container(\"marketCapChart\");\n                marketCapChart.draw();\n            });\n        });\n    &lt;\/script&gt;\n&lt;\/body&gt;\n\n&lt;\/html&gt;<\/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<h2 class=\"wp-block-heading\" id=\"h-summary\">Summary<\/h2>\n\n\n\n<p>This is the conclusion of the Python Django tutorial series. I hope you found it informative and useful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Please note, API data availability depends on your subscription plan. Some data isn&#8217;t included in the free plan. Visit our pricing page to find the plan that fits your needs. This article builds upon the previous three in the series, \u201cBuild a Financial Trading Dashboard with Python Django\u201d, \u201cEnhancing the Financial Trading Dashboard with Python [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":6114,"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":[64,1],"tags":[],"coding-language":[30],"ready-to-go-solution":[56],"qualification":[31],"financial-apis-category":[36],"financial-apis-manuals":[37],"class_list":["post-6113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-building-stocks-apps-examples","category-fundamental-analysis-examples","coding-language-python","ready-to-go-solution-eodhd-python-financial-library","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>Fundamental Data for the Financial Trading Dashboard with Python Django | 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\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fundamental Data for the Financial Trading Dashboard with Python Django\" \/>\n<meta property=\"og:description\" content=\"Please note, API data availability depends on your subscription plan. Some data isn&#8217;t included in the free plan. Visit our pricing page to find the plan that fits your needs. This article builds upon the previous three in the series, \u201cBuild a Financial Trading Dashboard with Python Django\u201d, \u201cEnhancing the Financial Trading Dashboard with Python [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django\" \/>\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=\"2024-12-07T16:41:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-05T14:05:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1830\" \/>\n\t<meta property=\"og:image:height\" content=\"2316\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django\"},\"author\":{\"name\":\"Michael Whittle\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\"},\"headline\":\"Fundamental Data for the Financial Trading Dashboard with Python Django\",\"datePublished\":\"2024-12-07T16:41:25+00:00\",\"dateModified\":\"2025-02-05T14:05:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django\"},\"wordCount\":550,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png\",\"articleSection\":[\"Building Stocks Apps Examples\",\"Fundamental Analysis Examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django\",\"name\":\"Fundamental Data for the Financial Trading Dashboard with Python Django | EODHD APIs Academy\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png\",\"datePublished\":\"2024-12-07T16:41:25+00:00\",\"dateModified\":\"2025-02-05T14:05:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#primaryimage\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png\",\"width\":1830,\"height\":2316},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-academy\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fundamental Data for the Financial Trading Dashboard with Python Django\"}]},{\"@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":"Fundamental Data for the Financial Trading Dashboard with Python Django | 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\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django","og_locale":"en_US","og_type":"article","og_title":"Fundamental Data for the Financial Trading Dashboard with Python Django","og_description":"Please note, API data availability depends on your subscription plan. Some data isn&#8217;t included in the free plan. Visit our pricing page to find the plan that fits your needs. This article builds upon the previous three in the series, \u201cBuild a Financial Trading Dashboard with Python Django\u201d, \u201cEnhancing the Financial Trading Dashboard with Python [&hellip;]","og_url":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django","og_site_name":"Financial Academy","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2024-12-07T16:41:25+00:00","article_modified_time":"2025-02-05T14:05:29+00:00","og_image":[{"width":1830,"height":2316,"url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png","type":"image\/png"}],"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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django"},"author":{"name":"Michael Whittle","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad"},"headline":"Fundamental Data for the Financial Trading Dashboard with Python Django","datePublished":"2024-12-07T16:41:25+00:00","dateModified":"2025-02-05T14:05:29+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django"},"wordCount":550,"publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png","articleSection":["Building Stocks Apps Examples","Fundamental Analysis Examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django","url":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django","name":"Fundamental Data for the Financial Trading Dashboard with Python Django | EODHD APIs Academy","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png","datePublished":"2024-12-07T16:41:25+00:00","dateModified":"2025-02-05T14:05:29+00:00","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#primaryimage","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png","width":1830,"height":2316},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/fundamental-data-for-the-financial-trading-dashboard-with-python-django#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-academy\/"},{"@type":"ListItem","position":2,"name":"Fundamental Data for the Financial Trading Dashboard with Python Django"}]},{"@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\/2024\/11\/Screenshot-2024-11-27-at-09.55.10.png","jetpack_shortlink":"https:\/\/wp.me\/pdOdVT-1AB","jetpack_sharing_enabled":true,"acf":[],"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/6113","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=6113"}],"version-history":[{"count":7,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/6113\/revisions"}],"predecessor-version":[{"id":6306,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/6113\/revisions\/6306"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media\/6114"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media?parent=6113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/categories?post=6113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/tags?post=6113"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/coding-language?post=6113"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/ready-to-go-solution?post=6113"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/qualification?post=6113"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-category?post=6113"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-manuals?post=6113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}