This is a telegram bot to monitor some aspects of THORChain. It can also generate liquidity pool reports for you. Like this:
/start
– run the bot
/price
– Rune's price
To do: describe the rest of commands.
Inline command @bot ADDRESS POOL
to make a LP card for ADDRESS providing liquidity to POOL, POOL may not be exact but
short like BTC or TOKEN-0x443.
- Clone this repo
- Install Docker and Docker Compose
- Copy
example.env
to.env
- Edit
REDIS_PASSWORD
in.env
- Copy
example_config.yaml
toconfig.yaml
- Edit there the parameter:
telegram.bot.token
(get it from @BotFather) - Edit there
telegram.channels.name
(your bot must be admin for that channel!) - Run
make start
and wait until the bot is build and run inside Docker
In brief:
cp example.env .env
nano .env
cp example_config.yaml config.yaml
nano config.yaml
make start
- For deep performance profiling
pip install line-profiler-pycharm
- Run DB server locally:
cd redis-data
redis-server
- If you cannot debug on Python 3.10+, try uninstalling uvloop package
pip uninstall uvloop
. It helped me. - If you use PyCharm, please mark directory "app" as a source root.
- If you experience problems with Redis, try to run analytics script and clean the database if it is too heavy.
make attach
PYTHONPATH="/app" python tools/redis_analytics.py /config/config.yaml
PYTHONPATH="/app" python tools/cleanup_tx_db.py /config/config.yaml
cleanup_tx_db script will remove all transactions older than 30 days.