Fix opportunity ignore_dust handling
This commit is contained in:
@@ -93,3 +93,14 @@ class AccountMarketServicesTestCase(unittest.TestCase):
|
||||
|
||||
universe = market_service.get_scan_universe(config, spot_client=FakeSpotClient())
|
||||
self.assertEqual([item["symbol"] for item in universe], ["BTCUSDT", "ETHUSDT"])
|
||||
|
||||
def test_get_positions_can_include_dust(self):
|
||||
config = {
|
||||
"market": {"default_quote": "USDT"},
|
||||
"trading": {"dust_usdt_threshold": 10.0},
|
||||
}
|
||||
ignored = account_service.get_positions(config, spot_client=FakeSpotClient())
|
||||
included = account_service.get_positions(config, spot_client=FakeSpotClient(), ignore_dust=False)
|
||||
|
||||
self.assertEqual([item["symbol"] for item in ignored["positions"]], ["USDT", "BTCUSDT"])
|
||||
self.assertEqual([item["symbol"] for item in included["positions"]], ["USDT", "BTCUSDT", "DOGEUSDT"])
|
||||
|
||||
Reference in New Issue
Block a user