Skip to content

giuseppetrivi/crypto-notification-telegram-bot

Repository files navigation

🪙 crypto-notification-telegram-bot

❓ What is this project

cryptonotificationbot2

 

The scope of this Telegram bot is to be updated about the prices of the cryptocurrencies of your interest periodically (every 30 minutes, for example). Every user can set a personal time interval and can set the cryptocurrencies to be updated on from those which are into the database (into the table cryn_cryptocurrencies). You can also choose to get the silent notifications and you can get into the bot the latest update about your selected cryptocurrencies (so as not to wait for the automatic notification).

You can try this bot hosted by me: @CryptosNotification_bot


📚 Libraries and services used

I used composer to get the following PHP libraries:

  • telegram-bot-sdk: to have an interface for the Telegram Bot API calls
  • meekrodb : to have a set of function to make simple and secure database calls

To get info about cryptocurrencies state i used the API of Coinmarket.


🛠️ How to adapt this to your own server

  1. You need your Telegram bot API token, your CoinmarketAPI token, database infos (username, password, hostname and database name).
  2. You have to upload the file config/crypto_notification_db.sql into your server's database.
  3. You have to modify the fields into config/config.json file.
  4. You have to set the webhook of the bot (by the setWebhook Telegram bot API call) and (eventually) insert a record into the cryn_users table with your data, so you can use it.
  5. You need to set a cronjob on the file cronjob_update.php every 5 minutes (there are a lot of services to set your cronjobs online) to get the updates.

About

Telegram Bot developed in PHP to get periodic notification about cryptocurrencies of your interest and see some useful informations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages