code: def from_dict(data, ctx):
          
  
          type = data.get("type")
  
          if type == "TAKE_PROFIT":
              return TakeProfitOrder.from_dict(data, ctx)
          if type == "STOP_LOSS":
              return StopLossOrder.from_dict(data, ctx)
          if type == "TRAILING_STOP_LOSS":
              return TrailingStopLossOrder.from_dict(data, ctx)
          if type == "MARKET":
              return MarketOrder.from_dict(data, ctx)
          if type == "FIXED_PRICE":
              return FixedPriceOrder.from_dict(data, ctx)
          if type == "LIMIT":
              return LimitOrder.from_dict(data, ctx)
          if type == "STOP":
              return StopOrder.from_dict(data, ctx)
          if type == "MARKET_IF_TOUCHED":
              return MarketIfTouchedOrder.from_dict(data, ctx)
  
          data = data.copy()
  
          if data.get('clientExtensions') is not None:
              data['clientExtensions'] = \
                  ctx.transaction.ClientExtensions.from_dict(
                      data['clientExtensions'], ctx
                  )
  
          return Order(**data)
docs: Instantiate a new Order from a dict (generally from loading a JSON
          response). The data used to instantiate the Order is a shallow copy of
          the dict passed in, with any complex child types instantiated
          appropriately.