diff --git a/bsx/placeorders/placeorders.sh b/bsx/placeorders/placeorders.sh index e8c12b9..90382ff 100755 --- a/bsx/placeorders/placeorders.sh +++ b/bsx/placeorders/placeorders.sh @@ -1,7 +1,7 @@ #!/bin/bash ############################ ########################### -#set -x +set -x PORT=12700 # BasicSwapDex http port # config file location @@ -295,9 +295,10 @@ check_bids() { revert_config apply_config FOUNDBID=$(python3 createoffers.py --configfile $taker --statefile $state --port=$PORT --oneshot --debug | grep "New bid") + POSTOFFER=$(python3 -c "print($OB_AMOUNT < $OB_MIN)") if [[ $FOUNDBID ]]; then $grn"Placed bid successfully! Check BasicSwapDEX to confirm\n";$nc - elif [[ $OB_AMOUNT < $OB_MIN && -z $FOUNDBID ]]; then + elif [[ $POSTOFFER == True ]] && [[ -z $FOUNDBID ]]; then printf "Checking for a matching offer\n" printf "No matching offers found $red2:@ !!!$nc2\nBid quantity too$red2 low$nc2 to post to order book.\nTrying again in 30 seconds\n" sleep 30