Last active
August 9, 2021 07:46
-
-
Save fatherofluqmaan/d421c7f349cbb545432730704fb5b62b to your computer and use it in GitHub Desktop.
A script to run the tracker for each bot I have running in their subsequent directories, grep out just the all time stats and send notification via Telegram using the Notify tool. The reason that the directory is changed to is due to an error I receive when trying to call the bot from a different directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
while true; do | |
clear | |
theDate=$(date +"%Y-%m-%d %T") | |
echo "[+] Bot Stats Tracker running..." | |
echo "Getting stats for bots $theDate" | notify -silent | |
sleep 1 | |
echo "[+] Bot-1 Coinbase stats, sim-run ~16% ETH-EUR" | |
cd coinbase/pycryptobot/ETH-EUR ; python3 pycryptobot.py --stats 2> temp.txt; cat temp.txt | grep -A4 -E '[A-Z]{3} [A-Z]{4} : [A-Z]{3,5}-[A-Z]{3,5}' | notify -silent | |
sleep 3 | |
# echo -e "\n" | |
cd | |
echo "[+] Bot-2 Coinbase stats, sim-run 06/08 ~29% CLV-GBP" | |
cd coinbase/pycryptobot/CLV-GBP ; python3 pycryptobot.py --stats 2> temp.txt; cat temp.txt | grep -A4 -E '[A-Z]{3} [A-Z]{4} : [A-Z]{3,5}-[A-Z]{3,5}' | notify -silent | |
sleep 3 | |
# echo -e "\n" | |
cd | |
echo "[+] Bot-3 Coinbase stats, sim-run 06/08 ~54% ANKR-GBP" | |
cd coinbase/pycryptobot/ANKR-GBP; python3 pycryptobot.py --stats 2> temp.txt; cat temp.txt | grep -A4 -E '[A-Z]{3} [A-Z]{4} : [A-Z]{3,5}-[A-Z]{3,5}' | notify -silent | |
sleep 3 | |
# echo -e "\n" | |
cd | |
echo "[+] Bot-4 Binance stats, sim-run 06/08 ~30% MASK-USDT" | |
cd binance/pycryptobot/MASK-USDT; python3 pycryptobot.py --stats 2> temp.txt; cat temp.txt | grep -A4 -E '[A-Z]{3} [A-Z]{4} : [A-Z]{3,5}-[A-Z]{3,5}' | notify -silent | |
sleep 3 | |
# echo -e "\n" | |
cd | |
echo "[+] Bot-5 Coinbase stats, sim-run 06/08 ~28% DOT-USDT" | |
cd coinbase/pycryptobot/DOT-USDT; python3 pycryptobot.py --stats 2> temp.txt; cat temp.txt | grep -A4 -E '[A-Z]{3} [A-Z]{4} : [A-Z]{3,5}-[A-Z]{3,5}' | notify -silent | |
sleep 3 | |
# echo -e "\n" | |
cd | |
echo "[+] $theDate: Stats updated and notification sent, next update in 30 minutes" | |
echo "Stats update completed $theDate, next update in 30 minutes" | notify -silent | |
sleep 30m | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[+] Bot Stats Tracker running... | |
[+] Bot-1 Coinbase stats, sim-run ~16% ETH-EUR | |
[+] Bot-2 Coinbase stats, sim-run 06/08 ~29% CLV-GBP | |
[+] Bot-3 Coinbase stats, sim-run 06/08 ~54% ANKR-GBP | |
[+] Bot-4 Binance stats, sim-run 06/08 ~30% MASK-USDT | |
[+] Bot-5 Coinbase stats, sim-run 06/08 ~28% DOT-USDT | |
[+] 2021-08-07 15:54:56: Stats updated and notification sent, next update in 30 minutes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment