Only fetch accounts when authenticated.

This commit is contained in:
Matthias
2022-05-07 13:13:26 +02:00
parent 149704e748
commit dc0c1bf87d
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -205,6 +205,7 @@ def test_additional_exchange_init_okx(default_conf, mocker):
'mgnIsoMode': 'automatic',
'posMode': 'long_short_mode',
'uid': '2555'}}])
default_conf['dry_run'] = False
exchange = get_patched_exchange(mocker, default_conf, id="okx", api_mock=api_mock)
assert api_mock.fetch_accounts.call_count == 0
exchange.trading_mode = TradingMode.FUTURES