ccxt check for swap or spot by LEVERAGE

This commit is contained in:
olli 2024-03-26 15:07:40 +01:00
parent 9d86a49616
commit 3913db9854

View File

@ -19,7 +19,7 @@ function f_ccxt {
sleep 0.5
local f_exchange_type="swap"
[ -z "$LEVERAGE" ] && f_exchange_type="spot"
g_python "exchange = ccxt.${STOCK_EXCHANGE,,}({'apiKey': '${API_KEY}','secret': '${API_SECRET}','options': {'defaultType': 'swap',},})" || return 1
g_python "exchange = ccxt.${STOCK_EXCHANGE,,}({'apiKey': '${API_KEY}','secret': '${API_SECRET}','options': {'defaultType': '${f_exchange_type}',},})" || return 1
f_ccxt_initialized=true
fi