|
|
|
|
@ -65,6 +65,7 @@ def test_sync_wallet_at_boot(mocker, default_conf):
|
|
|
|
|
assert freqtrade.wallets.get_free("GAS") == 0.270739
|
|
|
|
|
assert freqtrade.wallets.get_used("GAS") == 0.1
|
|
|
|
|
assert freqtrade.wallets.get_total("GAS") == 0.260439
|
|
|
|
|
assert freqtrade.wallets.get_owned("GAS/USDT", "GAS") == 0.260439
|
|
|
|
|
update_mock = mocker.patch("freqtrade.wallets.Wallets._update_live")
|
|
|
|
|
freqtrade.wallets.update(False)
|
|
|
|
|
assert update_mock.call_count == 0
|
|
|
|
|
@ -74,6 +75,7 @@ def test_sync_wallet_at_boot(mocker, default_conf):
|
|
|
|
|
assert freqtrade.wallets.get_free("NOCURRENCY") == 0
|
|
|
|
|
assert freqtrade.wallets.get_used("NOCURRENCY") == 0
|
|
|
|
|
assert freqtrade.wallets.get_total("NOCURRENCY") == 0
|
|
|
|
|
assert freqtrade.wallets.get_owned("NOCURRENCY/USDT", "NOCURRENCY") == 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_sync_wallet_missing_data(mocker, default_conf):
|
|
|
|
|
@ -336,6 +338,8 @@ def test_sync_wallet_futures_live(mocker, default_conf):
|
|
|
|
|
assert "USDT" in freqtrade.wallets._wallets
|
|
|
|
|
assert "ETH/USDT:USDT" in freqtrade.wallets._positions
|
|
|
|
|
assert freqtrade.wallets._last_wallet_refresh is not None
|
|
|
|
|
assert freqtrade.wallets.get_owned("ETH/USDT:USDT", "ETH") == 1000
|
|
|
|
|
assert freqtrade.wallets.get_owned("SOL/USDT:USDT", "SOL") == 0
|
|
|
|
|
|
|
|
|
|
# Remove ETH/USDT:USDT position
|
|
|
|
|
del mock_result[0]
|
|
|
|
|
|