From 9d0e0b388cae8f6da322c8faac457b461c5675cc Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 7 Feb 2024 11:16:18 +0100 Subject: [PATCH] fix: dont run get_assts if STOCK_EXCHANGE= is NONE --- dabo/dabo-bot.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dabo/dabo-bot.sh b/dabo/dabo-bot.sh index 5c094e6..8db39af 100755 --- a/dabo/dabo-bot.sh +++ b/dabo/dabo-bot.sh @@ -82,13 +82,13 @@ do [ -z "${INTERVAL_MIN}" ] && INTERVAL_MIN=1 # stock data - if [ ${STOCK_EXCHANGE} = "BINANCE" ] + if [ "${STOCK_EXCHANGE}" = "BINANCE" ] then # command for current token infos (function for setting var QUANTITY_LOT_CUT TOKEN_INFO_CMD="binance_get_token_info" # command for buying/selling a token TRADE_CMD='binance-api-call POST /api/v3/order "&symbol=TOKEN"eOrderQty=QUANTITY&side=ACTION&type=MARKET"' - elif [ ${STOCK_EXCHANGE} = "BITPANDA" ] + elif [ "${STOCK_EXCHANGE}" = "BITPANDA" ] then TOKEN_INFO_CMD="bitpanda_get_token_info" TRADE_CMD='bitpanda-api-call POST public/v1/account/orders "--header \"Content-Type: application/json\" --data \"{\\\"instrument_code\\\":\\\"TOKEN\\\",\\\"side\\\":\\\"ACTION\\\",\\\"type\\\":\\\"MARKET\\\",\\\"amount\\\":\\\"QUANTITY\\\"}\""' @@ -101,7 +101,7 @@ do watch_assets # Get current assets - if ! [ STOCK_EXCHANGE -eq "NONE" ] + if [ "${STOCK_EXCHANGE}" != "NONE" ] then get_assets || continue fi