fix: dont run exchnage specific functions if STOCK_EXCHANGE is NONE
This commit is contained in:
parent
ae99194986
commit
ad6f641c8c
@ -98,11 +98,6 @@ do
|
||||
## watch some manual defined assets
|
||||
watch_assets
|
||||
|
||||
|
||||
## if STOCK_EXCHANGE is present
|
||||
if [ "${STOCK_EXCHANGE}" != "NONE" ]
|
||||
then
|
||||
|
||||
# stock data
|
||||
if [ "${STOCK_EXCHANGE}" = "BINANCE" ]
|
||||
then
|
||||
@ -114,6 +109,9 @@ do
|
||||
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\\\"}\""'
|
||||
else
|
||||
## stop here if STOCK_EXCHANGE not present
|
||||
continue
|
||||
fi
|
||||
|
||||
# Get current assets
|
||||
@ -128,8 +126,6 @@ do
|
||||
# Buy something?
|
||||
[ ${FULL_LOOP} = 1 ] && check_for_buy
|
||||
|
||||
fi
|
||||
|
||||
## Update webpage
|
||||
if jobs | egrep -q "Running.+webpage" && [ ${FULL_LOOP} = 1 ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user