code: def order_to_dict(order):
      
      default = Order()
      return {field: val for field, val in vars(order).items() if val != getattr(default, field, None)}
docs: Convert an IBPy Order object to a dict containing any non-default values.