Last active
June 3, 2016 12:28
-
-
Save Lamz0rNewb/f4e5f35baae1bfba90d88aa4c7f9b573 to your computer and use it in GitHub Desktop.
NuBot status of masterOfDisaster operations
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
!/bin/bash | |
modGateways="B9gXptkoqAApF3AFrQyhUbhSzvuEudxupt" # mod NuBots - multiple exchanges!; | |
zoroGateways="BJs4YbtaqCmxeHLiR6zzjnZEotYVFAPfMo" # zoro NuBot - currently only Poloniex; | |
timestamp=`date +%s` | |
epochTimeOutset=${timestamp:0:4} # first characters of the epoch timestamp | |
operation1="hitbtc:.*\_$epochTimeOutset" | |
operation2="poloniex:.*\_$epochTimeOutset" | |
operation3="poloniex:.*\_$epochTimeOutset" | |
operation4="poloniex:.*\_$epochTimeOutset" | |
echo "[code]" | |
SID=`nud getliquiditydetails B | grep $modGateways -A 1000 | grep $operation1 | tail -n 1 | awk -F':' '{print $4}' | awk -F'"' '{print $1}'` | |
EXC=`nud getliquiditydetails B | grep $modGateways -A 1000 | grep $operation1 | tail -n 1 | awk -F':' '{print $3}' | awk -F'"' '{print $1}'` | |
echo "status of mOD NuBot session at $EXC:" | |
nud getliquiditydetails B | grep $modGateways -A 400 | grep $SID -A 2 | |
SID=`nud getliquiditydetails B | grep $modGateways -A 400 | grep $operation2 | tail -n 1 | awk -F':' '{print $4}' | awk -F'"' '{print $1}'` | |
EXC=`nud getliquiditydetails B | grep $modGateways -A 400 | grep $operation2 | tail -n 1 | awk -F':' '{print $3}' | awk -F'"' '{print $1}'` | |
echo "status of mOD NuBot session at $EXC:" | |
nud getliquiditydetails B | grep $modGateways -A 400 | grep $SID -A 2 | |
SID=`nud getliquiditydetails B | grep $modGateways -A 400 | grep $operation3 | tail -n 2 | head -n 1 | awk -F':' '{print $4}' | awk -F'"' '{print $1}'` | |
EXC=`nud getliquiditydetails B | grep $modGateways -A 400 | grep $operation3 | tail -n 2 | head -n 1 | awk -F':' '{print $3}' | awk -F'"' '{print $1}'` | |
echo "status of mOD NuBot session at $EXC:" | |
nud getliquiditydetails B | grep $modGateways -A 400 | grep $SID -A 2 | |
SID=`nud getliquiditydetails B | grep $zoroGateways -A 1000 | grep $operation4 | tail -n 1 | awk -F':' '{print $4}' | awk -F'"' '{print $1}'` | |
EXC=`nud getliquiditydetails B | grep $zoroGateways -A 1000 | grep $operation4 | tail -n 1 | awk -F':' '{print $3}' | awk -F'"' '{print $1}'` | |
echo "status of zoro NuBot session at $EXC:" | |
nud getliquiditydetails B | grep $zoroGateways -A 1000 | grep $SID -A 2 | |
echo "[/code]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment