DogsTailFarmer/exchanges-wrapper

View on GitHub

Showing 3 of 6 total issues

Consider simplifying this complex logical expression.
Open

        if self.exchange == 'bybit' and payload:
            if payload.get('retCode') == 0:
                return payload.get('result'), payload.get('time')
            elif payload.get('retCode') == 10002:
                raise ExchangeError(ERR_TIMESTAMP_OUTSIDE_RECV_WINDOW)
Severity: Critical
Found in exchanges_wrapper/http_client.py - About 2 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                if _data := msg_data.get('data'):
                    if ch_type == 'depth5':
                        if msg_data["type"] == 'snapshot' or _data["u"] == 1:
                            self._order_book = bbt.OrderBook(_data)
                    elif ch_type == 'miniTicker':
    Severity: Major
    Found in exchanges_wrapper/web_sockets.py - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                  if (not ch_type and
                          msg_data.get('arg', {}).get('channel') in ('account', 'orders', 'balance_and_position')
                          and msg_data.get('data')):
                      await self._handle_event(msg_data)
                  elif ch_type and msg_data.get('data'):
      Severity: Major
      Found in exchanges_wrapper/web_sockets.py - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language