This is a bot for tracking cryptocurrencies prices and portfolios. Here I use free CoinGecko API, so information is only available for top 250 cryptocurrencies.
- Refer to dao classes to create database.
- Go to
src/main/java/org/vitaliistf/AppConfiguration.java
and fill static fields with your database connection information, bot username and token. - Start the application.
- There are classes that represent cache and CoinGecko API connector in
coingecko
package. - There is
AppConfiguration
class. It represents configuration for application. - All the communications of a bot work through classes in
controllers
package. Each class work mostly with one model and designed for processing user requests, sending messages and saving data in database. dao
package classes represent data access objects for each model. Note that there is nowatchlist
model, but there isWatchlistDao
class, designed to save watchlist information for users.- There is
Menu
class inmenu
package. It represents menu layout. models
package is designed for all the models that are used.sessions
package contains classes to save user sessions for polling.BlockTracker
class represents bot itself.- There is
PrintFormatter
class inutil
package, it is designed to format data before sending it to user.
Note that there is keyboard menu designed for this bot. All the commands are used through this menu.
- You can get price for any cryptocurrency by clicking
📈 Price
button. Then you input (case-insensitive) symbol of the coin, and receive the price. The price may be put out in scientific notation for compactness. - You can get your watchlist (
👀 My Watchlist
) and add/remove coins to it. - To get detailed info about coin from your watchlist, type the symbol.
- You can add portfolio for your account. (
💼 Show portfolios
/💼 New portfolio
) - In order to add coin to your portfolio, input
📃 New transaction
and follow instructions. - Then your portfolio will look like this.
- You can watch your transactions. (
📃 Show transactions
) - Actually, there are much more actions that you can do here. Explore yourself: https://t.me/Block_Tracker_bot