From e1a4bb4a461a93b46a1420ec47b5912ba74eaec9 Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 27 Nov 2024 23:49:09 +0100 Subject: [PATCH] fix marketCC --- dabo/functions/order.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dabo/functions/order.sh b/dabo/functions/order.sh index 401b216..f42b2b1 100644 --- a/dabo/functions/order.sh +++ b/dabo/functions/order.sh @@ -26,7 +26,7 @@ function order { local f_symbol=$1 local f_amount=$2 # amount in $CURRENCY / if crypto_amount:XXX then amount in crypto local f_side=$3 # buy/sell long/short - local f_price=$4 # price for limit order - if not given do market order + local f_price=$4 # price for limit order - if 0 do market order local f_stoploss=$5 local f_takeprofit=$6 local f_params="params={" @@ -44,10 +44,9 @@ function order { [[ $f_side =~ ^buy$|^sell$ ]] || return 1 # check order type limit/market - if [ -z "$f_price" ] + if [[ "$f_price" = "0" ]] then f_type="market" - f_price=0 else f_type="limit" fi