{"id":2794,"date":"2023-11-02T16:44:07","date_gmt":"2023-11-02T16:44:07","guid":{"rendered":"https:\/\/eodhd.com\/financial-academy\/?p=2794"},"modified":"2025-02-05T14:30:10","modified_gmt":"2025-02-05T14:30:10","slug":"how-to-use-the-trading-hours-and-holidays-api-with-python","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python","title":{"rendered":"How to use the Trading Hours and Holidays API with Python"},"content":{"rendered":"\n<p>Our <a href=\"https:\/\/eodhd.com\/financial-apis\/exchanges-api-trading-hours-and-stock-market-holidays\/\" target=\"_blank\" rel=\"noreferrer noopener\">Exchanges Details API for Exchange Trading Hours and Holidays<\/a> provides exchange details, <a href=\"https:\/\/eodhd.com\/financial-apis\/exchanges-api-trading-hours-and-stock-market-holidays\/#Get_Exchange_Details_and_Trading_Hours\" target=\"_blank\" rel=\"noreferrer noopener\">trading hours<\/a> and <a href=\"https:\/\/eodhd.com\/financial-apis\/exchanges-api-trading-hours-and-stock-market-holidays\/#Stock_Market_Holidays_Data_API\" target=\"_blank\" rel=\"noreferrer noopener\">stock market holidays data<\/a>. Exchange details shows us data where stock buyers connect with stock sellers and <a href=\"https:\/\/eodhd.com\/financial-apis\/exchanges-api-trading-hours-and-stock-market-holidays\/#Stock_Market_Holidays_Data_API\" target=\"_blank\" rel=\"noreferrer noopener\">Stock Market Holidays Data<\/a> shows the schedule of the Holidays on Stocks.<\/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<p><strong>Please note<\/strong>: <strong>before continuing to work with our APIs, make sure that you <\/strong><a href=\"https:\/\/eodhd.com\/financial-academy\/financial-faq\/how-to-start-using-eodhd-pythons-financial-library-beginners-guide\/\"><strong><u><strong>import and install all required libraries<\/strong><\/u><\/strong><\/a>. A m<strong>ore detailed information about the functions of Exchange Trading Hours and Holidays API you can find on our <\/strong><a href=\"https:\/\/eodhd.com\/financial-apis\/exchanges-api-trading-hours-and-stock-market-holidays\/\"><strong><u><strong>documentation web-page<\/strong><\/u><\/strong><\/a><strong>.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-accessing-the-eodhd-api\">Accessing the EODHD API<\/h2>\n\n\n\n<p>To access the EODHD API, we need to create an instance of the \u201cAPIClient\u201d class and pass to it our API key. In this example, we will use the demo API key provided by EODHD, but in your real application, you should use your registered API key.<\/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\"><code lang=\"python\" class=\"language-python\">api = APIClient(\"demo\")<\/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>Please, note that you can also specify the API key in a configuration file or as an environment variable, as described in the library documentation<a href=\"https:\/\/github.com\/EodHistoricalData\/EODHD-APIs-Python-Financial-Library\/\">&nbsp;<u>here<\/u><\/a>.&nbsp;Also, do not forget to visit our <a href=\"https:\/\/eodhd.com\/financial-apis\/exchanges-api-list-of-tickers-and-trading-hours\/\">documentation web-page<\/a> about the Exchanges API.<\/p>\n\n\n\n<p class=\"bordered_paragraph\">1. Use the \u201c<strong>demo<\/strong>\u201d API key to test our data from a limited set of the tickers without registering:<br><a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/AAPL.US\" target=\"_blank\" rel=\"noreferrer noopener\">AAPL.US<\/a>&nbsp;|&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/TSLA.US\" target=\"_blank\" rel=\"noreferrer noopener\">TSLA.US&nbsp;<\/a>|&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/VTI.US\" target=\"_blank\" rel=\"noreferrer noopener\">VTI.US<\/a>&nbsp;|&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/AMZN.US\" target=\"_blank\" rel=\"noreferrer noopener\">AMZN.US<\/a>&nbsp;|&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/BTC-USD.CC\" target=\"_blank\" rel=\"noreferrer noopener\">BTC-USD<\/a>&nbsp;|&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/EURUSD.FOREX\" target=\"_blank\" rel=\"noreferrer noopener\">EUR-USD<\/a><br><a href=\"https:\/\/eodhistoricaldata.com\/financial-apis\/new-real-time-data-api-websockets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Real-Time Data<\/a>&nbsp;and All of the APIs (except Bulk) are included without limitations on API calls.<br>2. Register to get your free API key (limitated by 20 API calls per day) with access to:<br><a href=\"https:\/\/eodhistoricaldata.com\/financial-apis\/api-for-historical-data-and-volumes\/\" target=\"_blank\" rel=\"noreferrer noopener\">End-Of-Day Historical Data<\/a>&nbsp;with only past year for any ticker and&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-apis\/exchanges-api-list-of-tickers-and-trading-hours\/#Get_List_of_Tickers_Exchange_Symbols\" target=\"_blank\" rel=\"noreferrer noopener\">List of tickers per Exchange<\/a><br>3. To unlock your API key we recommend to <a href=\"https:\/\/eodhd.com\/pricing\">choose the subscription<\/a> which covers your needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-retrieving-exchange-trading-hours-and-holidays-data\">Retrieving Exchange Trading Hours and Holidays Data <\/h2>\n\n\n\n<p>After we are done with the&nbsp;Exchanges&nbsp;API client, we can start requesting exchange details, trading hours and information about stock market holidays&nbsp;for a specific exchange code.<\/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\"><code lang=\"python\" class=\"language-python\">resp = api.get_details_trading_hours_stock_market_holidays (code = \"US\")<\/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 API response will be a single JSON structure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-converting-json-response-to-dataframe\">Converting JSON Response to DataFrame<\/h3>\n\n\n\n<p>To convert JSON to DataFrame it is possible to use:<\/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\"><code lang=\"python\" class=\"language-python\">exchange = pd.DataFrame(resp)<\/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>All data in DataFrame will contain information such as: &#8220;name&#8221;, &#8220;code&#8221;, &#8220;operating&#8221;, &#8220;MIC&#8221;, &#8220;country&#8221;, &#8220;currency&#8221; and &#8220;timezone&#8221; for the code which was used when we called the API in particular (&#8220;<a href=\"https:\/\/eodhd.com\/exchange\/US\">US<\/a>&#8220;).<\/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\"><code lang=\"python\" class=\"language-python\">print(exchange)<\/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<h3 class=\"wp-block-heading\" id=\"h-extended-functions-of-exchange-trading-hours-and-holidays-nbsp-api\">Extended functions of Exchange Trading Hours and Holidays&nbsp;API<\/h3>\n\n\n\n<p>For a more accurate research, it is possible to use additional parameters of the Exchange Trading Hours and Holidays&nbsp;API, particularly in the stock market holidays section. It is possible to use the parameters <strong>from <\/strong>and <strong>to<\/strong>, which will show you holidays for some specific period.<\/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\"><code lang=\"python\" class=\"language-python\">exchange_extended = api.get_details_trading_hours_stock_market_holidays (code = \"US\", from_date = \"2023-10-15\", to_date = \"2023-11-15\")<\/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 API response is a JSON array containing data for all the requested tickers. You can convert the resulting JSON array to a DataFrame for further analysis:<\/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\"><code lang=\"python\" class=\"language-python\">e_m = pd.DataFrame (exchange_extended)\nprint(e_m)<\/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-conclusion\">Conclusion<\/h2>\n\n\n\n<p>In essence, the Exchange Trading Hours and Holidays API is a powerful tool that enables you to navigate the complex world of stock exchanges with precision and efficiency. It offers insight into trading hours, holidays, and exchange details, equipping you with the knowledge needed for well-informed investment decisions. Whether you&#8217;re a seasoned investor or just beginning your journey in finance, this API is your gateway to understanding the rhythm and nuances of global financial markets. Happy exploring!<\/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","protected":false},"excerpt":{"rendered":"<p>Our Exchanges Details API for Exchange Trading Hours and Holidays provides exchange details, trading hours and stock market holidays data. Exchange details shows us data where stock buyers connect with stock sellers and Stock Market Holidays Data shows the schedule of the Holidays on Stocks. Please note: before continuing to work with our APIs, make [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":0,"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":[56],"qualification":[33],"financial-apis-category":[36],"financial-apis-manuals":[47],"class_list":["post-2794","post","type-post","status-publish","format-standard","hentry","category-fundamental-analysis-examples","coding-language-python","ready-to-go-solution-eodhd-python-financial-library","qualification-newbie","financial-apis-category-stock-market-prices","financial-apis-manuals-exchanges-data"],"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>How to use the Trading Hours and Holidays API with Python | EODHD APIs Academy<\/title>\n<meta name=\"description\" content=\"Discover Exchange Details, Trading Hours, and Stock Market Holidays Data. Learn how to access and analyze this wealth of information to make informed investment decisions.\" \/>\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\/how-to-use-the-trading-hours-and-holidays-api-with-python\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use the Trading Hours and Holidays API with Python\" \/>\n<meta property=\"og:description\" content=\"Discover Exchange Details, Trading Hours, and Stock Market Holidays Data. Learn how to access and analyze this wealth of information to make informed investment decisions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-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=\"2023-11-02T16:44:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-05T14:30:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/09\/EODHD-Python-Financial-Libriary.png\" \/>\n\t<meta property=\"og:image:width\" content=\"801\" \/>\n\t<meta property=\"og:image:height\" content=\"261\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Gleb from EODHD\" \/>\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=\"Gleb from EODHD\" \/>\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\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python\"},\"author\":{\"name\":\"Gleb from EODHD\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/b4d6b3aab4e8b416243add4537592b44\"},\"headline\":\"How to use the Trading Hours and Holidays API with Python\",\"datePublished\":\"2023-11-02T16:44:07+00:00\",\"dateModified\":\"2025-02-05T14:30:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python\"},\"wordCount\":559,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"articleSection\":[\"Fundamental Analysis Examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python\",\"name\":\"How to use the Trading Hours and Holidays API with Python | EODHD APIs Academy\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\"},\"datePublished\":\"2023-11-02T16:44:07+00:00\",\"dateModified\":\"2025-02-05T14:30:10+00:00\",\"description\":\"Discover Exchange Details, Trading Hours, and Stock Market Holidays Data. Learn how to access and analyze this wealth of information to make informed investment decisions.\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-academy\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use the Trading Hours and Holidays API with 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\/b4d6b3aab4e8b416243add4537592b44\",\"name\":\"Gleb from EODHD\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c1e7c24fd2fa413c9bbd20948dc2d4beb0104893a2e2363b2b10c21e43ac78a3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c1e7c24fd2fa413c9bbd20948dc2d4beb0104893a2e2363b2b10c21e43ac78a3?s=96&d=mm&r=g\",\"caption\":\"Gleb from EODHD\"},\"url\":\"https:\/\/eodhd.com\/financial-academy\/author\/glebeodhd\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to use the Trading Hours and Holidays API with Python | EODHD APIs Academy","description":"Discover Exchange Details, Trading Hours, and Stock Market Holidays Data. Learn how to access and analyze this wealth of information to make informed investment decisions.","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\/how-to-use-the-trading-hours-and-holidays-api-with-python","og_locale":"en_US","og_type":"article","og_title":"How to use the Trading Hours and Holidays API with Python","og_description":"Discover Exchange Details, Trading Hours, and Stock Market Holidays Data. Learn how to access and analyze this wealth of information to make informed investment decisions.","og_url":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python","og_site_name":"Financial Academy","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2023-11-02T16:44:07+00:00","article_modified_time":"2025-02-05T14:30:10+00:00","og_image":[{"width":801,"height":261,"url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/09\/EODHD-Python-Financial-Libriary.png","type":"image\/png"}],"author":"Gleb from EODHD","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"Gleb from EODHD","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python"},"author":{"name":"Gleb from EODHD","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/b4d6b3aab4e8b416243add4537592b44"},"headline":"How to use the Trading Hours and Holidays API with Python","datePublished":"2023-11-02T16:44:07+00:00","dateModified":"2025-02-05T14:30:10+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python"},"wordCount":559,"publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"articleSection":["Fundamental Analysis Examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python","url":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python","name":"How to use the Trading Hours and Holidays API with Python | EODHD APIs Academy","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/#website"},"datePublished":"2023-11-02T16:44:07+00:00","dateModified":"2025-02-05T14:30:10+00:00","description":"Discover Exchange Details, Trading Hours, and Stock Market Holidays Data. Learn how to access and analyze this wealth of information to make informed investment decisions.","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-use-the-trading-hours-and-holidays-api-with-python#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-academy\/"},{"@type":"ListItem","position":2,"name":"How to use the Trading Hours and Holidays API with 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\/b4d6b3aab4e8b416243add4537592b44","name":"Gleb from EODHD","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c1e7c24fd2fa413c9bbd20948dc2d4beb0104893a2e2363b2b10c21e43ac78a3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c1e7c24fd2fa413c9bbd20948dc2d4beb0104893a2e2363b2b10c21e43ac78a3?s=96&d=mm&r=g","caption":"Gleb from EODHD"},"url":"https:\/\/eodhd.com\/financial-academy\/author\/glebeodhd"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pdOdVT-J4","jetpack_sharing_enabled":true,"acf":[],"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/2794","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\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/comments?post=2794"}],"version-history":[{"count":39,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/2794\/revisions"}],"predecessor-version":[{"id":6320,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/2794\/revisions\/6320"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media?parent=2794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/categories?post=2794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/tags?post=2794"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/coding-language?post=2794"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/ready-to-go-solution?post=2794"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/qualification?post=2794"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-category?post=2794"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-manuals?post=2794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}