From 5be7a95869462957997179400e42c573fcd41f73 Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 30 Jul 2024 14:22:54 +0200 Subject: [PATCH] testnet --- dabo/functions/ccxt.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dabo/functions/ccxt.sh b/dabo/functions/ccxt.sh index abffe3f..8d9dfb3 100644 --- a/dabo/functions/ccxt.sh +++ b/dabo/functions/ccxt.sh @@ -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