{"id":16231492,"url":"https://github.com/rishavanand/hasura-telegram-bitcoin-tracking-bot","last_synced_at":"2025-09-03T21:45:03.980Z","repository":{"id":93333093,"uuid":"116363569","full_name":"rishavanand/hasura-telegram-bitcoin-tracking-bot","owner":"rishavanand","description":"A Telegram Bot built on Hasura that notifies you when Bitcoin's rate falls below your set limit.","archived":false,"fork":false,"pushed_at":"2018-01-05T17:49:56.000Z","size":10745,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T06:43:42.758Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rishavanand.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-05T08:51:20.000Z","updated_at":"2018-01-05T17:42:48.000Z","dependencies_parsed_at":"2023-03-10T05:15:46.483Z","dependency_job_id":null,"html_url":"https://github.com/rishavanand/hasura-telegram-bitcoin-tracking-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rishavanand/hasura-telegram-bitcoin-tracking-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishavanand%2Fhasura-telegram-bitcoin-tracking-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishavanand%2Fhasura-telegram-bitcoin-tracking-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishavanand%2Fhasura-telegram-bitcoin-tracking-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishavanand%2Fhasura-telegram-bitcoin-tracking-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rishavanand","download_url":"https://codeload.github.com/rishavanand/hasura-telegram-bitcoin-tracking-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishavanand%2Fhasura-telegram-bitcoin-tracking-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273516932,"owners_count":25119765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T13:05:45.440Z","updated_at":"2025-09-03T21:45:03.942Z","avatar_url":"https://github.com/rishavanand.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Building a Telegram Bot on Hasura\r\n\r\nThis readme is about getting a Bitcoin Rate Tracking Telegram Bot to run with Hasura as quick as possible. This bot is also integrated with API from https://coindesk.com. Each command will have a description telling you what it does and also be sometimes accompanied by screenshots so that you know you are heading in the right direction.\r\n\r\nThere will also be links to provide you with more information on a topic. Do remember to follow them.\r\n\r\nWe will be using telebot package (https://github.com/mullwar/telebot) with NodeJS on our server. When a user sends a message to our bot it will be sent to our server by Telegram. We will then send a response back to the user from our server.\r\n\r\n## Github Repo Link\r\n* https://github.com/rishavanand/hasura-telegram-bitcoin-tracking-bot\r\n\r\n## Pre-requisites\r\n\r\n* [NodeJS](https://nodejs.org)\r\n\r\n* [hasura CLI](https://docs.hasura.io/0.15/manual/install-hasura-cli.html)\r\n\r\n### Let's start\r\n\r\n## 1) Checkout API available on CoinDesk.com\r\n\r\n* Visit - https://api.coindesk.com/v1/bpi/currentprice.json\r\n* You do not need to do anything there. Just a quick view is needed just to know from where the data is coming.\r\n\r\n![CoinBase API](https://github.com/rishavanand/hasura-telegram-bitcoin-tracking-bot/raw/master/assets/coinbase.png \"CoinBase API\")\r\n\r\n## 2) Create new bot on Telegram app\r\n\r\n* Open your Telegram app and search for BotFather\r\n* Select /start\r\n* Select /newbot\r\n* Send a bot name of your choice\r\n* Then send a bot username. Can be anything\r\n* You will then get a confirmation message with the Bot's API. Copy the ***API KEY*** \r\n\r\n![Bot create](https://github.com/rishavanand/hasura-telegram-bitcoin-tracking-bot/raw/master/assets/bot_create.jpeg \"Bot create\")\r\n\r\n## 3) Getting the Hasura project\r\n\r\n```sh\r\n\r\n# Clone the repository on your computer\r\n$ hasura quickstart rishavanand/telegram-bitcoin-tracking-bot\r\n\r\n# Enter the directory\r\n$ cd telegram-bitcoin-tracking-bot\r\n\r\n# Add telegram's api key to environment variables a.k.a hasura secrets\r\n$ hasura secrets update bot.telegram_bot_api.key \u003cYOUR-TELEGRAM-API-KEY\u003e\r\n\r\n# Commit changes\r\n$ git add . \u0026\u0026 git commit -m \"Deployment commit\"\r\n\r\n# Push to Hasura server\r\n$ git push hasura master\r\n\r\n```\r\n\r\nOur Telegram Bot is now ready for use.\r\n\r\n## 4) Creating database table\r\n\r\n```sh\r\n# Open Hasura API Console\r\n$ hasura api-console\r\n\r\n```\r\n\r\n* Head to DATA Tab and create table called ***user_table***\r\n* Create column ***user_id*** of type ***Integer***\r\n* Create column ***bitcoin_limit*** of type ***Numeric***\r\n\r\n![Create table](https://github.com/rishavanand/hasura-telegram-bitcoin-tracking-bot/raw/master/assets/create_table.png \"Create table\")\r\n\r\n## 5) Interacting with your bot\r\n\r\nNow that our bot is ready. We need to find our bot.\r\n\r\n* Open telegram\r\n* Search for your bot by its username\r\n* Press /start\r\n\r\n* ***/start***\r\nStarts the bot\r\n\r\n* ***/updatelimit [value]***\r\nExample: /updatelimit 17000.\r\nSets the Bitcoin limit to 17000. You will be notified when the rate falls below it.\r\n\r\n* ***/limit***\r\nSends your current set limit\r\n\r\n* ***/rate***\r\nSends current Bitcoin Rate\r\n\r\n* ***/help***\r\nSends list of available commands\r\n\r\n![Bot interaction](https://github.com/rishavanand/hasura-telegram-bitcoin-tracking-bot/raw/master/assets/bot_interaction.gif \"Bot interaction\")\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishavanand%2Fhasura-telegram-bitcoin-tracking-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishavanand%2Fhasura-telegram-bitcoin-tracking-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishavanand%2Fhasura-telegram-bitcoin-tracking-bot/lists"}