Skip to content

A simple telegram bot for fetching price information about currencies at CoinMarketCap.

License

Notifications You must be signed in to change notification settings

zerocurrencycoin/CMC-bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmbot

Build Status codecov

A simple telegram bot written in Kotlin, for fetching price information about crypto currencies from CoinMarketCap.

Alt text

You can browse all currencies on CoinMarketCap through Inline Queries. Just call the bot by its username and a query in the text input field. For example: @PriceLeechBot eth.

Select a result and you'll get the most important information as a rendered image via Telegram.

You can try it out here.

Commands

Command Usage Description
/coin /coin eth Request price details about a coin
/help /help Displays the help
/start /start Displays the welcome message

Installation

In order to run the bot on your own machine, you have to set your telegram bot api token as an environment variable:

$ export CMBOT_TELEGRAM_TOKEN=YOUR_API_KEY

Download the latest jar release and run the following command:

$ java -jar cmbot-<version>.jar

Build from Source

$ git clone https://github.com/yashino91/cmbot.git
$ cd cmbot/
$ mvn assembly:assembly

Run application using Docker

$ docker build -t cmbot .
$ docker run -e "CMBOT_TELEGRAM_TOKEN=YOUR_API_KEY" cmbot

Run application without Docker

$ java -jar target/cmbot-<version>.jar

Configuration

The configuration is done in the config.yaml file, located in the resource directory.

Key Value
botName Name of your Telegram Bot
allowedCurrencySlugs Array of currency slugs that are allowed to request. If empty every currency is allowed
autoclearMessages Deletes sent photo messages automatically if enabled
autoclearMessagesDurationSec Number in seconds after sent photo messages should be deleted

Contributing

Use the issue tracker to report problems, suggestions and questions. You may also contribute by submitting pull requests.

If you find this project helpful, please consider making a donation:

  • ETH: 0x00bC09660B16AA7614A77313a9D9d0643C47555c
  • BTC: 1JFgCTawZDcar9qd6XAAqR9iEWAFRji9tT

About

A simple telegram bot for fetching price information about currencies at CoinMarketCap.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 90.7%
  • HTML 9.0%
  • Dockerfile 0.3%