This is a Twitter bot that tweets about cryptocurrencies prices every certain amount of minutes
MIT License
This bot tweets about the price variations of any cryptocurrency every certain time interval.
Every coin listed in Binance are supported.
Prices' data is retrieved from the Binance API.
Tweets generated by the bot look like this:
You can achieve this with just one line of code! Simply choose a coin, a time interval between tweets, and that's it!
Node.js: You need to have Node.js installed on your computer to run this bot. You can download it here.
Twitter account: This is just a normal Twitter account. You can create one here.
Twitter developer account: Log in with your Twitter account and apply for a developer one here.
RapidAPI account: If you don't have one already, you can create one here.
x-rapidapi-key
key from the code snippet that you can find in the API page. If you are having trouble finding the RapidAPI key, watch this video..env
at the repo's root directory and paste the keys from the previous steps in it (It should look like .env.example
).yarn
or npm i
to install the project's dependencies.index.ts
file and choose the cryptocurrency you want, you can also change the time between tweets. Go to the ⚙️ Bot options section to see how to customize your bot.yarn start
or npm start
and your bot will start running!Your bot can be customized if you want it to have a different behaviour. The options that it supports right now are:
When 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.
Option | Description | Value Type |
---|---|---|
hours | Time interval in hours between tweets. | Positive number |
minutes | Time interval in minutes between tweets. | Positive number |
seconds | Time interval in seconds between tweets. | Positive number |
As shown in the first example you can also use just a number instead of an object and it will be considered as minutes.
E.g.
bot.setTweetInterval(15)
is the same asbot.setTweetInterval({ minutes: 15 })
If 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, or make a BTC tip to the following address: 1E6ZBxA8c32YwJxiWW4ohvm9oVYqqWh5tU
Contributions are more than welcome!
We 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.
This project was made with ❤ and TypeScript