python ccxt

This commit is contained in:
olli 2024-03-26 16:54:14 +01:00
parent c46175c24b
commit f204f2f2ac
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ do
check_for_sell
# Get current balances
[ ${FULL_LOOP} = 1 ] && get_ccxt_balances || continue
get_ccxt_balances
[ ${FULL_LOOP} = 1 ] && get_balances || continue
# Buy something?

View File

@ -18,10 +18,10 @@ function f_ccxt {
g_python 'import sys' || return 1
g_python 'sys.path.append("/ccxt/python")' || return 1
g_python 'import ccxt' || return 1
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': '${f_exchange_type}',},})" || return 1
sleep 5
f_ccxt_initialized=true
fi