get FEE dynamically fix
This commit is contained in:
parent
2cbc884aae
commit
048dfd2a18
@ -26,7 +26,7 @@ function binance_convert {
|
||||
fi
|
||||
|
||||
# get trade commission for comparison with convert
|
||||
binance-api-call GET /sapi/v1/asset/tradeFee "&symbol=${f_ASSET}${f_QUANTITY}"
|
||||
binance-api-call GET /sapi/v1/asset/tradeFee "&symbol=${f_ASSET}${f_CURRENCY}"
|
||||
local FEE=$(echo "$(cat $g_tmp/API_CMD_OUT | jq -r .[].takerCommission)*100" | bc -l)
|
||||
|
||||
if [ "${f_ACTION}" = "buy" ]
|
||||
@ -68,6 +68,7 @@ ${FUNCNAME} $@"
|
||||
g_signal-notify "$f_note"
|
||||
return 1
|
||||
fi
|
||||
g_echo_note "Price difference between Market Price (${f_market_price}) and Binance Convert Price (${f_convert_price}) is lower then Trading Fee (${f_price_diff} > ${FEE}), so I will use convert"
|
||||
|
||||
echo "cat ${g_tmp}/API_CMD_OUT >${f_CMDFILE}_QUOTE_OUT
|
||||
local f_quoteid=\$(cat ${g_tmp}/API_CMD_OUT | jq -r '.quoteId')
|
||||
|
Loading…
Reference in New Issue
Block a user