{"id":6369,"date":"2025-05-19T05:47:50","date_gmt":"2025-05-19T05:47:50","guid":{"rendered":"https:\/\/eodhd.com\/financial-academy\/?p=6369"},"modified":"2025-10-14T14:48:17","modified_gmt":"2025-10-14T14:48:17","slug":"create-a-telegram-trading-bot","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot","title":{"rendered":"Create a Telegram Trading Bot"},"content":{"rendered":"\n<p>So we want to create a Telegram trading not, but where do we start? I guess the logical first step is explaining what Telegram is.<\/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-what-is-telegram\">What is Telegram?<\/h2>\n\n\n\n<p>Telegram is a cloud-based messaging service renowned for its speed, security and generous features including one-to-one chats, large group \u201csupergroups\u201d, public channels, voice and video calls, and file sharing up to 2 GB. What really sets Telegram apart are its freely available, well-documented APIs: the Bot API for creating chatbots and mini-apps; the MTProto API and TDLib for building full-fledged third-party clients; and the Gateway API for sending verification codes. This openness has fostered a vibrant ecosystem of bots, custom clients and integrations without fees or restrictive approvals.<\/p>\n\n\n\n<p>By contrast, WhatsApp and Viber limit developers to business-oriented offerings. WhatsApp\u2019s proprietary Business API is only accessible through approved providers, requires paid templates and enforces strict session rules, while Viber\u2019s RESTful Bot API permits only automated public accounts rather than custom apps or clients. In short, Telegram\u2019s open, cost-free APIs give developers far more flexibility than the more controlled, enterprise-focused platforms of WhatsApp and Viber.<\/p>\n\n\n\n<p>The first step is to <a href=\"https:\/\/telegram.org\/apps\" target=\"_blank\" rel=\"noreferrer noopener\">download Telegram<\/a>. For the purpose of this tutorial it doesn&#8217;t matter what platform you use. Whether you use the Desktop version or Mobile versions, it doesn&#8217;t matter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-create-a-telegram-bot\">Create a Telegram bot<\/h2>\n\n\n\n<p>At this stage, we are just creating a generic bot. We will be creating a trading bot but this is the first step you&#8217;ll do to create any bot. I like to use <a href=\"https:\/\/telegram.me\/BotFather\" target=\"_blank\" rel=\"noreferrer noopener\">BotFather<\/a> for this. Click on the link and click &#8220;Start Bot&#8221;. <\/p>\n\n\n\n<p>You will need to send the message \/newbot to BotFather and follow the prompts. You will need to give your bot a name. I used &#8220;EODHDAlerts&#8221; for example. You also need to assign a username to your bot. I used &#8220;eodhdalerts_bot&#8221;. <\/p>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-90d10fc945f9449b8fb3cd5ec690566f\"><code>Done! Congratulations on your new bot. You will find it at t.me\/eodhdalerts_bot. You can now add a description, about section and profile picture for your bot, see \/help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.<\/code><\/p>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-5a95ca34ff177404e4d96dbeafc3103f\"><code>Use this token to access the HTTP API:<\/code><\/p>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-3a537e8bb99357ed2e2759c8984157ce\"><code><strong>&lt;YOUR_TOKEN&gt;<\/strong><\/code><\/p>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-dced8ee235c85da4bf6b7f3a37d6d936\"><code>Keep your token secure and store it safely, it can be used by anyone to control your bot.<\/code><\/p>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-f7877b710d0898ca8ce911507099d02b\"><code>For a description of the Bot API, see this page: https:\/\/core.telegram.org\/bots\/api<\/code><\/p>\n\n\n\n<p>Make a note of your <strong>&lt;YOUR_TOKEN&gt;<\/strong>. You will need it in the next step. We will call it TELEGRAM_BOT_TOKEN in the config.py.<\/p>\n\n\n\n<p>The next step to retrieve your Client ID is not a simple task! It catches a lot of people out. You won&#8217;t be able to retrieve the Client ID until you have sent at least one message to the bot. This is a crucial step which many miss which causes a lot of confusion. Open your bot, in my case <a href=\"https:\/\/t.me\/eodhdalerts_bot\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/t.me\/eodhdalerts_bot<\/a>.<\/p>\n\n\n\n<p><strong>**IMPORTANT**<\/strong> &#8211; Send at least one message to your newly created bot E.g. &#8220;hello&#8221;<\/p>\n\n\n\n<p>Browse to <a href=\"https:\/\/api.telegram.org\/botYOUR_TOKEN\/getUpdates\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/api.telegram.org\/bot<strong>YOUR_TOKEN<\/strong>\/getUpdates<\/a>. Please note you need to put &lt;YOUR_TOKEN&gt; above instead of &#8220;YOUR_TOKEN&#8221; in bold in the URL. This will show you all the messages that have been sent to the bot. You need to make note of the &#8220;id&#8221; which we will use in the next section. We will call it TELEGRAM_CHAT_ID in the config.py.<\/p>\n\n\n\n<p>Before you move onto the next section, make sure you have your token and client ID. This will be known as TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID in the config.py.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-key-features\">Key Features<\/h2>\n\n\n\n<p>When creating our Telegram trading bot we are looking at creating two core features&#8230;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Demonised service that will retrieve and process historical market data using EODHD API&#8217;s historical data. As part of the processing, a trading strategy will be applied to the data identifying the buy and sell signals. When a buy or sell signal event happens the bot will send a message to the bot Telegram group letting the subscribers know they will probably want to place an order <span style=\"text-decoration: underline\">if they agree with the timing<\/span>. Don&#8217;t place trades blindly. Use some common sense and your own analysis to before you carry out a trade action. We will refer to this feature as a &#8220;Push&#8221;, as in the bot is pushing data to the you.<br><\/li>\n\n\n\n<li>We will probably want a &#8220;Pull&#8221; as well. As in we sent a command to the bot via the Telegram channel. For example, a \/get_price may be a helpful command.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"148\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/Telegram-Bot-get_price.png\" alt=\"\" class=\"wp-image-6371\" srcset=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/Telegram-Bot-get_price.png 756w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/Telegram-Bot-get_price-300x59.png 300w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/Telegram-Bot-get_price-60x12.png 60w, https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/Telegram-Bot-get_price-150x29.png 150w\" sizes=\"auto, (max-width: 756px) 100vw, 756px\" \/><\/figure>\n\n\n\n<p>This tutorial will explain how the bot framework will be setup and how to get the base functionality working. The following articles will delve deeper into more specialist Push and Pull functionality and features.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-open-source-project\">Open Source Project<\/h2>\n\n\n\n<p>I understand that EODHD API&#8217;s are interested in creating an open source project for this. I think it&#8217;s a great idea and a nice way to involve the community. When I created PyCryptoBot, over 50 volunteers contributed to the project from various backgrounds. Some were pure devs, some were skilled traders, some were just enthusiasts with great ideas. At one stage over 1000 people were speaking about the project around the clock. Hopefully this is the start of an exciting project. I&#8217;ve put the initial <a href=\"https:\/\/github.com\/alexpipipi\/EODHDAlerts-TG-app-\" target=\"_blank\" rel=\"noreferrer noopener\">code for this project here<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-code\">The Code<\/h2>\n\n\n\n<p>I&#8217;m not going to explain all the code in low detail but highlight some important parts. Happy to receive feedback if there are any parts that could be explained in more detail but hopefully with some knowledge of Python, APIs, and EODHD APIs, you should be okay.<\/p>\n\n\n\n<p>The first essential file to understand, which isn&#8217;t included in the repo, is the <strong>config.py<\/strong>. Create this file and include your <strong>EODHD_API_TOKEN<\/strong> (used to retrieve the historical data), <strong>TELEGRAM_BOT_TOKEN<\/strong> (which we extracted earlier), <strong>TELEGRAM_CHAT_ID<\/strong> (which we extracted earlier), and the other variables are parameters for the historical data processing and simple moving average (SMA) strategy.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\"># config.py\n\nEODHD_API_TOKEN = \"&lt;REMOVED&gt;\"\nTELEGRAM_BOT_TOKEN = \"&lt;REMOVED&gt;\"\nTELEGRAM_CHAT_ID = \"&lt;REMOVED&gt;\"\nDEFAULT_SYMBOL = \"AAPL.MX\"  # BTC-USD.CC \nDEFAULT_INTERVAL = \"d\"  # 1m, 5m, 1h, d, w, m\nSHORT_WINDOW = 20\nLONG_WINDOW = 50<\/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 main file that runs is the <strong>bot.py<\/strong>. This is the daemon service that retrieves and processes the historical market data, sends messages to the bot channel, and received commands from the channel to execute. You will see below that I&#8217;ve created <strong>\/start,<\/strong> <strong>\/set_symbol<\/strong>, <strong>\/set_internal<\/strong>, and <strong>\/get_price <\/strong>to start with.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\"># bot.py\n\nfrom telegram.ext import Updater, CommandHandler\nfrom config import TELEGRAM_BOT_TOKEN\nfrom handlers import start, set_symbol, set_interval, get_price, analyse_market\nfrom telegram.ext import JobQueue\n\n\ndef main():\n    updater = Updater(TELEGRAM_BOT_TOKEN)\n    dp = updater.dispatcher\n\n    dp.add_handler(CommandHandler(\"start\", start))\n    dp.add_handler(CommandHandler(\"set_symbol\", set_symbol))\n    dp.add_handler(CommandHandler(\"set_interval\", set_interval))\n    dp.add_handler(CommandHandler(\"get_price\", get_price))\n\n    job_queue: JobQueue = updater.job_queue\n    job_queue.run_repeating(analyse_market, interval=60, first=0)\n\n    updater.start_polling()\n    updater.idle()\n\n\nif __name__ == \"__main__\":\n    main()\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>I&#8217;ve created a few classes using SOLID principles. <strong>DataFetcher<\/strong> in <strong>data_fetcher.py<\/strong> which handles the data retrieval from EODHD APIs, <strong>SMACrossoverStrategy<\/strong> in <strong>strategy.py<\/strong> which is a basic strategy to demonstrate the Telegram bot, <strong>TelegramNotifier<\/strong> in <strong>telegram_notifier.py<\/strong> which handles sending messages to the Telegram bot channel (&#8220;<strong>the Push<\/strong>&#8220;). The last file to mention is the <strong>handlers.py<\/strong> which isn&#8217;t a class but contains all the functions responsible for commands sent to the bot by users. It&#8217;s hopefully self explanatory what is happening below. This is a work in progress and will be build upon in future articles.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\"># handlers.py\n\nfrom telegram import Update\nfrom telegram.ext import CallbackContext\nfrom config import DEFAULT_SYMBOL, DEFAULT_INTERVAL\nfrom data_fetcher import DataFetcher\nfrom strategy import SMACrossoverStrategy\nfrom telegram_notifier import TelegramNotifier\n\nsymbol = DEFAULT_SYMBOL\ninterval = DEFAULT_INTERVAL\n\n\ndef start(update: Update, context: CallbackContext):\n    update.message.reply_text(\"Welcome to the Trading Bot!\")\n\n\ndef set_symbol(update: Update, context: CallbackContext):\n    global symbol\n    if context.args:\n        symbol = context.args[0]\n        update.message.reply_text(f\"Symbol set to {symbol}\")\n    else:\n        update.message.reply_text(\"Please provide a symbol.\")\n\n\ndef set_interval(update: Update, context: CallbackContext):\n    global interval\n    if context.args:\n        interval = context.args[0]\n        update.message.reply_text(f\"Interval set to {interval}\")\n    else:\n        update.message.reply_text(\"Please provide an interval.\")\n\n\ndef get_price(update: Update, context: CallbackContext):\n    fetcher = DataFetcher(symbol, interval)\n    price = fetcher.fetch_price()\n    if price:\n        update.message.reply_text(f\"Current price of {symbol}: {price}\")\n    else:\n        update.message.reply_text(\"Failed to fetch data.\")\n\n\ndef analyse_market(context: CallbackContext):\n    fetcher = DataFetcher(symbol, interval)\n    data = fetcher.fetch_ohlc()\n    if data.empty:\n        return\n    strategy = SMACrossoverStrategy(short_window=20, long_window=50)\n    signals = strategy.generate_signals(data)\n    latest_signal = signals[\"position\"].iloc[-1]\n    notifier = TelegramNotifier()\n\n    if latest_signal == 1:\n        notifier.send_message(f\"Buy signal for {symbol}\")\n    elif latest_signal == -1:\n        notifier.send_message(f\"Sell signal for {symbol}\")\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>Hopefully this has been a clear and useful introduction to the project. You should be able to clone the repo, and add the config.py, and it should just work.<\/p>\n\n\n\n<p>If you have any ideas or suggestions where this project can go, or would like to contribute, do get in touch!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So we want to create a Telegram trading not, but where do we start? I guess the logical first step is explaining what Telegram is. What is Telegram? Telegram is a cloud-based messaging service renowned for its speed, security and generous features including one-to-one chats, large group \u201csupergroups\u201d, public channels, voice and video calls, and [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":6375,"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],"tags":[],"coding-language":[30],"ready-to-go-solution":[56],"qualification":[31],"financial-apis-category":[34,36],"financial-apis-manuals":[40],"class_list":["post-6369","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-building-stocks-apps-examples","coding-language-python","ready-to-go-solution-eodhd-python-financial-library","qualification-experienced","financial-apis-category-crypto-market-prices","financial-apis-category-stock-market-prices","financial-apis-manuals-technical-indicators","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>Create a Telegram Trading Bot | 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\/create-a-telegram-trading-bot\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a Telegram Trading Bot\" \/>\n<meta property=\"og:description\" content=\"So we want to create a Telegram trading not, but where do we start? I guess the logical first step is explaining what Telegram is. What is Telegram? Telegram is a cloud-based messaging service renowned for its speed, security and generous features including one-to-one chats, large group \u201csupergroups\u201d, public channels, voice and video calls, and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot\" \/>\n<meta property=\"og:site_name\" content=\"Financial Academy\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/eodhistoricaldata\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-19T05:47:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-14T14:48:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"853\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Whittle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:site\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Whittle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot\"},\"author\":{\"name\":\"Michael Whittle\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\"},\"headline\":\"Create a Telegram Trading Bot\",\"datePublished\":\"2025-05-19T05:47:50+00:00\",\"dateModified\":\"2025-10-14T14:48:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot\"},\"wordCount\":1140,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg\",\"articleSection\":[\"Building Stocks Apps Examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot\",\"name\":\"Create a Telegram Trading Bot | EODHD APIs Academy\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg\",\"datePublished\":\"2025-05-19T05:47:50+00:00\",\"dateModified\":\"2025-10-14T14:48:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#primaryimage\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg\",\"width\":2560,\"height\":853,\"caption\":\"Bull market, financial, trading and growth concepts; made with Generative AI\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-academy\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a Telegram Trading Bot\"}]},{\"@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 a Telegram Trading Bot | 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\/create-a-telegram-trading-bot","og_locale":"en_US","og_type":"article","og_title":"Create a Telegram Trading Bot","og_description":"So we want to create a Telegram trading not, but where do we start? I guess the logical first step is explaining what Telegram is. What is Telegram? Telegram is a cloud-based messaging service renowned for its speed, security and generous features including one-to-one chats, large group \u201csupergroups\u201d, public channels, voice and video calls, and [&hellip;]","og_url":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot","og_site_name":"Financial Academy","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2025-05-19T05:47:50+00:00","article_modified_time":"2025-10-14T14:48:17+00:00","og_image":[{"width":2560,"height":853,"url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.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":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot"},"author":{"name":"Michael Whittle","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad"},"headline":"Create a Telegram Trading Bot","datePublished":"2025-05-19T05:47:50+00:00","dateModified":"2025-10-14T14:48:17+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot"},"wordCount":1140,"publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg","articleSection":["Building Stocks Apps Examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot","url":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot","name":"Create a Telegram Trading Bot | EODHD APIs Academy","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg","datePublished":"2025-05-19T05:47:50+00:00","dateModified":"2025-10-14T14:48:17+00:00","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#primaryimage","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg","width":2560,"height":853,"caption":"Bull market, financial, trading and growth concepts; made with Generative AI"},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-academy\/building-stocks-apps-examples\/create-a-telegram-trading-bot#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-academy\/"},{"@type":"ListItem","position":2,"name":"Create a Telegram Trading Bot"}]},{"@type":"WebSite","@id":"https:\/\/eodhd.com\/financial-academy\/#website","url":"https:\/\/eodhd.com\/financial-academy\/","name":"Financial APIs Academy | EODHD","description":"Financial Stock Market Academy","publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eodhd.com\/financial-academy\/#organization","name":"EODHD (EOD Historical Data)","url":"https:\/\/eodhd.com\/financial-academy\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","width":159,"height":82,"caption":"EODHD (EOD Historical Data)"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/eodhistoricaldata","https:\/\/x.com\/EOD_data","https:\/\/www.reddit.com\/r\/EODHistoricalData\/","https:\/\/eod-historical-data.medium.com\/"]},{"@type":"Person","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad","name":"Michael Whittle","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","caption":"Michael Whittle"},"description":"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).","url":"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle"}]}},"jetpack_featured_media_url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2025\/05\/AdobeStock_578512279-scaled.jpeg","jetpack_shortlink":"https:\/\/wp.me\/pdOdVT-1EJ","jetpack_sharing_enabled":true,"acf":[],"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/6369","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=6369"}],"version-history":[{"count":7,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/6369\/revisions"}],"predecessor-version":[{"id":6569,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/6369\/revisions\/6569"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media\/6375"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media?parent=6369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/categories?post=6369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/tags?post=6369"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/coding-language?post=6369"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/ready-to-go-solution?post=6369"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/qualification?post=6369"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-category?post=6369"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-manuals?post=6369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}