{"id":643,"date":"2022-09-28T05:47:53","date_gmt":"2022-09-28T05:47:53","guid":{"rendered":"https:\/\/eodhd.com\/financial-academy\/?p=643"},"modified":"2025-02-05T12:30:29","modified_gmt":"2025-02-05T12:30:29","slug":"create-trading-candlesticks-in-python","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python","title":{"rendered":"Create Trading Candlesticks in Python"},"content":{"rendered":"\n<p>How to create custom trading candlesticks in Python and why?<\/p>\n\n\n\n<p><strong>Important terminology and trading basics<\/strong><br>Before I continue, you will need to have a grasp of some important terminology and trading basics.<\/p>\n\n\n\n<p class=\"bordered_paragraph\">If you want to learn how to install the <a href=\"https:\/\/github.com\/EodHistoricalData\/EODHD-APIs-Python-Financial-Library\">EODHD APIs Python Financial Official Library<\/a> and activate your API key, I recommend to start with exploring of our <a href=\"https:\/\/eodhistoricaldata.com\/financial-apis\/python-financial-libraries-and-code-samples\/#EODHD_APIs_Python_Financial_Library_by_Michael_Whittle\">Documentation for it<\/a>.<\/p>\n\n\n\n<p>Let\u2019s start with a \u201c<strong>ticker<\/strong>\u201d. What is it?<\/p>\n\n\n\n<p>A ticker represents any price change in a market. It is a constant stream of price changes. If you want to retrieve this live data, you will use a websocket. The&nbsp;<a href=\"https:\/\/github.com\/EodHistoricalData\/EODHD-APIs-Python-Financial-Library\">Python library<\/a>&nbsp;I developed for&nbsp;EODHD APIs&nbsp;provides this functionality for you, and you can find a working example here\u2026<\/p>\n\n\n\n<p class=\"bordered_paragraph\"><strong>eodhd\/example_websockets.py at main \u00b7 whittlem\/eodhd<\/strong><br><img decoding=\"async\" class=\"wp-image-667\" style=\"width: 400px;\" src=\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/09\/Official-EODHD-APIs-Python-Library.png\" alt=\"Official EODHD APIs Python Library\"><br><a href=\"https:\/\/github.com\/EodHistoricalData\/EODHD-APIs-Python-Financial-Library\/blob\/main\/example_websockets.py\">https:\/\/github.com\/EodHistoricalData\/EODHD-APIs-Python-Financial-Library\/blob\/main\/example_websockets.py<\/a><\/p>\n\n\n\n<p>The ticker in isolation does not help us determine when to buy or sell in a market. In order to do this we need to look at the historical data for a market. Now you can image trying to analyse hundreds of thousands or even millions of price changes without any time reference won\u2019t help you. This is where granularity\/resolution\/interval comes into play.<\/p>\n\n\n\n<p id=\"8e80\">What is \u201c<strong>granularity\/resolution\/interval<\/strong>\u201d in a market?<\/p>\n\n\n\n<p id=\"aeb0\">These words get used interchangeably depending on the exchange, but really they are the same thing. An \u201c<strong>interval<\/strong>\u201d, \u201c<strong>granularity<\/strong>\u201d or \u201c<strong>resolution<\/strong>\u201d is a sort of grouping of price information. An \u201c<strong>interval<\/strong>\u201d of 1 hour means that all price data for each hour will be consolidated. Each interval of data (in this case an hour) is represented as a \u201c<strong>candlestick<\/strong>\u201d.<\/p>\n\n\n\n<p id=\"a711\">What is a \u201c<strong>candlestick<\/strong>\u201d in trading?<\/p>\n\n\n\n<p id=\"6039\">A candlestick represents one interval, in our case, an hour. It is made up of the&nbsp;<strong>Open<\/strong>,&nbsp;<strong>High<\/strong>,&nbsp;<strong>Low<\/strong>, and&nbsp;<strong>Close<\/strong>. The&nbsp;<strong>Open<\/strong>&nbsp;is the first price of the hour, the&nbsp;<strong>High<\/strong>&nbsp;is the highest price of the hour, the&nbsp;<strong>Low<\/strong>&nbsp;is the lowest price of the hour, and the&nbsp;<strong>Close<\/strong>&nbsp;is the last price of the hour. In algorithmic trading this is often known as \u201c<strong>OHLC<\/strong>\u201d. In fact if you search for \u201c<strong>OHLC<\/strong>\u201d in your search engine you will find loads of information about it. You may also see \u201c<strong>OHLCV<\/strong>\u201d. The V is for&nbsp;<strong>Volume,<\/strong>&nbsp;and the sum of the volume of trades done within the hour.<\/p>\n\n\n\n<p id=\"b28c\">On trading graphs you will see a series of candlesticks which look like this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/10\/series-of-candlesticks.png\" alt=\"\" class=\"wp-image-647\" style=\"width:841px;height:522px\"\/><\/figure>\n\n\n\n<p>What determines if a candlestick is green or red depends on if the candlestick closes closes higher or lower than the opening price.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"35c6\">Why would you want to create your own trading candlesticks in Python?<\/h2>\n\n\n\n<p id=\"363a\">Not all exchanges and data providers support all intervals. If you compare&nbsp;EODHD APIs, TradingView, Coinbase, Binance, IG, etc. you will see there is a vast range of options.<\/p>\n\n\n\n<p id=\"8a43\">You may also want to construct your own trading candlesticks in Python from a websocket price ticker feed. If you have a constant stream of ticker information coming in, what you would do is capture the first price of the interval (that would be your Open, High, and Low). When subsequent prices come in you will check if the price is higher or lower than the current High or Low. If there is a difference, then set the appropriate value. When you reach the end of the interval you will set the closing price of the interval in Close. If you are capturing the volume data, you will just sum up the total volume and assign it to Volume. At the end of the interval you should have a candlestick with the opening price, highest price of the interval, lowest price of the interval, and the closing price.<\/p>\n\n\n\n<p>If you are interested in how I did this, you can check the code in my&nbsp;<a href=\"https:\/\/medium.com\/@whittle\/list\/python-crypto-bot-pycyptobot-201a1aa83271\" target=\"_blank\" rel=\"noreferrer noopener\">PyCryptoBot<\/a>&nbsp;project.<\/p>\n\n\n\n<p>Look at the WebSocketClient class.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6af7\">Creating our first custom trading candlesticks in Python<\/h2>\n\n\n\n<p id=\"4992\">There are a few ways this can be done, and I\u2019ll show you two of them. Most exchanges and data providers only provide a maximum of 1 hour or 6 hour intraday intervals. What if we wanted \u201c<strong>weekly<\/strong>\u201d trading candlesticks in Python? This is a really powerful interval to plot a long term trend, but not many provide it.<\/p>\n\n\n\n<p id=\"f7ff\">I\u2019m going to use a Jupyter notebook in&nbsp;<a href=\"https:\/\/colab.research.google.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Google Colab<\/a>. It\u2019s free and easy to use if you want to follow along. I\u2019m also going to use the&nbsp;EODHD APIs&nbsp;end-of-day demo key to demonstrate this.<\/p>\n\n\n\n<p id=\"b89d\">The first step is we need to import our libraries.<\/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\">import json\nimport requests\nimport pandas as pd\nfrom datetime import datetime, timedelta<\/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>We then want to retrieve the daily data for Apple\u2019s stock (AAPL) and store it in a Pandas dataframe.<\/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 = requests.get(\"https:\/\/eodhistoricaldata.com\/api\/eod\/AAPL?api_token=demo&amp;fmt=json\")\njson_data = json.loads(resp.content)\ndf = pd.DataFrame(json_data)\ndf<\/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>If all has gone to plan so far it should look like this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/10\/daily-data-for-Apples-stock-AAPL.png\" alt=\"\" class=\"wp-image-652\"\/><\/figure>\n\n\n\n<p id=\"d891\">10537 days of Apple data!<\/p>\n\n\n\n<p id=\"d0d9\">\u201cclose\u201d and \u201cadjusted_close\u201d are very similar, but I\u2019m not going to get into the difference now, we\u2019ll use \u201cclose\u201d for this tutorial. Actually to avoid confusion I will just remove it.<\/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\">df.drop(columns=[\"adjusted_close\"], inplace=True)\ndf<\/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<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/10\/Apple-data-adjusted-close.png\" alt=\"\" class=\"wp-image-653\"\/><\/figure>\n\n\n\n<p id=\"2a12\">As I explained above, we can see the day (\u201cdate\u201d), opening price for the day, high of the day, low of the day, close of the day, and the volume for the day. What we want to do now is create weekly candlesticks from this.<\/p>\n\n\n\n<p id=\"4176\">There is one \u201cgotcha\u201d I want to point out first\u2026<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/10\/weekly-candlesticks.png\" alt=\"\" class=\"wp-image-654\"\/><\/figure>\n\n\n\n<p id=\"3c44\">Pandas thinks that the \u201c<strong>date<\/strong>\u201d column is of type \u201c<strong>object<\/strong>\u201d. That will need to be a datetime type for this to work. The way we update this is as follows.<\/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\">df[\"date\"] = pd.to_datetime(df[\"date\"])\ndf.info()<\/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<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/10\/weekly-candlesticks-date-column.png\" alt=\"\" class=\"wp-image-655\"\/><\/figure>\n\n\n\n<p id=\"b6a6\">I\u2019m going to provide the complete code to do this, then explain it\u2026<\/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\">df_weekly = df.copy()\ndf[\"day_of_week\"] = df[\"date\"].dt.weekday\ndf[\"1st_day_of_week\"] = df[\"date\"] - df[\"day_of_week\"] * timedelta(days=1)\ndf_weekly.drop(columns=[\"date\"], inplace=True)\ndf_weekly.rename(columns={\"1st_day_of_week\": \"date\"}, inplace=True)\ndf_weekly = df_weekly[[\"date\", \"open\", \"high\", \"low\", \"close\", \"volume\"]].groupby([\"date\"]).agg({\"open\": \"first\", \"high\": [\"max\"], \"low\": [\"min\"], \"close\": \"last\", \"volume\": [\"sum\"]})\ndf_weekly.columns = [\"open\", \"high\", \"low\", \"close\", \"volume\"]\ndf_weekly<\/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>I make a copy of our dataframe \u201c<strong>df<\/strong>\u201d and store it in a new variable called \u201c<strong>df_weekly<\/strong>\u201d.<\/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\">df_weekly = df.copy()<\/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>I created a new column\/feature called \u201c<strong>day_of_week<\/strong>\u201d which has a numeric value for the day of the week. Monday starts with 0.<\/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\">df[\"day_of_week\"] = df[\"date\"].dt.weekday<\/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>I then wanted to determine what was the first day of every week.<\/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\">df[\"1st_day_of_week\"] = df[\"date\"] - df[\"day_of_week\"] * timedelta(days=1)<\/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>I no longer want to keep the daily \u201c<strong>date<\/strong>\u201d, so I dropped the column\/feature.<\/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\">df_weekly.drop(columns=[\"date\"], inplace=True)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p id=\"4144\">I then renamed my \u201c<strong>1st_day_of_week<\/strong>\u201d column\/feature to \u201c<strong>date<\/strong>\u201d. That will become the date I want to show for each weekly candlestick.<\/p>\n\n\n\n<p id=\"2da5\">Now this is where the magic happens. What this is doing is grouping all the data by the \u201c<strong>date<\/strong>\u201d. The \u201c<strong>date<\/strong>\u201d will show the first day of every week for all the days of the week. By aggregating it we consolidate all the days for the week. What you then need to do is tell Pandas what to do with the aggregated data. For the \u201c<strong>open<\/strong>\u201d, I said I want the first \u201c<strong>open<\/strong>\u201d. For the \u201c<strong>high<\/strong>\u201d, I want the highest \u201c<strong>high<\/strong>\u201d For the \u201c<strong>low<\/strong>\u201d, I want the lowest \u201c<strong>low<\/strong>\u201d. For the \u201c<strong>close<\/strong>\u201d, I want the last \u201c<strong>close<\/strong>\u201d. Finally, for the \u201c<strong>volume<\/strong>\u201d I want the sum of the \u201c<strong>volume<\/strong>\u201d entries.<\/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\">df_weekly = df_weekly[[\"date\", \"open\", \"high\", \"low\", \"close\", \"volume\"]].groupby([\"date\"]).agg({\"open\": \"first\", \"high\": [\"max\"], \"low\": [\"min\"], \"close\": \"last\", \"volume\": [\"sum\"]})<\/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>I then want to update the aggregated column names and display the datagrame.<\/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\">df_weekly.columns = [\"open\", \"high\", \"low\", \"close\", \"volume\"]\ndf_weekly<\/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<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/10\/Apple-weekly-columns-open-high-low-close-volume.png\" alt=\"\" class=\"wp-image-656\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2929\">Another way to create custom candlesticks<\/h2>\n\n\n\n<p id=\"8e22\">Let\u2019s say we have 1 minute candlesticks but want to create 15 minute candlesticks.<\/p>\n\n\n\n<p id=\"db71\">First, let\u2019s retrieve our 1 minute candles and store it in a dataframe called \u201c<strong>df<\/strong>\u201d.<\/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 = requests.get(\"https:\/\/eodhistoricaldata.com\/api\/intraday\/AAPL.US?api_token=demo&amp;interval=1m&amp;fmt=json\")\njson_data = json.loads(resp.content)\ndf = pd.DataFrame(json_data)\ndf<\/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<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/10\/Apple-1-minute-candles.png\" alt=\"\" class=\"wp-image-657\"\/><\/figure>\n\n\n\n<p id=\"fd0c\">65813 minutes for Apple stock data. That should do the trick!<\/p>\n\n\n\n<p id=\"19c3\">There is this amazing feature of Pandas called \u201c<strong>resample<\/strong>\u201d, and it\u2019s surprisingly easy 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\">df_15m = df.resample(\"15T\", on=\"datetime\").agg({\"open\": \"first\", \"high\": [\"max\"], \"low\": [\"min\"], \"close\": \"last\", \"volume\": [\"sum\"]})\ndf_15m.columns = [\"open\", \"high\", \"low\", \"close\", \"volume\"]\ndf_15m<\/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<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/10\/Apple-1-minute-candles-resampled.png\" alt=\"\" class=\"wp-image-658\"\/><\/figure>\n\n\n\n<p id=\"e004\">As you can see, 1 minute candles have been consolidated into 15 minutes with the same aggregation rules we defined earlier. The \u201c<strong>15T<\/strong>\u201d is what what tells Pandas resample to use 15 minute samples.<\/p>\n\n\n\n<p id=\"720c\">For more information about all the Pandas resampling options, you can read up on the official documentation here:&nbsp;<a href=\"https:\/\/pandas.pydata.org\/docs\/reference\/api\/pandas.DataFrame.resample.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/pandas.pydata.org\/docs\/reference\/api\/pandas.DataFrame.resample.html<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"155f\">Conclusion<\/h2>\n\n\n\n<p id=\"981c\">As you can see, it\u2019s straightforward to create your own interval candlesticks if required. What can be an incredibly powerful and effective strategy in trading is to overlay different intervals over each other.<\/p>\n\n\n\n<p id=\"73c3\">With cryptocurrency trading \u2014 I often look at the 5 minute, 15 minute and 1 hour graphs at the same time. They can act as a very powerful confirmation mechanism. If you think about it, whatever is happening in the 5 minute graphs will start reflecting later in the 15 minute graphs, and what is happening the 15 minute graphs will start reflecting later in the hourly graphs. If you are trading on the 1 hour graphs and start seeing the market\u2019s change in the 5 minute graphs, then the 15 minute graphs, it\u2019s time to get out! Or get in, depending on what is happening.<\/p>\n\n\n\n<p id=\"f292\">A really good strategy is to take the SMA200 of the weekly graphs for the long term trend, the SMA200 of the daily for the medium term trend, and the SMA200 of the hourly. If the SMA200 on the weekly is above the SMA200 on the daily and the SMA200 on the daily crosses above the SMA200 on the hourly that is a very strong buy signal.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to create custom trading candlesticks in Python and why? Important terminology and trading basicsBefore I continue, you will need to have a grasp of some important terminology and trading basics. If you want to learn how to install the EODHD APIs Python Financial Official Library and activate your API key, I recommend to start [&hellip;]<\/p>\n","protected":false},"author":8,"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":[42],"tags":[],"coding-language":[30],"ready-to-go-solution":[56],"qualification":[31,32],"financial-apis-category":[36],"financial-apis-manuals":[38],"class_list":["post-643","post","type-post","status-publish","format-standard","hentry","category-stocks-data-analysis-examples","coding-language-python","ready-to-go-solution-eodhd-python-financial-library","qualification-experienced","qualification-guru","financial-apis-category-stock-market-prices","financial-apis-manuals-intraday"],"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>Create Trading Candlesticks in Python | EODHD APIs Academy<\/title>\n<meta name=\"description\" content=\"How to create custom trading candlesticks in Python and why would you want to create them? Two ways to create custom trading candlesticks!\" \/>\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\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Trading Candlesticks in Python\" \/>\n<meta property=\"og:description\" content=\"How to create custom trading candlesticks in Python and why would you want to create them? Two ways to create custom trading candlesticks!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-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=\"2022-09-28T05:47:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-05T12:30:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2022\/10\/Create-Trading-Candlesticks.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"461\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Whittle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:site\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Whittle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python\"},\"author\":{\"name\":\"Michael Whittle\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\"},\"headline\":\"Create Trading Candlesticks in Python\",\"datePublished\":\"2022-09-28T05:47:53+00:00\",\"dateModified\":\"2025-02-05T12:30:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python\"},\"wordCount\":1494,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/09\/Official-EODHD-APIs-Python-Library.png\",\"articleSection\":[\"Stocks Data Analysis Examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python\",\"name\":\"Create Trading Candlesticks in Python | EODHD APIs Academy\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/09\/Official-EODHD-APIs-Python-Library.png\",\"datePublished\":\"2022-09-28T05:47:53+00:00\",\"dateModified\":\"2025-02-05T12:30:29+00:00\",\"description\":\"How to create custom trading candlesticks in Python and why would you want to create them? Two ways to create custom trading candlesticks!\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#primaryimage\",\"url\":\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/09\/Official-EODHD-APIs-Python-Library.png\",\"contentUrl\":\"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/09\/Official-EODHD-APIs-Python-Library.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-academy\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Trading Candlesticks in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"name\":\"Financial APIs Academy | EODHD\",\"description\":\"Financial Stock Market Academy\",\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\",\"name\":\"EODHD (EOD Historical Data)\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"width\":159,\"height\":82,\"caption\":\"EODHD (EOD Historical Data)\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/eodhistoricaldata\",\"https:\/\/x.com\/EOD_data\",\"https:\/\/www.reddit.com\/r\/EODHistoricalData\/\",\"https:\/\/eod-historical-data.medium.com\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\",\"name\":\"Michael Whittle\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"caption\":\"Michael Whittle\"},\"description\":\"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Create Trading Candlesticks in Python | EODHD APIs Academy","description":"How to create custom trading candlesticks in Python and why would you want to create them? Two ways to create custom trading candlesticks!","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\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python","og_locale":"en_US","og_type":"article","og_title":"Create Trading Candlesticks in Python","og_description":"How to create custom trading candlesticks in Python and why would you want to create them? Two ways to create custom trading candlesticks!","og_url":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python","og_site_name":"Financial Academy","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2022-09-28T05:47:53+00:00","article_modified_time":"2025-02-05T12:30:29+00:00","og_image":[{"width":1400,"height":461,"url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2022\/10\/Create-Trading-Candlesticks.jpeg","type":"image\/jpeg"}],"author":"Michael Whittle","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"Michael Whittle","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python"},"author":{"name":"Michael Whittle","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad"},"headline":"Create Trading Candlesticks in Python","datePublished":"2022-09-28T05:47:53+00:00","dateModified":"2025-02-05T12:30:29+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python"},"wordCount":1494,"publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/09\/Official-EODHD-APIs-Python-Library.png","articleSection":["Stocks Data Analysis Examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python","url":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python","name":"Create Trading Candlesticks in Python | EODHD APIs Academy","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/09\/Official-EODHD-APIs-Python-Library.png","datePublished":"2022-09-28T05:47:53+00:00","dateModified":"2025-02-05T12:30:29+00:00","description":"How to create custom trading candlesticks in Python and why would you want to create them? Two ways to create custom trading candlesticks!","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#primaryimage","url":"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/09\/Official-EODHD-APIs-Python-Library.png","contentUrl":"https:\/\/eodhistoricaldata.com\/financial-academy\/wp-content\/uploads\/2022\/09\/Official-EODHD-APIs-Python-Library.png"},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-academy\/stocks-data-analysis-examples\/create-trading-candlesticks-in-python#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-academy\/"},{"@type":"ListItem","position":2,"name":"Create Trading Candlesticks in Python"}]},{"@type":"WebSite","@id":"https:\/\/eodhd.com\/financial-academy\/#website","url":"https:\/\/eodhd.com\/financial-academy\/","name":"Financial APIs Academy | EODHD","description":"Financial Stock Market Academy","publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eodhd.com\/financial-academy\/#organization","name":"EODHD (EOD Historical Data)","url":"https:\/\/eodhd.com\/financial-academy\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","width":159,"height":82,"caption":"EODHD (EOD Historical Data)"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/eodhistoricaldata","https:\/\/x.com\/EOD_data","https:\/\/www.reddit.com\/r\/EODHistoricalData\/","https:\/\/eod-historical-data.medium.com\/"]},{"@type":"Person","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad","name":"Michael Whittle","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","caption":"Michael Whittle"},"description":"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).","url":"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pdOdVT-an","jetpack_sharing_enabled":true,"acf":[],"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/643","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=643"}],"version-history":[{"count":2,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/643\/revisions"}],"predecessor-version":[{"id":6258,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/643\/revisions\/6258"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media?parent=643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/categories?post=643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/tags?post=643"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/coding-language?post=643"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/ready-to-go-solution?post=643"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/qualification?post=643"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-category?post=643"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-manuals?post=643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}