mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2024-12-22 11:39:21 +00:00
placeorders: use python to check offer size
This commit is contained in:
parent
98da79699c
commit
0255ac8bc6
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue