{"id":17482295,"url":"https://github.com/totigm/twitter-crypto-bot","last_synced_at":"2026-01-22T05:06:04.099Z","repository":{"id":38128729,"uuid":"360329682","full_name":"totigm/twitter-crypto-bot","owner":"totigm","description":"This is a Twitter bot that tweets about cryptocurrencies prices every certain amount of minutes","archived":false,"fork":false,"pushed_at":"2022-12-06T06:15:51.000Z","size":889,"stargazers_count":48,"open_issues_count":0,"forks_count":22,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-22T14:09:45.145Z","etag":null,"topics":["binance","binance-api","bot","bots","candlestick","candlestick-chart","candlesticks","crypto","cryptocurrencies","cryptocurrency","javascript","js","node","nodejs","trading","ts","twitter","twitter-api","twitter-bot","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/totigm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-04-21T23:04:50.000Z","updated_at":"2025-03-07T22:40:04.000Z","dependencies_parsed_at":"2023-01-24T10:01:08.060Z","dependency_job_id":null,"html_url":"https://github.com/totigm/twitter-crypto-bot","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/totigm/twitter-crypto-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totigm%2Ftwitter-crypto-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totigm%2Ftwitter-crypto-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totigm%2Ftwitter-crypto-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totigm%2Ftwitter-crypto-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/totigm","download_url":"https://codeload.github.com/totigm/twitter-crypto-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totigm%2Ftwitter-crypto-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28655136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":["binance","binance-api","bot","bots","candlestick","candlestick-chart","candlesticks","crypto","cryptocurrencies","cryptocurrency","javascript","js","node","nodejs","trading","ts","twitter","twitter-api","twitter-bot","typescript"],"created_at":"2024-10-18T23:05:24.053Z","updated_at":"2026-01-22T05:06:04.082Z","avatar_url":"https://github.com/totigm.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/pamboo"],"categories":[],"sub_categories":[],"readme":"# Twitter Crypto Bot\n\nThis bot tweets about the price variations of any cryptocurrency every certain time interval.\n\n\u003e Every coin listed in [Binance](https://www.binance.com) are supported.\n\u003e\n\u003e Prices' data is retrieved from the [Binance API](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md).\n\nTweets generated by the bot look like this:\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://twitter.com/Bitcoin8News\" target=\"_blank\"\u003e\n        \u003cimg align=\"center\" alt=\"Tweet image\" src=\"https://user-images.githubusercontent.com/64804554/184985559-c3175273-9024-472a-9e27-0237465ef276.png\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\nYou can achieve this with just one line of code! Simply choose a coin, a time interval between tweets, and that's it!\n\n![Crypto bot initialization](https://user-images.githubusercontent.com/64804554/143302340-21f115f2-b628-45f5-8df9-2cf4c9e0e582.png)\n\n## 📋 Prerequisites\n\n-   [**Node.js**](https://nodejs.org): You need to have Node.js installed on your computer to run this bot. You can download it [here](https://nodejs.org/en/download).\n\n-   [**Twitter account**](https://twitter.com): This is just a normal Twitter account. You can create one [here](https://twitter.com/i/flow/signup).\n\n-   [**Twitter developer account**](https://developer.twitter.com): Log in with your Twitter account and apply for a developer one [here](https://developer.twitter.com/en/apply-for-access).\n-   [**RapidAPI account**](https://rapidapi.com): If you don't have one already, you can create one [here](https://rapidapi.com/auth/sign-up).\n\n## 🎉 Let's start!\n\n-   First of all, fork this repository. If you don't know how forking works, check out [this guide](https://guides.github.com/activities/forking).\n-   Now that you have your own fork of the project, clone your repository to your computer.\n-   Go to the [Twitter tokens generator](https://github.com/totigm/twitter-tokens-generator) and generate the necessary access tokens for this bot.\n    -   You can skip this step if you already have them.\n-   Go to the [Candlestick Chart API](https://rapidapi.com/totigm/api/candlestick-chart/pricing) and subscribe to a plan of your choice. Note that the basic plan will allow you to tweet with charts' images every 20 minutes.\n-   Copy your `x-rapidapi-key` key from the code snippet that you can find [in the API page](https://rapidapi.com/totigm/api/candlestick-chart). If you are having trouble finding the RapidAPI key, watch [this video](https://www.youtube.com/watch?v=t1lbJvoPxwM).\n-   Create a file named `.env` at the repo's root directory and paste the keys from the previous steps in it (It should look like [`.env.example`](.env.example)).\n-   Open your console inside the directory.\n-   Run `yarn` or `npm i` to install the project's dependencies.\n-   Go to the `index.ts` file and choose the cryptocurrency you want, you can also change the time between tweets. Go to the [⚙️ Bot options](#⚙️-bot-options) section to see how to customize your bot.\n-   Finally, run `yarn start` or `npm start` and your bot will start running!\n-   That's it! You have your own Twitter Crypto Bot!\n\n## ⚙️ Bot options\n\nYour bot can be customized if you want it to have a different behaviour. The options that it supports right now are:\n\n![Crypto bot options](https://user-images.githubusercontent.com/64804554/143328560-cee24984-44fd-4f8f-b624-2e608f4fbe97.png)\n\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eOption\u003c/th\u003e\n            \u003cth\u003eSub option\u003c/th\u003e\n            \u003cth\u003eDescription\u003c/th\u003e\n            \u003cth\u003eDefault value\u003c/th\u003e\n            \u003cth\u003eValue type\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003cdiv id=\"credentials\"\u003e\n            \u003ctr\u003e\n                \u003ctd rowspan=\"5\"\u003e\n                    \u003cb\u003ecredentials\u003c/b\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003econsumer_key\u003c/td\u003e\n                \u003ctd\u003eKey you get from your Twitter app.\u003c/td\u003e\n                \u003ctd\u003eCONSUMER_KEY value in your .env file.\u003c/td\u003e\n                \u003ctd\u003eString\u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003econsumer_secret\u003c/td\u003e\n                \u003ctd\u003eSecret key you get from your Twitter app.\u003c/td\u003e\n                \u003ctd\u003eCONSUMER_SECRET value in your .env file.\u003c/td\u003e\n                \u003ctd\u003eString\u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003eaccess_token\u003c/td\u003e\n                \u003ctd\u003eGenerated access token you get for an specific Twitter user.\u003c/td\u003e\n                \u003ctd\u003eACCESS_TOKEN value in your .env file.\u003c/td\u003e\n                \u003ctd\u003eString\u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003eaccess_token_secret\u003c/td\u003e\n                \u003ctd\u003eGenerated secret access token you get for an specific Twitter user.\u003c/td\u003e\n                \u003ctd\u003eACCESS_TOKEN_SECRET value in your .env file.\u003c/td\u003e\n                \u003ctd\u003eString\u003c/td\u003e\n            \u003c/tr\u003e\n        \u003c/div\u003e\n        \u003cdiv id=\"decimalsAmount\"\u003e\n            \u003ctr\u003e\n                \u003ctd\u003e\u003cb\u003edecimalsAmount\u003c/b\u003e\u003c/td\u003e\n                \u003ctd\u003e\u003c/td\u003e\n                \u003ctd\u003e\n                    Number of decimal places after the comma of the cryptocurrency price.\n                \u003c/td\u003e\n                \u003ctd\u003eFrom 0 to 8 depending on the cryptocurrency price.\u003c/td\u003e\n                \u003ctd\u003ePositive number\u003c/td\u003e\n            \u003c/tr\u003e\n        \u003c/div\u003e\n        \u003cdiv id=\"hasHashtags\"\u003e\n            \u003ctr\u003e\n                \u003ctd rowspan=\"3\"\u003e\n                    \u003cb\u003ehasHashtags\u003c/b\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003ecode\u003c/td\u003e\n                \u003ctd\u003eIf the tweet should contain the coin code as a hashtag or not. E.g. #BTC.\u003c/td\u003e\n                \u003ctd\u003etrue\u003c/td\u003e\n                \u003ctd\u003eBoolean\u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003ename\u003c/td\u003e\n                \u003ctd\u003e\n                    If the tweet should contain the coin name as a hashtag or not. E.g. #Bitcoin.\n                \u003c/td\u003e\n                \u003ctd\u003etrue\u003c/td\u003e\n                \u003ctd\u003eBoolean\u003c/td\u003e\n            \u003c/tr\u003e\n        \u003c/div\u003e\n        \u003cdiv id=\"hasComparisons\"\u003e\n            \u003ctr\u003e\n                \u003ctd rowspan=\"3\"\u003e\n                    \u003cb\u003ehasComparisons\u003c/b\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003elastTweet\u003c/td\u003e\n                \u003ctd\u003e\n                    If the tweet should contain the comparison between the current price and the one\n                    from 24 hours ago.\n                \u003c/td\u003e\n                \u003ctd\u003etrue\u003c/td\u003e\n                \u003ctd\u003eBoolean\u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003elastDay\u003c/td\u003e\n                \u003ctd\u003e\n                    If the tweet should contain the comparison between the current price and the one\n                    from the last tweet.\n                \u003c/td\u003e\n                \u003ctd\u003etrue\u003c/td\u003e\n                \u003ctd\u003eBoolean\u003c/td\u003e\n            \u003c/tr\u003e\n        \u003c/div\u003e\n        \u003cdiv id=\"chartOptions\"\u003e\n            \u003ctr\u003e\n                \u003ctd rowspan=\"3\"\u003e\n                    \u003cb\u003echartOptions\u003c/b\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003einterval\u003c/td\u003e\n                \u003ctd\u003e\n                    Time interval for each candle.  \n                    \u003cul\u003e\n                        \u003cli\u003em: Minutes\u003c/li\u003e\n                        \u003cli\u003eh: Hours\u003c/li\u003e\n                        \u003cli\u003ed: Days\u003c/li\u003e\n                        \u003cli\u003ew: Weeks\u003c/li\u003e\n                        \u003cli\u003eM: Months\u003c/li\u003e\n                    \u003c/ul\u003e\n                \u003c/td\u003e\n                \u003ctd\u003e1m\u003c/td\u003e\n                \u003ctd\u003e\n                    \u003cul\u003e\n                        \u003cli\u003e1m\u003c/li\u003e\n                        \u003cli\u003e3m\u003c/li\u003e\n                        \u003cli\u003e5m\u003c/li\u003e\n                        \u003cli\u003e15m\u003c/li\u003e\n                        \u003cli\u003e30m\u003c/li\u003e\n                        \u003cli\u003e1h\u003c/li\u003e\n                        \u003cli\u003e2h\u003c/li\u003e\n                        \u003cli\u003e4h\u003c/li\u003e\n                        \u003cli\u003e6h\u003c/li\u003e\n                        \u003cli\u003e8h\u003c/li\u003e\n                        \u003cli\u003e12h\u003c/li\u003e\n                        \u003cli\u003e1d\u003c/li\u003e\n                        \u003cli\u003e3d\u003c/li\u003e\n                        \u003cli\u003e1w\u003c/li\u003e\n                        \u003cli\u003e1M\u003c/li\u003e\n                    \u003c/ul\u003e\n                \u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n                \u003ctd\u003elimit\u003c/td\u003e\n                \u003ctd\u003e\n                    Amount of candles in the chart\n                \u003c/td\u003e\n                \u003ctd\u003e16\u003c/td\u003e\n                \u003ctd\u003eInteger. Maximum 1000\u003c/td\u003e\n            \u003c/tr\u003e\n        \u003c/div\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003chr/\u003e\n\nWhen you saw the first example, you might have noticed that the tweet interval was set in minutes. If you want to set the interval to certain amount of hours, minutes, and/or seconds, you can use a time object to explicitly set them.\n\n![Set tweet interval options](https://user-images.githubusercontent.com/68404335/143306008-907e046a-a682-4b90-83b0-dc6428e3a031.png)\n\n| Option      | Description                              | Value Type      |\n| ----------- | ---------------------------------------- | --------------- |\n| **hours**   | Time interval in hours between tweets.   | Positive number |\n| **minutes** | Time interval in minutes between tweets. | Positive number |\n| **seconds** | Time interval in seconds between tweets. | Positive number |\n\n\u003e As shown in the [first example](#twitter-crypto-bot) you can also use just a number instead of an object and it will be considered as minutes.\n\u003e\n\u003e E.g. `bot.setTweetInterval(15)` is the same as `bot.setTweetInterval({ minutes: 15 })`\n\n## 💖 Support the project\n\nIf you like what we do and want to encourage us to continue creating stuff, starring and sharing this project would be really appreciated! Also, if you want to support us a little bit more, you can [buy us a coffe](https://www.buymeacoffee.com/pamboo), or make a BTC tip to the following address: `1E6ZBxA8c32YwJxiWW4ohvm9oVYqqWh5tU`\n\n[![Buy us a coffe](https://user-images.githubusercontent.com/64804554/143627395-6e441486-8efc-47cd-b40a-f3bb9ef777ee.png)](https://www.buymeacoffee.com/pamboo)\n\n## ✨ Contributing\n\nContributions are more than welcome!\n\nWe think that you might have great ideas to make this project even better, so if you do, please create a pull request and/or issue following our [contribution guidelines](./docs/CONTRIBUTING.md).\n\n## 😃 Authors\n\n-   [Totigm](https://github.com/totigm)\n-   [Hernancano98](https://github.com/Hernancano98)\n\n## 📄 License\n\n[MIT](./LICENSE)\n\n\u003chr /\u003e\n\nThis project was made with ❤ and TypeScript\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotigm%2Ftwitter-crypto-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotigm%2Ftwitter-crypto-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotigm%2Ftwitter-crypto-bot/lists"}