This commit is contained in:
olli 2024-07-30 14:22:54 +02:00
parent f9d4f7d8ed
commit 5be7a95869

View File

@ -34,6 +34,11 @@ function f_ccxt {
local f_exchange_type="swap"
[ -z "$LEVERAGE" ] && f_exchange_type="spot"
g_python "${STOCK_EXCHANGE} = ccxt.${STOCK_EXCHANGE}({'apiKey': '${API_KEY}','secret': '${API_SECRET}','enableRateLimit': True,'options': {'defaultType': '${f_exchange_type}',},})" || return 1
if [[ $TESTNET = true ]]
then
g_echo_note "ATTENTION: RUNNING IN TESTNET/SIMULATION/MOCK MODE OF EXCHANGE ${STOCK_EXCHANGE}!!!"
g_python "exchange.set_sandbox_mode(True)" || return 1
fi
g_python "${STOCK_EXCHANGE}markets=${STOCK_EXCHANGE}.load_markets()" || return 1
f_ccxt_initialized="${f_ccxt_initialized}${STOCK_EXCHANGE},"
fi