Restrict trading pairs with too low precision

closes #6606
This commit is contained in:
Matthias 2022-04-25 09:49:51 +02:00
parent 86b3aac9ba
commit 7b02114ad2

View File

@ -369,6 +369,9 @@ class Exchange:
return (
market.get('quote', None) is not None
and market.get('base', None) is not None
and (self.precisionMode != TICK_SIZE
# Too low precision will falsify calculations
or market.get('precision', {}).get('price', None) > 1e-11)
and ((self.trading_mode == TradingMode.SPOT and self.market_is_spot(market))
or (self.trading_mode == TradingMode.MARGIN and self.market_is_margin(market))
or (self.trading_mode == TradingMode.FUTURES and self.market_is_future(market)))