Welcome to the Swiss Army knife for crypto! OpenCryptoBot is an open source Telegram bot written in Python and you can add this bot directly or add him by searching for user @OpenCryptoBot on Telegram.
If you are interested in news regarding this bot or want more indept explanations for all available commands, please visit the homepage.
This Python script is a polling based Telegram bot. Webhook mode is implemented but untested.
restart
and shutdown
price
command for now)This part is only relevant if you want to host this bot yourself. If you just want to use the bot, add user @OpenCryptoBot to your Telegram contacts.
Before starting up the bot you have to take care of some settings and add some API tokens. All configuration files or token files are located in the conf
folder.
This file holds the configuration for the bot. You have to at least edit the value for __admin_id__. Every else setting is optional.
true
then a new database file (SQLite) will be generated on first start and every usage of the bot will be recorded in this database. If false
, no database will be used.true
then a rate limit for users will be activated so that only a specific number of requests in a specific timeframe are possible. If false
then rate limit functionality will be disabled.true
then the rate limit will be per command. If false
then it doesn't matter which command you used. If you exceed the limit you can't issue any API calls anymore until the timeframe is over.null
then caching is disabled and every API call will reach the API provider. It's highly recommanded to enabled caching. The timeframe to refresh the cache can be specified in seconds s
or minutes m
or hours h
or days d
. Example: 6h
.s
or minutes m
or hours h
or days d
. Example: 1d
. To disable update checks, enter null
.This file holds the Telegram bot token. You have to provide one and you will get it in a conversation with Telegram user @BotFather while registering your bot.
This file is optional and only needed if you use the news
plugin. News are requested from http://cryptopanic.com and thus you have to register an account there and get you API token and enter it in here.
In order to run the bot you need to execute some Python code. If you don't have any idea where to host the bot, take a look at Where to host Telegram Bots. But services like Heroku (free) will work fine too. You can also run the script locally on your own computer for testing purposes.
You have to use at least Python 3.7 to execute the scripts. Everything else is not supported.
Pipfile
Install all needed Python modules automatically with Pipenv. You have to be in the root folder of the bot - on the same level as the Pipfile
:
pipenv install
requirements.txt
This is an alternative way to install all needed Python modules. If done this way, every installed module will be available for every other Python script you run. Installing modules globally is only recommanded if you know what you are doing:
requirements.txt
from Pipfile
pipenv lock -r
pip3 install -r requirements.txt
orca
After you installed the modules, you also have to install orca if you want to use the candlestick
plugin or the chart
plugin (because Plotly is used to generate the static charts and orca
is a dependency for static image generation under Plotly). For more info check out Plotly Static Image Export
If you get error xvfb-run: error:Xvfb failed to start
please execute:
xvfb-run -a /path/to/orca "$@"
run.sh
executable withchmod +x run.sh
Pipfile
you have to execute the following in the root folder of the bot:pipenv run ./run.sh &
If you installed the modules globally:
./run.sh &
The recommanded way to stop the bot is the bot command /shutdown
. If you don't want or can't use this, you can shut the bot down with:
pkill python3.7
which will kill every Python 3.7 process that is currently running.
If you configured the bot correctly and execute it, the bot will check for updates (if enabled in config.json
) and notify you if a new release is available. Please ignore the update if you purposely downloaded the newest version from the master
branch because the bot will only notify you about releases. And in this case the release will be older then the current version from the master
branch.
/c - Chart with price and volume
/cs - Candlestick chart for coin
/51 - PoW 51% attack cost
/ath - All time high price for coin
/best - Best movers for hour or day
/ch - Price change over time
/ico - ICO info for coin
/p - Coin price
/roi - Return on Investment for a coin
/s - Price, market cap and volume
/v - Value of coin quantity
/worst - Worst movers for hour or day
/comp - Compare coins
/de - Show decentralization info
/des - Coin description
/dev - Development information
/ex - Exchange details and toplist
/g - Global crypto data
/i - General coin information
/m - Find exchanges to trade a coin
/pe - Info about person from a team
/re - Repeat any command periodically
/se - Search for symbol by coin name
/t - Info about team behind a coin
/top - List top 30 coins
/tr - Google Trends - Interest Over Time
/wp - Find whitepaper for a coin
/ev - Show crypto events
/n - News about a coin
/soc - Social media details
/tw - Latest Tweets from Twitter
/po - Info about mining pools
/wa - Details about wallets
/about - Information about bot
/bpmn - BPMN diagram for a command
/feedback - Send us your feedback
/man - Show how to use a command
/re - Repeat any command periodically
If you want to show a list of available commands as you type, open a chat with Telegram user @BotFather and send the command /setcommands
. Then choose the bot you want to activate the list for and after that send the list of commands with description. Something like this:
51 - PoW 51% attack cost
about - Information about bot
ath - All time high price for coin
best - Best movers for hour or day
bpmn - BPMN diagram for a command
c - Chart with price and volume
ch - Price change over time
comp - Compare coins
cs - Candlestick chart for coin
de - Show decentralization info
des - Coin description
dev - Development information
ev - Show crypto events
ex - Exchange details and toplist
feedback - Send us your feedback
g - Global crypto data
h - Show overview of all commands
i - General coin information
ico - ICO info for coin
m - Find exchanges to trade a coin
man - Show how to use a command
mc - Market capitalization
n - News about a coin
p - Coin price
pe - Info about person from a team
po - Info about mining pools
re - Repeat any command periodically
roi - Return on Investment for a coin
s - Price, market cap and volume
se - Search for symbol by coin name
soc - Social media details
t - Info about team behind a coin
top - List top 30 coins
tr - Google Trends - Interest Over Time
tw - Get newest tweets for coin
v - Value of coin quantity
vol - Volume for a coin
wa - Details about wallets
worst - Worst movers for hour or day
wp - Find whitepaper for a coin
I am actively developing this bot and will do so also in the near future. If you would like to help out with development, send a message via Telegram to @endogen or open an issue here at GitHub.
I use this bot personally to check the current state of some coins but since all the data is relying on external APIs, i can't guarantee that all informations are correct. Please use with caution. I can't be held responsible for anything!
If you find OpenCryptoBot suitable for your needs, please consider donating whatever amount you like to:
1EoBYmfdJznJ21v8Uiiv44iJ2sDb6Bsqc1
qzken7mgslv0w9t4ycj4uganv66ljccsq5ngcepp6h
0x15c3dB6f0f3cC3A187Cfa4b20605293a08b9Be46
42eSjjHF63P3LtxcdeC71TT3ZCcGbTtk1aESTvfrz4VqYeKMFP9tbWhjmcUJZE3yVrgDjH8uZhnob9czCtm764cFDWYPe7c
If you can't or don't want to donate, please consider signing up on listed exchanges below. They are really good and by using these links to register an account i get a share of the trading-fee that you pay to the exchange if you execute a trade.