Skip to content

Commit

Permalink
fix: update bingx format_trading_rule has multiple -
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Nov 20, 2024
1 parent 0568c53 commit 5cfa54a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions hummingbot/connector/exchange/bing_x/bing_x_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,14 @@ async def _format_trading_rules(self, exchange_info_dict: Dict[str, Any]) -> Lis
max_notional_size = rule.get("maxNotional")
min_order_size = rule.get("minQty")
max_order_size = rule.get("maxQty")

retval.append(
TradingRule(trading_pair,
min_order_size=Decimal(min_order_size),
max_order_size=Decimal(max_order_size),
min_price_increment=Decimal(min_price_increment),
min_base_amount_increment=Decimal(min_base_amount_increment),
min_notional_size=Decimal(min_notional_size)))
if (trading_pair.count('-') == 1):
retval.append(
TradingRule(trading_pair,
min_order_size=Decimal(min_order_size),
max_order_size=Decimal(max_order_size),
min_price_increment=Decimal(min_price_increment),
min_base_amount_increment=Decimal(min_base_amount_increment),
min_notional_size=Decimal(min_notional_size)))

except Exception:
self.logger().exception(f"Error parsing the trading pair rule {rule.get('name')}. Skipping.")
Expand Down

0 comments on commit 5cfa54a

Please sign in to comment.