code: def from_dict(data, ctx):
          
  
          data = data.copy()
  
          if data.get('price') is not None:
              data['price'] = ctx.convert_decimal_number(
                  data.get('price')
              )
  
          if data.get('clientExtensions') is not None:
              data['clientExtensions'] = \
                  ctx.transaction.ClientExtensions.from_dict(
                      data['clientExtensions'], ctx
                  )
  
          return TakeProfitOrderRequest(**data)
docs: Instantiate a new TakeProfitOrderRequest from a dict (generally from
          loading a JSON response). The data used to instantiate the
          TakeProfitOrderRequest is a shallow copy of the dict passed in, with
          any complex child types instantiated appropriately.