code: def from_dict(data, ctx):
          
  
          data = data.copy()
  
          if data.get('minimumTradeSize') is not None:
              data['minimumTradeSize'] = ctx.convert_decimal_number(
                  data.get('minimumTradeSize')
              )
  
          if data.get('maximumTrailingStopDistance') is not None:
              data['maximumTrailingStopDistance'] = ctx.convert_decimal_number(
                  data.get('maximumTrailingStopDistance')
              )
  
          if data.get('minimumTrailingStopDistance') is not None:
              data['minimumTrailingStopDistance'] = ctx.convert_decimal_number(
                  data.get('minimumTrailingStopDistance')
              )
  
          if data.get('maximumPositionSize') is not None:
              data['maximumPositionSize'] = ctx.convert_decimal_number(
                  data.get('maximumPositionSize')
              )
  
          if data.get('maximumOrderUnits') is not None:
              data['maximumOrderUnits'] = ctx.convert_decimal_number(
                  data.get('maximumOrderUnits')
              )
  
          if data.get('marginRate') is not None:
              data['marginRate'] = ctx.convert_decimal_number(
                  data.get('marginRate')
              )
  
          if data.get('commission') is not None:
              data['commission'] = \
                  ctx.primitives.InstrumentCommission.from_dict(
                      data['commission'], ctx
                  )
  
          return Instrument(**data)
docs: Instantiate a new Instrument from a dict (generally from loading a JSON
          response). The data used to instantiate the Instrument is a shallow
          copy of the dict passed in, with any complex child types instantiated
          appropriately.