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