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

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

        data = data.copy()

        if data.get('ordersCreated') is not None:
            data['ordersCreated'] = [
                ctx.order.Order.from_dict(d, ctx)
                for d in data.get('ordersCreated')
            ]

        if data.get('ordersCancelled') is not None:
            data['ordersCancelled'] = [
                ctx.order.Order.from_dict(d, ctx)
                for d in data.get('ordersCancelled')
            ]

        if data.get('ordersFilled') is not None:
            data['ordersFilled'] = [
                ctx.order.Order.from_dict(d, ctx)
                for d in data.get('ordersFilled')
            ]

        if data.get('ordersTriggered') is not None:
            data['ordersTriggered'] = [
                ctx.order.Order.from_dict(d, ctx)
                for d in data.get('ordersTriggered')
            ]

        if data.get('tradesOpened') is not None:
            data['tradesOpened'] = [
                ctx.trade.TradeSummary.from_dict(d, ctx)
                for d in data.get('tradesOpened')
            ]

        if data.get('tradesReduced') is not None:
            data['tradesReduced'] = [
                ctx.trade.TradeSummary.from_dict(d, ctx)
                for d in data.get('tradesReduced')
            ]

        if data.get('tradesClosed') is not None:
            data['tradesClosed'] = [
                ctx.trade.TradeSummary.from_dict(d, ctx)
                for d in data.get('tradesClosed')
            ]

        if data.get('positions') is not None:
            data['positions'] = [
                ctx.position.Position.from_dict(d, ctx)
                for d in data.get('positions')
            ]

        if data.get('transactions') is not None:
            data['transactions'] = [
                ctx.transaction.Transaction.from_dict(d, ctx)
                for d in data.get('transactions')
            ]

        return AccountChanges(**data)