instance_attributes = {'long': 'long', 'short': 'short', 'default': 'default', 'reduceFirst': 'reduce_first',
                       'reduceOnly': 'reduce_only', 'openOnly': 'open_only', 'timestamp': 'timestamp',
                       'bidLiquidityUsed': 'bid_liquidity_used', 'askLiquidityUsed': 'ask_liquidity_used',
                       'steps': 'steps', 'o': 'o', 'h': 'h', 'l': 'l', 'c': 'c', 'orderID': 'order_id',
                       'clientOrderID': 'client_order_id', 'positiveUnits': 'positive_units',
                       'negativeUnits': 'negative_units', 'reason': 'reason', 'instrument': 'instrument',
                       'commission': 'commission', 'unitsTraded': 'units_traded',
                       'minimumCommission': 'minimum_commission', 'price': 'price',
                       'longCountPercent': 'long_count_percent', 'shortCountPercent': 'short_count_percent', 'id': 'id',
                       'trailingStopValue': 'trailing_stop_value', 'triggerDistance': 'trigger_distance',
                       'isTriggerDistanceExact': 'is_trigger_distance_exact', 'netUnrealizedPL': 'net_unrealized_pl',
                       'longUnrealizedPL': 'long_unrealized_pl', 'shortUnrealizedPL': 'short_unrealized_pl',
                       'units': 'units', 'averagePrice': 'average_price', 'tradeIDs': 'trade_i_ds', 'pl': 'pl',
                       'unrealizedPL': 'unrealized_pl', 'resettablePL': 'resettable_pl', 'financing': 'financing',
                       'liquidity': 'liquidity', 'bids': 'bids', 'asks': 'asks', 'closeoutBid': 'closeout_bid',
                       'closeoutAsk': 'closeout_ask', 'type': 'type', 'time': 'time', 'tradeID': 'trade_id',
                       'clientTradeID': 'client_trade_id', 'sourceTransactionID': 'source_transaction_id',
                       'openTradeFinancings': 'open_trade_financings', 'tag': 'tag', 'comment': 'comment',
                       'clientExtensions': 'client_extensions', 'mt4AccountID': 'mt4_account_id', 'tags': 'tags',
                       'bid': 'bid', 'ask': 'ask', 'mid': 'mid', 'volume': 'volume', 'complete': 'complete',
                       'bucketWidth': 'bucket_width', 'buckets': 'buckets', 'createTime': 'create_time',
                       'state': 'state', 'timeInForce': 'time_in_force', 'gtdTime': 'gtd_time',
                       'realizedPL': 'realized_pl', 'distance': 'distance', 'lastTransactionID': 'last_transaction_id',
                       'openTime': 'open_time', 'initialUnits': 'initial_units', 'currentUnits': 'current_units',
                       'averageClosePrice': 'average_close_price', 'closingTransactionIDs': 'closing_transaction_i_ds',
                       'closeTime': 'close_time', 'takeProfitOrderID': 'take_profit_order_id',
                       'stopLossOrderID': 'stop_loss_order_id',
                       'trailingStopLossOrderID': 'trailing_stop_loss_order_id', 'userID': 'user_id',
                       'accountID': 'account_id', 'batchID': 'batch_id', 'requestID': 'request_id',
                       'ordersCreated': 'orders_created', 'ordersCancelled': 'orders_cancelled',
                       'ordersFilled': 'orders_filled', 'ordersTriggered': 'orders_triggered',
                       'tradesOpened': 'trades_opened', 'tradesReduced': 'trades_reduced',
                       'tradesClosed': 'trades_closed', 'positions': 'positions', 'transactions': 'transactions',
                       'name': 'name', 'displayName': 'display_name', 'pipLocation': 'pip_location',
                       'displayPrecision': 'display_precision', 'tradeUnitsPrecision': 'trade_units_precision',
                       'minimumTradeSize': 'minimum_trade_size',
                       'maximumTrailingStopDistance': 'maximum_trailing_stop_distance',
                       'minimumTrailingStopDistance': 'minimum_trailing_stop_distance',
                       'maximumPositionSize': 'maximum_position_size', 'maximumOrderUnits': 'maximum_order_units',
                       'marginRate': 'margin_rate', 'NAV': 'nav', 'marginUsed': 'margin_used',
                       'marginAvailable': 'margin_available', 'positionValue': 'position_value',
                       'marginCloseoutUnrealizedPL': 'margin_closeout_unrealized_pl',
                       'marginCloseoutNAV': 'margin_closeout_nav',
                       'marginCloseoutMarginUsed': 'margin_closeout_margin_used',
                       'marginCloseoutPercent': 'margin_closeout_percent',
                       'marginCloseoutPositionValue': 'margin_closeout_position_value',
                       'withdrawalLimit': 'withdrawal_limit', 'marginCallMarginUsed': 'margin_call_margin_used',
                       'marginCallPercent': 'margin_call_percent', 'orders': 'orders', 'trades': 'trades',
                       'status': 'status', 'tradeable': 'tradeable',
                       'quoteHomeConversionFactors': 'quote_home_conversion_factors',
                       'unitsAvailable': 'units_available', 'extensionNumber': 'extension_number',
                       'triggerCondition': 'trigger_condition', 'divisionID': 'division_id', 'siteID': 'site_id',
                       'accountUserID': 'account_user_id', 'accountNumber': 'account_number',
                       'homeCurrency': 'home_currency', 'alias': 'alias', 'replacedByOrderID': 'replaced_by_order_id',
                       'closedTradeID': 'closed_trade_id', 'tradeCloseTransactionID': 'trade_close_transaction_id',
                       'clientExtensionsModify': 'client_extensions_modify',
                       'tradeClientExtensionsModify': 'trade_client_extensions_modify',
                       'accountBalance': 'account_balance', 'accountFinancingMode': 'account_financing_mode',
                       'positionFinancings': 'position_financings', 'currency': 'currency', 'balance': 'balance',
                       'createdByUserID': 'created_by_user_id', 'createdTime': 'created_time',
                       'resettabledPLTime': 'resettabled_pl_time', 'marginCallEnterTime': 'margin_call_enter_time',
                       'marginCallExtensionCount': 'margin_call_extension_count',
                       'lastMarginCallExtensionTime': 'last_margin_call_extension_time',
                       'openTradeCount': 'open_trade_count', 'openPositionCount': 'open_position_count',
                       'pendingOrderCount': 'pending_order_count', 'hedgingEnabled': 'hedging_enabled',
                       'priceBound': 'price_bound', 'positionFill': 'position_fill',
                       'takeProfitOnFill': 'take_profit_on_fill', 'stopLossOnFill': 'stop_loss_on_fill',
                       'trailingStopLossOnFill': 'trailing_stop_loss_on_fill',
                       'tradeClientExtensions': 'trade_client_extensions',
                       'orderFillTransactionID': 'order_fill_transaction_id', 'replacesOrderID': 'replaces_order_id',
                       'cancellingTransactionID': 'cancelling_transaction_id',
                       'fillingTransactionID': 'filling_transaction_id', 'filledTime': 'filled_time',
                       'tradeOpenedID': 'trade_opened_id', 'tradeReducedID': 'trade_reduced_id',
                       'tradeClosedIDs': 'trade_closed_i_ds', 'cancelledTime': 'cancelled_time',
                       'takeProfitOrder': 'take_profit_order', 'stopLossOrder': 'stop_loss_order',
                       'trailingStopLossOrder': 'trailing_stop_loss_order', 'rejectReason': 'reject_reason',
                       'amount': 'amount', 'fundingReason': 'funding_reason', 'tradeClose': 'trade_close',
                       'longPositionCloseout': 'long_position_closeout',
                       'shortPositionCloseout': 'short_position_closeout', 'marginCloseout': 'margin_closeout',
                       'delayedTradeClose': 'delayed_trade_close', 'initialMarketPrice': 'initial_market_price',
                       'fullPrice': 'full_price', 'tradeOpened': 'trade_opened', 'tradeReduced': 'trade_reduced',
                       'intendedReplacesOrderID': 'intended_replaces_order_id', 'reduce_first': 'reduce_first',
                       'reduce_only': 'reduce_only', 'open_only': 'open_only',
                       'bid_liquidity_used': 'bid_liquidity_used', 'ask_liquidity_used': 'ask_liquidity_used',
                       'order_id': 'order_id', 'client_order_id': 'client_order_id', 'positive_units': 'positive_units',
                       'negative_units': 'negative_units', 'units_traded': 'units_traded',
                       'minimum_commission': 'minimum_commission', 'long_count_percent': 'long_count_percent',
                       'short_count_percent': 'short_count_percent', 'trailing_stop_value': 'trailing_stop_value',
                       'trigger_distance': 'trigger_distance', 'is_trigger_distance_exact': 'is_trigger_distance_exact',
                       'net_unrealized_pl': 'net_unrealized_pl', 'long_unrealized_pl': 'long_unrealized_pl',
                       'short_unrealized_pl': 'short_unrealized_pl', 'average_price': 'average_price',
                       'trade_i_ds': 'trade_i_ds', 'unrealized_pl': 'unrealized_pl', 'resettable_pl': 'resettable_pl',
                       'closeout_bid': 'closeout_bid', 'closeout_ask': 'closeout_ask', 'trade_id': 'trade_id',
                       'client_trade_id': 'client_trade_id', 'source_transaction_id': 'source_transaction_id',
                       'open_trade_financings': 'open_trade_financings', 'client_extensions': 'client_extensions',
                       'mt4_account_id': 'mt4_account_id', 'bucket_width': 'bucket_width', 'create_time': 'create_time',
                       'time_in_force': 'time_in_force', 'gtd_time': 'gtd_time', 'realized_pl': 'realized_pl',
                       'last_transaction_id': 'last_transaction_id', 'open_time': 'open_time',
                       'initial_units': 'initial_units', 'current_units': 'current_units',
                       'average_close_price': 'average_close_price',
                       'closing_transaction_i_ds': 'closing_transaction_i_ds', 'close_time': 'close_time',
                       'take_profit_order_id': 'take_profit_order_id', 'stop_loss_order_id': 'stop_loss_order_id',
                       'trailing_stop_loss_order_id': 'trailing_stop_loss_order_id', 'user_id': 'user_id',
                       'account_id': 'account_id', 'batch_id': 'batch_id', 'request_id': 'request_id',
                       'orders_created': 'orders_created', 'orders_cancelled': 'orders_cancelled',
                       'orders_filled': 'orders_filled', 'orders_triggered': 'orders_triggered',
                       'trades_opened': 'trades_opened', 'trades_reduced': 'trades_reduced',
                       'trades_closed': 'trades_closed', 'display_name': 'display_name', 'pip_location': 'pip_location',
                       'display_precision': 'display_precision', 'trade_units_precision': 'trade_units_precision',
                       'minimum_trade_size': 'minimum_trade_size',
                       'maximum_trailing_stop_distance': 'maximum_trailing_stop_distance',
                       'minimum_trailing_stop_distance': 'minimum_trailing_stop_distance',
                       'maximum_position_size': 'maximum_position_size', 'maximum_order_units': 'maximum_order_units',
                       'margin_rate': 'margin_rate', 'nav': 'nav', 'margin_used': 'margin_used',
                       'margin_available': 'margin_available', 'position_value': 'position_value',
                       'margin_closeout_unrealized_pl': 'margin_closeout_unrealized_pl',
                       'margin_closeout_nav': 'margin_closeout_nav',
                       'margin_closeout_margin_used': 'margin_closeout_margin_used',
                       'margin_closeout_percent': 'margin_closeout_percent',
                       'margin_closeout_position_value': 'margin_closeout_position_value',
                       'withdrawal_limit': 'withdrawal_limit', 'margin_call_margin_used': 'margin_call_margin_used',
                       'margin_call_percent': 'margin_call_percent',
                       'quote_home_conversion_factors': 'quote_home_conversion_factors',
                       'units_available': 'units_available', 'extension_number': 'extension_number',
                       'trigger_condition': 'trigger_condition', 'division_id': 'division_id', 'site_id': 'site_id',
                       'account_user_id': 'account_user_id', 'account_number': 'account_number',
                       'home_currency': 'home_currency', 'replaced_by_order_id': 'replaced_by_order_id',
                       'closed_trade_id': 'closed_trade_id', 'trade_close_transaction_id': 'trade_close_transaction_id',
                       'client_extensions_modify': 'client_extensions_modify',
                       'trade_client_extensions_modify': 'trade_client_extensions_modify',
                       'account_balance': 'account_balance', 'account_financing_mode': 'account_financing_mode',
                       'position_financings': 'position_financings', 'created_by_user_id': 'created_by_user_id',
                       'created_time': 'created_time', 'resettabled_pl_time': 'resettabled_pl_time',
                       'margin_call_enter_time': 'margin_call_enter_time',
                       'margin_call_extension_count': 'margin_call_extension_count',
                       'last_margin_call_extension_time': 'last_margin_call_extension_time',
                       'open_trade_count': 'open_trade_count', 'open_position_count': 'open_position_count',
                       'pending_order_count': 'pending_order_count', 'hedging_enabled': 'hedging_enabled',
                       'price_bound': 'price_bound', 'position_fill': 'position_fill',
                       'take_profit_on_fill': 'take_profit_on_fill', 'stop_loss_on_fill': 'stop_loss_on_fill',
                       'trailing_stop_loss_on_fill': 'trailing_stop_loss_on_fill',
                       'trade_client_extensions': 'trade_client_extensions',
                       'order_fill_transaction_id': 'order_fill_transaction_id',
                       'replaces_order_id': 'replaces_order_id',
                       'cancelling_transaction_id': 'cancelling_transaction_id',
                       'filling_transaction_id': 'filling_transaction_id', 'filled_time': 'filled_time',
                       'trade_opened_id': 'trade_opened_id', 'trade_reduced_id': 'trade_reduced_id',
                       'trade_closed_i_ds': 'trade_closed_i_ds', 'cancelled_time': 'cancelled_time',
                       'take_profit_order': 'take_profit_order', 'stop_loss_order': 'stop_loss_order',
                       'trailing_stop_loss_order': 'trailing_stop_loss_order', 'reject_reason': 'reject_reason',
                       'funding_reason': 'funding_reason', 'trade_close': 'trade_close',
                       'long_position_closeout': 'long_position_closeout',
                       'short_position_closeout': 'short_position_closeout', 'margin_closeout': 'margin_closeout',
                       'delayed_trade_close': 'delayed_trade_close', 'initial_market_price': 'initial_market_price',
                       'full_price': 'full_price', 'trade_opened': 'trade_opened', 'trade_reduced': 'trade_reduced',
                       'intended_replaces_order_id': 'intended_replaces_order_id', 'username': 'username',
                       'country': 'country', 'emailAddress': 'email_address', 'email_address': 'email_address',
                       'FIFO': 'fifo', 'fifo': 'fifo', 'partialFill': 'partial_fill', 'partial_fill': 'partial_fill',
                       'gainQuoteHomeConversionFactor': 'gain_quote_home_conversion_factor',
                       'gain_quote_home_conversion_factor': 'gain_quote_home_conversion_factor',
                       'lossQuoteHomeConversionFactor': 'loss_quote_home_conversion_factor',
                       'loss_quote_home_conversion_factor': 'loss_quote_home_conversion_factor',
                       'guaranteedExecutionFee': 'guaranteed_execution_fee',
                       'guaranteed_execution_fee': 'guaranteed_execution_fee', 'halfSpreadCost': 'half_spread_cost',
                       'half_spread_cost': 'half_spread_cost', 'description': 'description', 'list': 'list',
                       'current-event': 'current_event', 'url': 'url', 'sid': 'sid', 'message': 'message',
                       'informational': 'informational', 'level': 'level', 'image': 'image', 'icon_set': 'icon_set'}

