Instantiate a new DynamicOrderState from a dict (generally from loading
        a JSON response). The data used to instantiate the DynamicOrderState is
        a shallow copy of the dict passed in, with any complex child types
        instantiated appropriately.

def from_dict(data, ctx):
        """
        Instantiate a new DynamicOrderState from a dict (generally from loading
        a JSON response). The data used to instantiate the DynamicOrderState is
        a shallow copy of the dict passed in, with any complex child types
        instantiated appropriately.
        """

        data = data.copy()

        if data.get('trailingStopValue') is not None:
            data['trailingStopValue'] = ctx.convert_decimal_number(
                data.get('trailingStopValue')
            )

        if data.get('triggerDistance') is not None:
            data['triggerDistance'] = ctx.convert_decimal_number(
                data.get('triggerDistance')
            )

        return DynamicOrderState(**data)