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.javaand 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
coingeckopackage. - There is
AppConfigurationclass. It represents configuration for application. - All the communications of a bot work through classes in
controllerspackage. Each class work mostly with one model and designed for processing user requests, sending messages and saving data in database. daopackage classes represent data access objects for each model. Note that there is nowatchlistmodel, but there isWatchlistDaoclass, designed to save watchlist information for users.- There is
Menuclass inmenupackage. It represents menu layout. modelspackage is designed for all the models that are used.sessionspackage contains classes to save user sessions for polling.BlockTrackerclass represents bot itself.- There is
PrintFormatterclass inutilpackage, 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
๐ Pricebutton. 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 transactionand 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