Skip to content

Instantly share code, notes, and snippets.

@Lamz0rNewb
Last active June 3, 2016 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lamz0rNewb/f4e5f35baae1bfba90d88aa4c7f9b573 to your computer and use it in GitHub Desktop.
Save Lamz0rNewb/f4e5f35baae1bfba90d88aa4c7f9b573 to your computer and use it in GitHub Desktop.
NuBot status of masterOfDisaster operations
!/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