json_attributes = {'long': 'long', 'short': 'short', 'default': 'default', 'reduce_first': 'reduceFirst',
                   'reduce_only': 'reduceOnly', 'open_only': 'openOnly', 'timestamp': 'timestamp',
                   'bid_liquidity_used': 'bidLiquidityUsed', 'ask_liquidity_used': 'askLiquidityUsed', 'steps': 'steps',
                   'o': 'o', 'h': 'h', 'l': 'l', 'c': 'c', 'order_id': 'orderID', 'client_order_id': 'clientOrderID',
                   'positive_units': 'positiveUnits', 'negative_units': 'negativeUnits', 'reason': 'reason',
                   'instrument': 'instrument', 'commission': 'commission', 'units_traded': 'unitsTraded',
                   'minimum_commission': 'minimumCommission', 'price': 'price',
                   'long_count_percent': 'longCountPercent', 'short_count_percent': 'shortCountPercent', 'id': 'id',
                   'trailing_stop_value': 'trailingStopValue', 'trigger_distance': 'triggerDistance',
                   'is_trigger_distance_exact': 'isTriggerDistanceExact', 'net_unrealized_pl': 'netUnrealizedPL',
                   'long_unrealized_pl': 'longUnrealizedPL', 'short_unrealized_pl': 'shortUnrealizedPL',
                   'units': 'units', 'average_price': 'averagePrice', 'trade_i_ds': 'tradeIDs', 'pl': 'pl',
                   'unrealized_pl': 'unrealizedPL', 'resettable_pl': 'resettablePL', 'financing': 'financing',
                   'liquidity': 'liquidity', 'bids': 'bids', 'asks': 'asks', 'closeout_bid': 'closeoutBid',
                   'closeout_ask': 'closeoutAsk', 'type': 'type', 'time': 'time', 'trade_id': 'tradeID',
                   'client_trade_id': 'clientTradeID', 'source_transaction_id': 'sourceTransactionID',
                   'open_trade_financings': 'openTradeFinancings', 'tag': 'tag', 'comment': 'comment',
                   'client_extensions': 'clientExtensions', 'mt4_account_id': 'mt4AccountID', 'tags': 'tags',
                   'bid': 'bid', 'ask': 'ask', 'mid': 'mid', 'volume': 'volume', 'complete': 'complete',
                   'bucket_width': 'bucketWidth', 'buckets': 'buckets', 'create_time': 'createTime', 'state': 'state',
                   'time_in_force': 'timeInForce', 'gtd_time': 'gtdTime', 'realized_pl': 'realizedPL',
                   'distance': 'distance', 'last_transaction_id': 'lastTransactionID', 'open_time': 'openTime',
                   'initial_units': 'initialUnits', 'current_units': 'currentUnits',
                   'average_close_price': 'averageClosePrice', 'closing_transaction_i_ds': 'closingTransactionIDs',
                   'close_time': 'closeTime', 'take_profit_order_id': 'takeProfitOrderID',
                   'stop_loss_order_id': 'stopLossOrderID', 'trailing_stop_loss_order_id': 'trailingStopLossOrderID',
                   'user_id': 'userID', 'account_id': 'accountID', 'batch_id': 'batchID', 'request_id': 'requestID',
                   'orders_created': 'ordersCreated', 'orders_cancelled': 'ordersCancelled',
                   'orders_filled': 'ordersFilled', 'orders_triggered': 'ordersTriggered',
                   'trades_opened': 'tradesOpened', 'trades_reduced': 'tradesReduced', 'trades_closed': 'tradesClosed',
                   'positions': 'positions', 'transactions': 'transactions', 'name': 'name',
                   'display_name': 'displayName', 'pip_location': 'pipLocation',
                   'display_precision': 'displayPrecision', 'trade_units_precision': 'tradeUnitsPrecision',
                   'minimum_trade_size': 'minimumTradeSize',
                   'maximum_trailing_stop_distance': 'maximumTrailingStopDistance',
                   'minimum_trailing_stop_distance': 'minimumTrailingStopDistance',
                   'maximum_position_size': 'maximumPositionSize', 'maximum_order_units': 'maximumOrderUnits',
                   'margin_rate': 'marginRate', 'nav': 'NAV', 'margin_used': 'marginUsed',
                   'margin_available': 'marginAvailable', 'position_value': 'positionValue',
                   'margin_closeout_unrealized_pl': 'marginCloseoutUnrealizedPL',
                   'margin_closeout_nav': 'marginCloseoutNAV',
                   'margin_closeout_margin_used': 'marginCloseoutMarginUsed',
                   'margin_closeout_percent': 'marginCloseoutPercent',
                   'margin_closeout_position_value': 'marginCloseoutPositionValue',
                   'withdrawal_limit': 'withdrawalLimit', 'margin_call_margin_used': 'marginCallMarginUsed',
                   'margin_call_percent': 'marginCallPercent', 'orders': 'orders', 'trades': 'trades',
                   'status': 'status', 'tradeable': 'tradeable',
                   'quote_home_conversion_factors': 'quoteHomeConversionFactors', 'units_available': 'unitsAvailable',
                   'extension_number': 'extensionNumber', 'trigger_condition': 'triggerCondition',
                   'division_id': 'divisionID', 'site_id': 'siteID', 'account_user_id': 'accountUserID',
                   'account_number': 'accountNumber', 'home_currency': 'homeCurrency', 'alias': 'alias',
                   'replaced_by_order_id': 'replacedByOrderID', 'closed_trade_id': 'closedTradeID',
                   'trade_close_transaction_id': 'tradeCloseTransactionID',
                   'client_extensions_modify': 'clientExtensionsModify',
                   'trade_client_extensions_modify': 'tradeClientExtensionsModify', 'account_balance': 'accountBalance',
                   'account_financing_mode': 'accountFinancingMode', 'position_financings': 'positionFinancings',
                   'currency': 'currency', 'balance': 'balance', 'created_by_user_id': 'createdByUserID',
                   'created_time': 'createdTime', 'resettabled_pl_time': 'resettabledPLTime',
                   'margin_call_enter_time': 'marginCallEnterTime',
                   'margin_call_extension_count': 'marginCallExtensionCount',
                   'last_margin_call_extension_time': 'lastMarginCallExtensionTime',
                   'open_trade_count': 'openTradeCount', 'open_position_count': 'openPositionCount',
                   'pending_order_count': 'pendingOrderCount', 'hedging_enabled': 'hedgingEnabled',
                   'price_bound': 'priceBound', 'position_fill': 'positionFill',
                   'take_profit_on_fill': 'takeProfitOnFill', 'stop_loss_on_fill': 'stopLossOnFill',
                   'trailing_stop_loss_on_fill': 'trailingStopLossOnFill',
                   'trade_client_extensions': 'tradeClientExtensions',
                   'order_fill_transaction_id': 'orderFillTransactionID', 'replaces_order_id': 'replacesOrderID',
                   'cancelling_transaction_id': 'cancellingTransactionID',
                   'filling_transaction_id': 'fillingTransactionID', 'filled_time': 'filledTime',
                   'trade_opened_id': 'tradeOpenedID', 'trade_reduced_id': 'tradeReducedID',
                   'trade_closed_i_ds': 'tradeClosedIDs', 'cancelled_time': 'cancelledTime',
                   'take_profit_order': 'takeProfitOrder', 'stop_loss_order': 'stopLossOrder',
                   'trailing_stop_loss_order': 'trailingStopLossOrder', 'reject_reason': 'rejectReason',
                   'amount': 'amount', 'funding_reason': 'fundingReason', 'trade_close': 'tradeClose',
                   'long_position_closeout': 'longPositionCloseout', 'short_position_closeout': 'shortPositionCloseout',
                   'margin_closeout': 'marginCloseout', 'delayed_trade_close': 'delayedTradeClose',
                   'initial_market_price': 'initialMarketPrice', 'full_price': 'fullPrice',
                   'trade_opened': 'tradeOpened', 'trade_reduced': 'tradeReduced',
                   'intended_replaces_order_id': 'intendedReplacesOrderID', 'username': 'username',
                   'country': 'country', 'email_address': 'emailAddress', 'fifo': 'FIFO', 'partial_fill': 'partialFill',
                   'gain_quote_home_conversion_factor': 'gainQuoteHomeConversionFactor',
                   'loss_quote_home_conversion_factor': 'lossQuoteHomeConversionFactor',
                   'guaranteed_execution_fee': 'guaranteedExecutionFee', 'half_spread_cost': 'halfSpreadCost',
                   'description': 'description', 'list': 'list',
                   'current_event':'current-event', 'url': 'url', 'sid': 'sid', 'message': 'message',
                   'informational': 'informational', 'level': 'level', 'image': 'image', 'icon_set': 'icon_set'}
