fix marketCC
This commit is contained in:
parent
cd55084d54
commit
e1a4bb4a46
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user