mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2025-03-12 09:27:58 +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
|
#!/bin/bash
|
||||||
############################
|
############################
|
||||||
###########################
|
###########################
|
||||||
#set -x
|
set -x
|
||||||
PORT=12700 # BasicSwapDex http port
|
PORT=12700 # BasicSwapDex http port
|
||||||
|
|
||||||
# config file location
|
# config file location
|
||||||
|
@ -295,9 +295,10 @@ check_bids() {
|
||||||
revert_config
|
revert_config
|
||||||
apply_config
|
apply_config
|
||||||
FOUNDBID=$(python3 createoffers.py --configfile $taker --statefile $state --port=$PORT --oneshot --debug | grep "New bid")
|
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
|
if [[ $FOUNDBID ]]; then
|
||||||
$grn"Placed bid successfully! Check BasicSwapDEX to confirm\n";$nc
|
$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 "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"
|
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
|
sleep 30
|
||||||
|
|
Loading…
Reference in a new issue