get FEE dynamically

This commit is contained in:
olli 2023-06-23 15:20:19 +02:00
parent 3c218d9450
commit 2cbc884aae

View File

@ -25,6 +25,10 @@ function binance_convert {
return 1
fi
# get trade commission for comparison with convert
binance-api-call GET /sapi/v1/asset/tradeFee "&symbol=${f_ASSET}${f_QUANTITY}"
local FEE=$(echo "$(cat $g_tmp/API_CMD_OUT | jq -r .[].takerCommission)*100" | bc -l)
if [ "${f_ACTION}" = "buy" ]
then
# check for enough balance for trade