code: def total_exchange_balances(services=None, verbose=None, timeout=None, by_service=False):
      
      balances = defaultdict(lambda: 0)
      if not services:
          services = [
              x(verbose=verbose, timeout=timeout)
              for x in ExchangeUniverse.get_authenticated_services()
          ]
  
      for e in services:
          try:
              more_balances = e.get_total_exchange_balances()
              if by_service:
                  balances[e.__class__] = more_balances
              else:
                  for code, bal in more_balances.items():
                      balances[code] += bal
          except NotImplementedError:
              if verbose:
                  print(e.name, "total balance not implemented")
          except Exception as exc:
              if verbose:
                  print(e.name, "failed:", exc.__class__.__name__, str(exc))
  
      return balances
docs: Returns all balances for all currencies for all exchanges