def endpoint(endpoint, rest=False, initialize_required=True):
    """Define a method call to be exposed to the user"""

    def wrapper(method):
        """Take the wrapped method and return a coroutine"""

        method.endpoint = endpoint

        method.initialize_required = initialize_required

        sig = signature(method)

        method.__doc__ = create_doc_signature(method, sig)

        @wraps(method)
        async def wrap(self, *args, **kwargs):
            if initialize_required:
                await self.initialize(method.__name__)
            elif not self.session:
                await self.initialize_session()

            logger.info('%s(args=%s, kwargs=%s)', method.__name__, args, kwargs)
            arguments = construct_arguments(self, sig, *args, **kwargs)

            enable_rest = False
            if rest and arguments[SinceTransactionID] == self.default_parameters[SinceTransactionID]:
                enable_rest = True

            request_kwargs = create_request_kwargs(self, endpoint, arguments)

            await self._request_limiter()

            if self.debug:
                logger.debug('client.session.request(kwargs=%s)', request_kwargs)
            response = self.session.request(**request_kwargs)

            return await parse_response(self, response, endpoint, enable_rest, method.__name__)


        wrap.__signature__ = sig

        return wrap

    return wrapper def shortcut(func):
    sig = signature(func)

    @wraps(func)
    def wrap(self, *args, **kwargs):
        return func(self, *args, **kwargs)

    wrap.shortcut = True
    wrap.__signature__ = sig
    wrap.__doc__ = create_doc_signature(wrap, sig)

    return wrap class ClientExtensions(Model):
    """A ClientExtensions object allows a client to attach a clientID, tag and
    comment to Orders and Trades in their Account.  Do not set, modify, or
    delete this field if your account is associated with MT4.

    Attributes:
        id: :class:`~async_v20.ClientID`
            The Client ID of the Order/Trade
        tag: :class:`~async_v20.ClientTag`
            A tag associated with the Order/Trade
        comment: :class:`~async_v20.ClientComment`
            A comment associated with the Order/Trade

    """

    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
        Model.__init__(**locals()) class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
    """A LimitOrderRequest specifies the parameters that may be set when creating
    a Limit Order.

    Attributes:
        instrument: :class:`~async_v20.InstrumentName`
            The Limit Order's Instrument.
        units: :class:`~async_v20.DecimalNumber`
            The quantity requested to be filled by the Limit Order. A posititive number of units
            results in a long Order, and a negative number of units results in a short Order.
        price: :class:`~async_v20.PriceValue`
            The price threshold specified for the Limit Order. The Limit Order will only be
            filled by a market price that is equal to or better than this price.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time-in-force requested for the Limit Order.
        gtd_time: :class:`~async_v20.DateTime`
            The date/time when the Limit Order will
            be cancelled if its timeInForce is "GTD".
        position_fill: :class:`~async_v20.OrderPositionFill`
            Specification of how Positions in the Account
            are modified when the Order is filled.
        trigger_condition: :class:`~async_v20.OrderTriggerCondition`
            Specification of what component of a price should be used
            for comparison when determining if the Order should be filled.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The client extensions to add to the Order. Do not set,
            modify, or delete clientExtensions if your account is associated with MT4.
        take_profit_on_fill: :class:`~async_v20.TakeProfitDetails`
            TakeProfitDetails specifies the details of a Take Profit Order to be created on behalf of
            a client. This may happen when an Order
            is filled that opens a Trade requiring a Take Profit, or when a Trade's dependent Take Profit Order is
            modified directly through the Trade.
        stop_loss_on_fill: :class:`~async_v20.StopLossDetails`
            StopLossDetails specifies the details of a Stop Loss Order to be created on behalf of a
            client. This may happen when an Order
            is filled that opens a Trade requiring a Stop Loss, or when a Trade's dependent Stop Loss Order is modified
            directly through the Trade.
        trailing_stop_loss_on_fill: :class:`~async_v20.TrailingStopLossDetails`
            TrailingStopLossDetails specifies the details of a Trailing Stop Loss Order to be
            created on behalf of a client. This may happen when an Order is
            filled that opens a Trade requiring a Trailing Stop Loss, or when a Trade's dependent Trailing Stop Loss
            Order is modified directly through the Trade.
        trade_client_extensions: :class:`~async_v20.ClientExtensions`
            Client Extensions to add to the Trade created when the Order is filled (if such a
            Trade is created). Do not set, modify, or delete tradeClientExtensions if your account is associated with
            MT4.

    """

    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
    """A MarketIfTouchedOrderRequest specifies the parameters that may be set when
    creating a Market-if-Touched Order.

    Attributes:

        instrument: :class:`~async_v20.InstrumentName`
            The MarketIfTouched Order's Instrument.
        units: :class:`~async_v20.DecimalNumber`
            The quantity requested to be filled by the MarketIfTouched Order. A posititive number of units
            results in a long Order, and a negative number of units results in a short Order.
        price: :class:`~async_v20.PriceValue`
            The price threshold specified for the MarketIfTouched Order. The MarketIfTouched Order will only be
            filled by a market price that crosses this price from the direction of the market price
            at the time when the Order was created (the initialMarketPrice). Depending on the value of the Order's
            price and initialMarketPrice, the MarketIfTouchedOrder will behave like a Limit or a Stop Order.
        price_bound: :class:`~async_v20.PriceValue`
            The worst market price that may be used to fill this MarketIfTouched Order.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time-in-force requested for the MarketIfTouched Order. Restricted
            to "GTC", "GFD" and "GTD" for MarketIfTouched Orders.
        gtd_time: :class:`~async_v20.DateTime`
            The date/time when the MarketIfTouched Order will
            be cancelled if its timeInForce is "GTD".
        position_fill: :class:`~async_v20.OrderPositionFill`
            Specification of how Positions in the Account
            are modified when the Order is filled.
        trigger_condition: :class:`~async_v20.OrderTriggerCondition`
            Specification of what component of a price should be used
            for comparison when determining if the Order should be filled.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The client extensions to add to the Order. Do not set,
            modify, or delete clientExtensions if your account is associated with MT4.
        take_profit_on_fill: :class:`~async_v20.TakeProfitDetails`
            TakeProfitDetails specifies the details of a Take Profit Order to be created on behalf of
            a client. This may happen when an Order
            is filled that opens a Trade requiring a Take Profit, or when a Trade's dependent Take Profit Order is
            modified directly through the Trade.
        stop_loss_on_fill: :class:`~async_v20.StopLossDetails`
            StopLossDetails specifies the details of a Stop Loss Order to be created on behalf of a
            client. This may happen when an Order
            is filled that opens a Trade requiring a Stop Loss, or when a Trade's dependent Stop Loss Order is modified
            directly through the Trade.
        trailing_stop_loss_on_fill: :class:`~async_v20.TrailingStopLossDetails`
            TrailingStopLossDetails specifies the details of a Trailing Stop Loss Order to be
            created on behalf of a client. This may happen when an Order is
            filled that opens a Trade requiring a Trailing Stop Loss, or when a Trade's dependent Trailing Stop Loss
            Order is modified directly through the Trade.
        trade_client_extensions: :class:`~async_v20.ClientExtensions`
            Client Extensions to add to the Trade created when the Order is filled (if such a
            Trade is created). Do not set, modify, or delete tradeClientExtensions if your account is associated with
            MT4.

        """

    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
    """A MarketOrderRequest specifies the parameters that may be set when creating
    a Market Order.

    Attributes:
        instrument: :class:`~async_v20.InstrumentName`
            The Market Order's Instrument.
        units: :class:`~async_v20.DecimalNumber`
            The quantity requested to be filled by the Market Order. A positive number of units
            results in a long Order, and a negative number of units results in a short Order.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time-in-force requested for the Market Order.
            Restricted to FOK or IOC for a MarketOrder.
        price_bound: :class:`~async_v20.PriceValue`
            The worst price that the client is willing to have the Market Order filled at.
        position_fill: :class:`~async_v20.OrderPositionFill`
            Specification of how Positions in the Account
            are modified when the Order is filled.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The client extensions to add to the Order. Do not set,
            modify, or delete clientExtensions if your account is associated with MT4.
        take_profit_on_fill: :class:`~async_v20.TakeProfitDetails`
            TakeProfitDetails specifies the details of a Take Profit Order to be created on behalf of
            a client. This may happen when an Order
            is filled that opens a Trade requiring a Take Profit, or when a Trade's dependent Take Profit Order is
            modified directly through the Trade.
        stop_loss_on_fill: :class:`~async_v20.StopLossDetails`
            StopLossDetails specifies the details of a Stop Loss Order to be created on behalf of a
            client. This may happen when an Order
            is filled that opens a Trade requiring a Stop Loss, or when a Trade's dependent Stop Loss Order is modified
            directly through the Trade.
        trailing_stop_loss_on_fill: :class:`~async_v20.TrailingStopLossDetails`
            TrailingStopLossDetails specifies the details of a Trailing Stop Loss Order to be
            created on behalf of a client. This may happen when an Order is
            filled that opens a Trade requiring a Trailing Stop Loss, or when a Trade's dependent Trailing Stop Loss
            Order is modified directly through the Trade.
        trade_client_extensions: :class:`~async_v20.ClientExtensions`
            Client Extensions to add to the Trade created when the Order is filled (if such a
            Trade is created). Do not set, modify, or delete tradeClientExtensions if your account is associated with
            MT4.

    """

    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class OrderRequest(Model, jit=False):
    """The base Order specification. Contains all attributes an OrderRequest
    may contain.

    Attributes:

        instrument: :class:`~async_v20.InstrumentName`
        trade_id: :class:`~async_v20.TradeID`
        price: :class:`~async_v20.PriceValue`
        type: :class:`~async_v20.OrderType`
        client_trade_id: :class:`~async_v20.ClientID`
        time_in_force: :class:`~async_v20.TimeInForce`
        gtd_time: :class:`~async_v20.DateTime`
        trigger_condition: :class:`~async_v20.OrderTriggerCondition`
        client_extensions: :class:`~async_v20.ClientExtensions`
        distance: :class:`~async_v20.PriceValue`
        instrument: :class:`~async_v20.InstrumentName`
        units: :class:`~async_v20.DecimalNumber`
        price_bound: :class:`~async_v20.PriceValue`
        position_fill: :class:`~async_v20.OrderPositionFill`
        take_profit_on_fill: :class:`~async_v20.TakeProfitDetails`
        stop_loss_on_fill: :class:`~async_v20.StopLossDetails`
        trailing_stop_loss_on_fill: :class:`~async_v20.TrailingStopLossDetails`
        trade_client_extensions: :class:`~async_v20.ClientExtensions`
    """

    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class StopLossDetails(Model):
    """StopLossDetails specifies the details of a Stop Loss Order to be created on
    behalf of a client. This may happen when an Order is filled that opens a
    Trade requiring a Stop Loss, or when a Trade's dependent Stop Loss Order is
    modified directly through the Trade.

    Attributes:
        price: :class:`~async_v20.PriceValue`
            The price that the Stop Loss Order will be triggered at.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time in force for the created Stop Loss
            Order. This may only be GTC, GTD or GFD.
        gtd_time: :class:`~async_v20.DateTime`
            The date when the Stop Loss Order will be cancelled on if timeInForce is GTD.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The Client Extensions to add to the Stop Loss Order when created.

    """

    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
    """A StopLossOrderRequest specifies the parameters that may be set when
    creating a Stop Loss Order.

    Attributes:
        instrument: :class:`~async_v20.InstrumentName`
            The StopLossOrderRequest instrument.
        trade_id: :class:`~async_v20.TradeID`
            The ID of the Trade to close when the price threshold is breached.
        client_trade_id: :class:`~async_v20.TradeID`
            The client ID of the Trade to be closed when the price threshold is breached.
        price: :class:`~async_v20.PriceValue`
            The price threshold specified for the StopLoss Order. The associated Trade will be
            closed by a market price that is equal to or worse than this threshold.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time-in-force requested for the StopLoss Order. Restricted
            to "GTC", "GFD" and "GTD" for StopLoss Orders.
        gtd_time: :class:`~async_v20.DateTime`
            The date/time when the StopLoss Order will
            be cancelled if its timeInForce is "GTD".
        trigger_condition: :class:`~async_v20.OrderTriggerCondition`
            Specification of what component of a price should be used
            for comparison when determining if the Order should be filled.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The client extensions to add to the Order. Do not set,
            modify, or delete clientExtensions if your account is associated with MT4.

    """

    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
    """A StopOrderRequest specifies the parameters that may be set when creating a
    Stop Order.

    Attributes:

        instrument: :class:`~async_v20.InstrumentName`
            The Stop Order's Instrument.
        units: :class:`~async_v20.DecimalNumber`
            The quantity requested to be filled by the Stop Order. A posititive number of units
            results in a long Order, and a negative number of units results in a short Order.
        price: :class:`~async_v20.PriceValue`
            The price threshold specified for the Stop Order. The Stop Order will only be
            filled by a market price that is equal to or worse than this price.
        price_bound: :class:`~async_v20.PriceValue`
            The worst market price that may be used to fill this Stop Order. If the market gaps and
            crosses through both the price and the priceBound, the Stop Order will be cancelled instead of being filled.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time-in-force requested for the Stop Order.
        gtd_time: :class:`~async_v20.DateTime`
            The date/time when the Stop Order will
            be cancelled if its timeInForce is "GTD".
        position_fill: :class:`~async_v20.OrderPositionFill`
            Specification of how Positions in the Account
            are modified when the Order is filled.
        trigger_condition: :class:`~async_v20.OrderTriggerCondition`
            Specification of what component of a price should be used
            for comparison when determining if the Order should be filled.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The client extensions to add to the Order. Do not set,
            modify, or delete clientExtensions if your account is associated with MT4.
        take_profit_on_fill: :class:`~async_v20.TakeProfitDetails`
            TakeProfitDetails specifies the details of a Take Profit Order to be created on behalf of
            a client. This may happen when an Order
            is filled that opens a Trade requiring a Take Profit, or when a Trade's dependent Take Profit Order is
            modified directly through the Trade.
        stop_loss_on_fill: :class:`~async_v20.StopLossDetails`
            StopLossDetails specifies the details of a Stop Loss Order to be created on behalf of a
            client. This may happen when an Order
            is filled that opens a Trade requiring a Stop Loss, or when a Trade's dependent Stop Loss Order is modified
            directly through the Trade.
        trailing_stop_loss_on_fill: :class:`~async_v20.TrailingStopLossDetails`
            TrailingStopLossDetails specifies the details of a Trailing Stop Loss Order to be
            created on behalf of a client. This may happen when an Order is
            filled that opens a Trade requiring a Trailing Stop Loss, or when a Trade's dependent Trailing Stop Loss
            Order is modified directly through the Trade.
        trade_client_extensions: :class:`~async_v20.ClientExtensions`
            Client Extensions to add to the Trade created when the Order is filled (if such a
            Trade is created). Do not set, modify, or delete tradeClientExtensions if your account is associated with
            MT4.

    """

    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class TakeProfitDetails(Model):
    """TakeProfitDetails specifies the details of a Take Profit Order to be
    created on behalf of a client. This may happen when an Order is filled that
    opens a Trade requiring a Take Profit, or when a Trade's dependent Take
    Profit Order is modified directly through the Trade.

    Attributes:
        price: :class:`~async_v20.PriceValue`
            The price that the Take Profit Order will be triggered at.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time in force for the created Take Profit
            Order. This may only be GTC, GTD or GFD.
        gtd_time: :class:`~async_v20.DateTime`
            The date when the Take Profit Order will be cancelled on if timeInForce is GTD.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The Client Extensions to add to the Take Profit Order when created.

    """

    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
    """A TakeProfitOrderRequest specifies the parameters that may be set when
    creating a Take Profit Order.

    Attributes:
        instrument: :class:`~async_v20.InstrumentName`
            The TakeProfitOrderRequest instrument.
        trade_id: :class:`~async_v20.TradeID`
            The ID of the Trade to close when the price threshold is breached.
        client_trade_id: :class:`~async_v20.TradeID`
            The client ID of the Trade to be closed when the price threshold is breached.
        price: :class:`~async_v20.PriceValue`
            The price threshold specified for the TakeProfit Order. The associated Trade will be
            closed by a market price that is equal to or better than this threshold.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time-in-force requested for the TakeProfit Order. Restricted
            to "GTC", "GFD" and "GTD" for TakeProfit Orders.
        gtd_time: :class:`~async_v20.DateTime`
            The date/time when the TakeProfit Order will
            be cancelled if its timeInForce is "GTD".
        trigger_condition: :class:`~async_v20.OrderTriggerCondition`
            Specification of what component of a price should be used
            for comparison when determining if the Order should be filled.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The client extensions to add to the Order. Do not set,
            modify, or delete clientExtensions if your account is associated with MT4.

    """

    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class ArrayStr(Array, contains=str):
class ArrayTradeID(Array, contains=TradeID):
class ArrayTransactionFilter(Array, contains=TransactionFilter):
class ArrayTransactionID(Array, contains=TransactionID):
class ArrayDict(Array, contains=dict):
class ClientExtensions(Model):
class TakeProfitDetails(Model):
class StopLossDetails(Model):
class TrailingStopLossDetails(Model):
class OrderRequest(Model, jit=False):
class UnitsAvailableDetails(Model):
class UnitsAvailable(Model):
class LiquidityRegenerationScheduleStep(Model):
class ArrayLiquidityRegenerationScheduleStep(Array, contains=LiquidityRegenerationScheduleStep):
class LiquidityRegenerationSchedule(Model):
class CandlestickData(Model):
class OrderIdentifier(Model):
class QuoteHomeConversionFactors(Model):
class MarketOrderMarginCloseout(Model):
class InstrumentCommission(Model):
class OrderBookBucket(Model):
class ArrayOrderBookBucket(Array, contains=OrderBookBucket):
class PositionBookBucket(Model):
class ArrayPositionBookBucket(Array, contains=PositionBookBucket):
class DynamicOrderState(Model):
class ArrayDynamicOrderState(Array, contains=DynamicOrderState):
class CalculatedPositionState(Model):
class ArrayCalculatedPositionState(Array, contains=CalculatedPositionState, one_to_many=False):
class PositionSide(Model):
class Position(Model):
class ArrayPosition(Array, contains=Position, one_to_many=False):
class PriceBucket(Model):
class ArrayPriceBucket(Array, contains=PriceBucket):
class ClientPrice(Model):
class PricingHeartbeat(Model):
class CalculatedTradeState(Model):
class ArrayCalculatedTradeState(Array, contains=CalculatedTradeState):
class MarketOrderDelayedTradeClose(Model):
class MarketOrderPositionCloseout(Model):
class MarketOrderTradeClose(Model):
class OpenTradeFinancing(Model):
class ArrayOpenTradeFinancing(Array, contains=OpenTradeFinancing):
class PositionFinancing(Model):
class ArrayPositionFinancing(Array, contains=PositionFinancing):
class TradeOpen(Model):
class VWAPReceipt(Model):
class UserInfo(Model):
class AccountProperties(Model):
class ArrayAccountProperties(Array, contains=AccountProperties):
class Candlestick(Model):
class ArrayCandlestick(Array, contains=Candlestick):
class OrderBook(Model):
class PositionBook(Model):
class Order(Model):
class ArrayOrder(Array, contains=Order):
class TradeReduce(Model):
class ArrayTradeReduce(Array, contains=TradeReduce):
class TransactionHeartbeat(Model):
class UserInfoExternal(Model):
class TradeSummary(Model):
class ArrayTradeSummary(Array, contains=TradeSummary):
class Transaction(Model):
class ArrayTransaction(Array, contains=Transaction):
class AccountChanges(Model):
class GuaranteedStopLossOrderLevelRestriction(Model):
class Instrument(Model):
class ArrayInstrument(Array, contains=Instrument, one_to_many=False):
class AccountChangesState(Model):
class Price(Model):
class ArrayPrice(Array, contains=Price):
class CloseTransaction(Transaction, type=TransactionType('CLOSE')):
class MarginCallEnterTransaction(Transaction, type=TransactionType('MARGIN_CALL_ENTER')):
class MarginCallExitTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXIT')):
class MarginCallExtendTransaction(Transaction, type=TransactionType('MARGIN_CALL_EXTEND')):
class ReopenTransaction(Transaction, type=TransactionType('REOPEN')):
class ResetResettablePLTransaction(Transaction, type=TransactionType('RESET_RESETTABLE_PL')):
class StopLossOrderRequest(OrderRequest, type=OrderType('STOP_LOSS')):
class TakeProfitOrderRequest(OrderRequest, type=OrderType('TAKE_PROFIT')):
class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
class CreateTransaction(Transaction, type=TransactionType('CREATE')):
class ClientConfigureTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE')):
class DelayedTradeClosureTransaction(Transaction, type=TransactionType('DELAYED_TRADE_CLOSURE')):
class OrderCancelTransaction(Transaction, type=TransactionType('ORDER_CANCEL')):
class OrderClientExtensionsModifyTransaction(Transaction, type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY')):
class DailyFinancingTransaction(Transaction, type=TransactionType('DAILY_FINANCING')):
class TradeClientExtensionsModifyTransaction(Transaction, type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY')):
class AccountSummary(Model):
class MarketOrderRequest(OrderRequest, type=OrderType('MARKET')):
class TakeProfitOrderTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER')):
class TakeProfitOrder(Order, type=OrderType('TAKE_PROFIT')):
class StopLossOrder(Order, type=OrderType('STOP_LOSS')):
class TrailingStopLossOrder(Order, type=OrderType('TRAILING_STOP_LOSS')):
class Trade(Model):
class ArrayTrade(Array, contains=Trade):
class ClientConfigureRejectTransaction(Transaction, type=TransactionType('CLIENT_CONFIGURE_REJECT')):
class OrderCancelRejectTransaction(Transaction, type=TransactionType('ORDER_CANCEL_REJECT')):
class OrderClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TradeClientExtensionsModifyRejectTransaction(Transaction,
                                                   type=TransactionType('TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT')):
class TransferFundsTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS')):
class TransferFundsRejectTransaction(Transaction, type=TransactionType('TRANSFER_FUNDS_REJECT')):
class LimitOrderRequest(OrderRequest, type=OrderType('LIMIT')):
class MarketIfTouchedOrderRequest(OrderRequest, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrderRequest(OrderRequest, type=OrderType('STOP')):
class Account(AccountSummary):
class MarketOrderTransaction(Transaction, type=TransactionType('MARKET_ORDER')):
class MarketOrderRejectTransaction(Transaction, type=TransactionType('MARKET_ORDER_REJECT')):
class StopLossOrderTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER')):
class TrailingStopLossOrderTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER')):
class LimitOrder(Order, type=OrderType('LIMIT')):
class MarketIfTouchedOrder(Order, type=OrderType('MARKET_IF_TOUCHED')):
class StopOrder(Order, type=OrderType('STOP')):
class OrderFillTransaction(Transaction, type=TransactionType('ORDER_FILL')):
class StopLossOrderRejectTransaction(Transaction, type=TransactionType('STOP_LOSS_ORDER_REJECT')):
class MarketIfTouchedOrderTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER')):
class LimitOrderTransaction(Transaction, type=TransactionType('LIMIT_ORDER')):
class TakeProfitOrderRejectTransaction(Transaction, type=TransactionType('TAKE_PROFIT_ORDER_REJECT')):
class TrailingStopLossOrderRejectTransaction(Transaction, type=TransactionType('TRAILING_STOP_LOSS_ORDER_REJECT')):
class StopOrderTransaction(Transaction, type=TransactionType('STOP_ORDER')):
class MarketIfTouchedOrderRejectTransaction(Transaction, type=TransactionType('MARKET_IF_TOUCHED_ORDER_REJECT')):
class LimitOrderRejectTransaction(Transaction, type=TransactionType('LIMIT_ORDER_REJECT')):
class StopOrderRejectTransaction(Transaction, type=TransactionType('STOP_ORDER_REJECT')):
class MarketOrder(Order, type=OrderType('MARKET')):
    def __init__(self, id: ClientID = sentinel, tag: ClientTag = sentinel, comment: ClientComment = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, price: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID = sentinel, price: PriceValue = sentinel,
                 type: OrderType = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = sentinel, client_extensions: ClientExtensions = sentinel,
                 distance: PriceValue = sentinel, units: DecimalNumber = sentinel,
                 price_bound: PriceValue = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, long: DecimalNumber = sentinel, short: DecimalNumber = sentinel):
    def __init__(self, default: UnitsAvailableDetails = sentinel, reduce_first: UnitsAvailableDetails = sentinel,
                 reduce_only: UnitsAvailableDetails = sentinel, open_only: UnitsAvailableDetails = sentinel):
    def __init__(self, timestamp: DateTime = sentinel, bid_liquidity_used: DecimalNumber = sentinel,
                 ask_liquidity_used: DecimalNumber = sentinel):
    def __init__(self, steps: ArrayLiquidityRegenerationScheduleStep = sentinel):
    def __init__(self, o: PriceValue = sentinel, h: PriceValue = sentinel, l: PriceValue = sentinel,
                 c: PriceValue = sentinel):
    def __init__(self, order_id: OrderID = sentinel, client_order_id: ClientID = sentinel):
    def __init__(self, positive_units: DecimalNumber = sentinel, negative_units: DecimalNumber = sentinel):
    def __init__(self, reason: MarketOrderMarginCloseoutReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, commission: DecimalNumber = sentinel,
                 units_traded: DecimalNumber = sentinel,
                 minimum_commission: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, price: PriceValue = sentinel, long_count_percent: DecimalNumber = sentinel,
                 short_count_percent: DecimalNumber = sentinel):
    def __init__(self, id: OrderID = sentinel, trailing_stop_value: PriceValue = sentinel,
                 trigger_distance: PriceValue = sentinel,
                 is_trigger_distance_exact: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, net_unrealized_pl: AccountUnits = sentinel,
                 long_unrealized_pl: AccountUnits = sentinel, short_unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, average_price: PriceValue = sentinel,
                 trade_ids: ArrayTradeID = sentinel,
                 pl: AccountUnits = sentinel, unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 long: PositionSide = sentinel,
                 short: PositionSide = sentinel, financing: DecimalNumber = sentinel,
                 margin_used: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, price: PriceValue = sentinel, liquidity: int = sentinel):
    def __init__(self, bids: ArrayPriceBucket = sentinel, asks: ArrayPriceBucket = sentinel,
                 closeout_bid: PriceValue = sentinel, closeout_ask: PriceValue = sentinel,
                 timestamp: DateTime = sentinel):
    def __init__(self, type: str = sentinel, time: DateTime = sentinel):
    def __init__(self, id: TradeID = sentinel, unrealized_pl: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: TradeID = sentinel,
                 source_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, client_trade_id: str = sentinel, units: str = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, financing: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, financing: AccountUnits = sentinel,
                 open_trade_financings: ArrayOpenTradeFinancing = sentinel):
    def __init__(self, price: DecimalNumber = sentinel, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 initial_margin_required: AccountUnits = sentinel):
    def __init__(self, units: DecimalNumber = sentinel, price: PriceValue = sentinel):
    def __init__(self, username: str = sentinel, user_id: str = sentinel, country: str = sentinel,
                 email_address: str = sentinel):
    def __init__(self, id: AccountID = sentinel, mt4_account_id: int = sentinel, tags: ArrayStr = sentinel):
    def __init__(self, time: DateTime = sentinel, bid: CandlestickData = sentinel, ask: CandlestickData = sentinel,
                 mid: CandlestickData = sentinel, volume: int = sentinel, complete: bool = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel, bucket_width: PriceValue = sentinel,
                 buckets: ArrayOrderBookBucket = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, time: DateTime = sentinel, unix_time: DateTime = sentinel,
                 price: PriceValue = sentinel,
                 bucket_width: PriceValue = sentinel, buckets: ArrayPositionBookBucket = sentinel):
    def __init__(self, id: OrderID = sentinel, create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel, trade_id: TradeID = sentinel,
                 price: PriceValue = sentinel,
                 type: OrderType = sentinel, client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel, distance: PriceValue = sentinel,
                 trailing_stop_value: PriceValue = sentinel, instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel,
                 partial_fill: str = sentinel, position_fill: OrderPositionFill = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, price_bound: PriceValue = sentinel,
                 initial_market_price: PriceValue = sentinel, trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 trigger_distance: PriceValue = sentinel, is_trigger_distance_exact: bool = sentinel,
                 guaranteed: bool = sentinel
                 ):
    def __init__(self, trade_id: TradeID = sentinel, units: DecimalNumber = sentinel,
                 realized_pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, price: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 client_trade_id: ClientID = sentinel):
    def __init__(self, type: str = sentinel, last_transaction_id: TransactionID = sentinel, time: DateTime = sentinel):
    def __init__(self, user_id: str = sentinel, country: str = sentinel, fifo: str = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel,
                 average_close_price: PriceValue = sentinel, closing_transaction_ids: ArrayTransactionID = sentinel,
                 financing: AccountUnits = sentinel, close_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_order_id: OrderID = sentinel,
                 stop_loss_order_id: OrderID = sentinel, trailing_stop_loss_order_id: OrderID = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 type: TransactionType = sentinel, extension_number: int = sentinel, division_id: int = sentinel,
                 site_id: int = sentinel, account_user_id: int = sentinel, account_number: int = sentinel,
                 home_currency: Currency = sentinel, alias: str = sentinel, margin_rate: DecimalNumber = sentinel,
                 reason: Reason = sentinel, trade_ids: TradeID = sentinel, order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel,
                 client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel, financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel, trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, price: PriceValue = sentinel,
                 time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel, trigger_condition: OrderTriggerCondition = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel, amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 instrument: InstrumentName = sentinel,
                 units: DecimalNumber = sentinel, price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = sentinel,
                 trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, distance: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, pl: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 # TODO update when OANDA ADVISES correct type. This is currently a guess.
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 partial_fill: str = sentinel,
                 guaranteed: bool = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, orders_created: ArrayOrder = sentinel, orders_cancelled: ArrayOrder = sentinel,
                 orders_filled: ArrayOrder = sentinel, orders_triggered: ArrayOrder = sentinel,
                 trades_opened: ArrayTradeSummary = sentinel, trades_reduced: ArrayTradeSummary = sentinel,
                 trades_closed: ArrayTradeSummary = sentinel, positions: ArrayPosition = sentinel,
                 transactions: ArrayTransaction = sentinel):
    def __init__(self, volume: DecimalNumber = sentinel, price_range: DecimalNumber = sentinel):
    def __init__(self, name: InstrumentName = sentinel, type: InstrumentType = sentinel, display_name: str = sentinel,
                 pip_location: int = sentinel, display_precision: int = sentinel, trade_units_precision: int = sentinel,
                 minimum_trade_size: DecimalNumber = sentinel, maximum_trailing_stop_distance: DecimalNumber = sentinel,
                 minimum_trailing_stop_distance: DecimalNumber = sentinel,
                 maximum_position_size: DecimalNumber = sentinel,
                 maximum_order_units: DecimalNumber = sentinel, margin_rate: DecimalNumber = sentinel,
                 commission: InstrumentCommission = sentinel,
                 guaranteed_stop_loss_order_level_restriction: GuaranteedStopLossOrderLevelRestriction = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 tags: ArrayDict = sentinel, financing: object = sentinel):
    def __init__(self, unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 orders: ArrayDynamicOrderState = sentinel, trades: ArrayCalculatedTradeState = sentinel,
                 positions: ArrayCalculatedPositionState = sentinel,
                 balance: AccountUnits = sentinel,
                 # TODO check definition against OANDA docs
                 pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel,
                 commission: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel
                 ):
    def __init__(self, type: str = sentinel, instrument: InstrumentName = sentinel, time: DateTime = sentinel,
                 # TODO: remove status when OANDA removes attribute
                 status: PriceStatus = sentinel, tradeable: bool = sentinel, bids: ArrayPriceBucket = sentinel,
                 asks: ArrayPriceBucket = sentinel, closeout_bid: PriceValue = sentinel,
                 closeout_ask: PriceValue = sentinel,
                 # TODO: remove quote_home_conversion_factors when OANDA removes attribute
                 quote_home_conversion_factors: QuoteHomeConversionFactors = sentinel,
                 # TODO: remove units_available when OANDA removes attribute
                 units_available: UnitsAvailable = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 extension_number: int = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 division_id: int = sentinel, site_id: int = sentinel,
                 account_user_id: int = sentinel, account_number: int = sentinel, home_currency: Currency = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel, margin_rate: DecimalNumber = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 reason: MarketOrderReason = sentinel,
                 trade_ids: TradeID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 reason: OrderCancelReason = sentinel, replaced_by_order_id: OrderID = sentinel,
                 closed_trade_id: OrderID = sentinel, trade_close_transaction_id: TransactionID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 financing: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel, account_financing_mode: AccountFinancingMode = sentinel,
                 position_financings: ArrayPositionFinancing = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel,
                 dividend: DecimalNumber = sentinel,
                 ):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: OrderID = sentinel, create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', guaranteed: bool = sentinel,
                 filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 client_trade_id: ClientID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', trailing_stop_value: PriceValue = sentinel,
                 filling_transaction_id: TransactionID = sentinel, filled_time: DateTime = sentinel,
                 trade_opened_id: TradeID = sentinel, trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TradeID = sentinel, instrument: InstrumentName = sentinel, price: PriceValue = sentinel,
                 open_time: DateTime = sentinel, state: TradeState = sentinel, initial_units: DecimalNumber = sentinel,
                 initial_margin_required: AccountUnits = sentinel,
                 current_units: DecimalNumber = sentinel, realized_pl: AccountUnits = sentinel,
                 unrealized_pl: AccountUnits = sentinel, average_close_price: PriceValue = sentinel,
                 closing_transaction_ids: ArrayTransactionID = sentinel, financing: AccountUnits = sentinel,
                 close_time: DateTime = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_order: TakeProfitOrder = sentinel, stop_loss_order: StopLossOrder = sentinel,
                 trailing_stop_loss_order: TrailingStopLossOrder = sentinel,
                 margin_used: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 alias: str = sentinel,
                 margin_rate: DecimalNumber = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, reason: OrderCancelReason = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel,
                 client_order_id: ClientID = sentinel, client_extensions_modify: ClientExtensions = sentinel,
                 trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 trade_id: TradeID = sentinel,
                 client_trade_id: ClientID = sentinel, trade_client_extensions_modify: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 account_balance: AccountUnits = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 amount: AccountUnits = sentinel,
                 funding_reason: FundingReason = sentinel, comment: str = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, id: AccountID = sentinel, alias: str = sentinel, currency: Currency = sentinel,
                 balance: AccountUnits = sentinel,
                 created_by_user_id: int = sentinel, created_time: DateTime = sentinel, pl: AccountUnits = sentinel,
                 resettable_pl: AccountUnits = sentinel, resettabled_pl_time: DateTime = sentinel,
                 commission: AccountUnits = sentinel, margin_rate: DecimalNumber = sentinel,
                 margin_call_enter_time: DateTime = sentinel, margin_call_extension_count: int = sentinel,
                 last_margin_call_extension_time: DateTime = sentinel, open_trade_count: int = sentinel,
                 open_position_count: int = sentinel, pending_order_count: int = sentinel,
                 hedging_enabled: bool = sentinel,
                 unrealized_pl: AccountUnits = sentinel, nav: AccountUnits = sentinel,
                 margin_used: AccountUnits = sentinel,
                 margin_available: AccountUnits = sentinel, position_value: AccountUnits = sentinel,
                 margin_closeout_unrealized_pl: AccountUnits = sentinel, margin_closeout_nav: AccountUnits = sentinel,
                 margin_closeout_margin_used: AccountUnits = sentinel,
                 margin_closeout_percent: DecimalNumber = sentinel,
                 margin_closeout_position_value: DecimalNumber = sentinel, withdrawal_limit: AccountUnits = sentinel,
                 margin_call_margin_used: AccountUnits = sentinel, margin_call_percent: DecimalNumber = sentinel,
                 last_transaction_id: TransactionID = sentinel, trades: ArrayTradeSummary = sentinel,
                 positions: ArrayPosition = sentinel, orders: ArrayOrder = sentinel,
                 financing: DecimalNumber = sentinel,
                 guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode = sentinel,
                 resettable_pl_time: DateTime = sentinel,
                 dividend: DecimalNumber = sentinel,
                 dividend_adjustment: AccountUnits = sentinel,
                 guaranteed_execution_fees: AccountUnits = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel, reason: MarketOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID, price: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 guaranteed: bool = sentinel):
    def __init__(self, trade_id: TradeID, distance: PriceValue, id: TransactionID = sentinel, time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 replaces_order_id: OrderID = sentinel, cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 initial_market_price: PriceValue = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID = sentinel,
                 create_time: DateTime = sentinel, state: OrderState = sentinel,
                 client_extensions: ClientExtensions = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel, replaces_order_id: OrderID = sentinel,
                 replaced_by_order_id: OrderID = sentinel):
    def __init__(self, id: TransactionID = sentinel, time: DateTime = sentinel, user_id: int = sentinel,
                 account_id: AccountID = sentinel, batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 order_id: OrderID = sentinel, client_order_id: ClientID = sentinel,
                 instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel, price: PriceValue = sentinel,
                 full_price: ClientPrice = sentinel, reason: OrderFillReason = sentinel, pl: AccountUnits = sentinel,
                 financing: AccountUnits = sentinel, commission: AccountUnits = sentinel,
                 account_balance: AccountUnits = sentinel,
                 trade_opened: TradeOpen = sentinel, trades_closed: ArrayTradeReduce = sentinel,
                 trade_reduced: TradeReduce = sentinel,
                 gain_quote_home_conversion_factor: DecimalNumber = sentinel,
                 loss_quote_home_conversion_factor: DecimalNumber = sentinel,
                 guaranteed_execution_fee: AccountUnits = sentinel,
                 half_spread_cost: AccountUnits = sentinel,
                 requested_units: AccountUnits = sentinel,
                 full_vwap: DecimalNumber = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: StopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: LimitOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel, partial_fill: OrderPositionFill = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, price: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TakeProfitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, trade_id: TradeID = sentinel, distance: PriceValue = sentinel, id: TransactionID = sentinel,
                 time: DateTime = sentinel,
                 user_id: int = sentinel, account_id: AccountID = sentinel, batch_id: TransactionID = sentinel,
                 request_id: RequestID = sentinel,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: TrailingStopLossOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, order_fill_transaction_id: TransactionID = sentinel,
                 intended_replaces_order_id: OrderID = sentinel, reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, price: PriceValue,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 partial_fill: str = sentinel,
                 price_bound: PriceValue = sentinel, time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, replaces_order_id: OrderID = sentinel,
                 cancelling_transaction_id: TransactionID = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: MarketIfTouchedOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel, position_fill: OrderPositionFill = 'DEFAULT',
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', reason: LimitOrderReason = sentinel,
                 client_extensions: ClientExtensions = sentinel, take_profit_on_fill: TakeProfitDetails = sentinel,
                 stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName = sentinel, units: DecimalNumber = sentinel,
                 price: PriceValue = sentinel,
                 id: TransactionID = sentinel,
                 time: DateTime = sentinel, user_id: int = sentinel, account_id: AccountID = sentinel,
                 batch_id: TransactionID = sentinel, request_id: RequestID = sentinel,
                 price_bound: PriceValue = sentinel,
                 time_in_force: TimeInForce = 'GTC', gtd_time: DateTime = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trigger_condition: OrderTriggerCondition = 'DEFAULT',
                 reason: StopOrderReason = sentinel, client_extensions: ClientExtensions = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, intended_replaces_order_id: OrderID = sentinel,
                 reject_reason: TransactionRejectReason = sentinel):
    def __init__(self, instrument: InstrumentName, units: DecimalNumber, id: OrderID = sentinel,
                 create_time: DateTime = sentinel,
                 state: OrderState = sentinel, client_extensions: ClientExtensions = sentinel,
                 time_in_force: TimeInForce = 'FOK', price_bound: PriceValue = sentinel,
                 position_fill: OrderPositionFill = 'DEFAULT', trade_close: MarketOrderTradeClose = sentinel,
                 long_position_closeout: MarketOrderPositionCloseout = sentinel,
                 short_position_closeout: MarketOrderPositionCloseout = sentinel,
                 margin_closeout: MarketOrderMarginCloseout = sentinel,
                 delayed_trade_close: MarketOrderDelayedTradeClose = sentinel,
                 take_profit_on_fill: TakeProfitDetails = sentinel, stop_loss_on_fill: StopLossDetails = sentinel,
                 trailing_stop_loss_on_fill: TrailingStopLossDetails = sentinel,
                 trade_client_extensions: ClientExtensions = sentinel, filling_transaction_id: TransactionID = sentinel,
                 filled_time: DateTime = sentinel, trade_opened_id: TradeID = sentinel,
                 trade_reduced_id: TradeID = sentinel,
                 trade_closed_ids: ArrayTradeID = sentinel, cancelling_transaction_id: TransactionID = sentinel,
                 cancelled_time: DateTime = sentinel): class TrailingStopLossDetails(Model):
    """TrailingStopLossDetails specifies the details of a Trailing Stop Loss Order
    to be created on behalf of a client. This may happen when an Order is
    filled that opens a Trade requiring a Trailing Stop Loss, or when a Trade's
    dependent Trailing Stop Loss Order is modified directly through the Trade.

    Attributes:
        distance: :class:`~async_v20.PriceValue`
            The distance (in price units) from the Trade's fill price
            that the Trailing Stop Loss Order will be triggered at.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time in force for the created Trailing Stop
            Loss Order. This may only be GTC, GTD or GFD.
        gtd_time: :class:`~async_v20.DateTime`
            The date when the Trailing Stop Loss Order
            will be cancelled on if timeInForce is GTD.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The Client Extensions to add to the Trailing Stop Loss Order when created.

    """

    def __init__(self, distance: PriceValue = sentinel, time_in_force: TimeInForce = sentinel,
                 gtd_time: DateTime = sentinel,
                 client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class TrailingStopLossOrderRequest(OrderRequest, type=OrderType('TRAILING_STOP_LOSS')):
    """A TrailingStopLossOrderRequest specifies the parameters that may be set
    when creating a Trailing Stop Loss Order.

    Attributes:
        instrument: :class:`~async_v20.InstrumentName`
            The TrailingStopLossOrderRequest instrument
        instrument: :class:`~async_v20.InstrumentName`
            The TrailingStopLossOrderRequest instrument
        trade_id: :class:`~async_v20.TradeID`
            The ID of the Trade to close when the price threshold is breached.
        client_trade_id: :class:`~async_v20.TradeID`
            The client ID of the Trade to be closed when the price threshold is breached.
        distance: :class:`~async_v20.PriceValue`
            The price distance specified for the TrailingStopLoss Order.
        time_in_force: :class:`~async_v20.TimeInForce`
            The time-in-force requested for the TrailingStopLoss Order. Restricted
            to "GTC", "GFD" and "GTD" for TrailingStopLoss Orders.
        gtd_time: :class:`~async_v20.DateTime`
            The date/time when the StopLoss Order will
            be cancelled if its timeInForce is "GTD".
        trigger_condition: :class:`~async_v20.OrderTriggerCondition`
            Specification of what component of a price should be used
            for comparison when determining if the Order should be filled.
        client_extensions: :class:`~async_v20.ClientExtensions`
            The client extensions to add to the Order. Do not set,
            modify, or delete clientExtensions if your account is associated with MT4.

    """

    def __init__(self, instrument: InstrumentName, trade_id: TradeID, distance: PriceValue,
                 client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                 gtd_time: DateTime = sentinel,
                 trigger_condition: OrderTriggerCondition = 'DEFAULT', client_extensions: ClientExtensions = sentinel):
        Model.__init__(**locals()) class Count(int):
    """The number of candlesticks to return in the reponse.
    Count should not be specified if both the start and end
    parameters are provided, as the time range combined
    with the graularity will determine the number of
    candlesticks to return. [default=500, maximum=5000]"""

    def __new__(cls, value=500):
        if not 0 < value <= 5000:
            raise ValueError(f'Count: MUST be within range(1,5001). Supplied {value}')
        return super().__new__(cls, value) class Ids(str):
    pass class TradeClientExtensions(ClientExtensions):
    pass def check_conflicting_arguments(self, kwargs, preset_values):
def json_to_instance_attributes(self, kwargs, template):
def domain_check(value, example=None, possible_values=None):
def flatten_dict(dictionary, delimiter='_'):
    def unpack(parent_key, parent_value):
def create_doc_signature(obj, sig):
from .decorators import endpoint, shortcut
from ..definitions.types import ClientExtensions
from ..definitions.types import ClientID
from ..definitions.types import DateTime
from ..definitions.types import DecimalNumber
from ..definitions.types import InstrumentName
from ..definitions.types import LimitOrderRequest
from ..definitions.types import MarketIfTouchedOrderRequest
from ..definitions.types import MarketOrderRequest
from ..definitions.types import OrderID
from ..definitions.types import OrderPositionFill
from ..definitions.types import OrderRequest
from ..definitions.types import OrderSpecifier
from ..definitions.types import OrderStateFilter
from ..definitions.types import OrderTriggerCondition
from ..definitions.types import OrderType
from ..definitions.types import PriceValue
from ..definitions.types import StopLossDetails
from ..definitions.types import StopLossOrderRequest
from ..definitions.types import StopOrderRequest
from ..definitions.types import TakeProfitDetails
from ..definitions.types import TakeProfitOrderRequest
from ..definitions.types import TimeInForce
from ..definitions.types import TradeID
from ..definitions.types import TrailingStopLossDetails
from ..definitions.types import TrailingStopLossOrderRequest
from ..endpoints.annotations import Count
from ..endpoints.annotations import Ids
from ..endpoints.annotations import TradeClientExtensions
from ..endpoints.order import *
from ..definitions.helpers import sentinel

            status [201]
                :class:`~async_v20.interface.response.Response`
                (orderCancelTransaction= :class:`~async_v20.OrderCancelTransaction`,
                orderCreateTransaction= :class:`~async_v20.Transaction`,
                orderFillTransaction= :class:`~async_v20.OrderFillTransaction`,
                orderReissueTransaction= :class:`~async_v20.Transaction`,
                orderReissueRejectTransaction= :class:`~async_v20.Transaction`,
                replacingOrderCancelTransaction= :class:`~async_v20.OrderCancelTransaction`,
                relatedTransactionIDs=( :class:`~async_v20.TransactionID`, ...),
                lastTransactionID= :class:`~async_v20.TransactionID`)

            status [400]
                :class:`~async_v20.interface.response.Response`
                (orderRejectTransaction= :class:`~async_v20.Transaction`,
                relatedTransactionIDs=( :class:`~async_v20.TransactionID`, ...),
                lastTransactionID= :class:`~async_v20.TransactionID`,
                errorCode= :class:`~builtins.str`,
                errorMessage= :class:`~builtins.str`)

            status [401]
                :class:`~async_v20.interface.response.Response`
                (orderCancelRejectTransaction= :class:`~async_v20.Transaction`,
                relatedTransactionIDs=( :class:`~async_v20.TransactionID`, ...),
                lastTransactionID= :class:`~async_v20.TransactionID`,
                errorCode= :class:`~builtins.str`,
                errorMessage= :class:`~builtins.str`)

        """
        return self.replace_order(
            order_specifier=order_specifier,
            order_request=MarketIfTouchedOrderRequest(
                instrument=instrument, units=units,
                price=price, price_bound=price_bound,
                time_in_force=time_in_force,
                gtd_time=gtd_time,
                position_fill=position_fill,
                trigger_condition=trigger_condition,
                client_extensions=client_extensions,
                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)
        )

    @shortcut
    def take_profit_order(self, instrument: InstrumentName, trade_id: TradeID, price: PriceValue,
                          client_trade_id: ClientID = sentinel, time_in_force: TimeInForce = 'GTC',
                          gtd_time: DateTime = sentinel,
                          trigger_condition: OrderTriggerCondition = 'DEFAULT',
                          client_extensions: ClientExtensions = sentinel):
        """
        Create a take profit order

        Args:

            instrument: :class:`~async_v20.InstrumentName`
                The TakeProfitOrder's Instrument.
            trade_id: :class:`~async_v20.TradeID`
                The ID of the Trade to close when the price threshold is breached.
            client_trade_id: :class:`~async_v20.TradeID`
                The client ID of the Trade to be closed when the price threshold is breached.
            price: :class:`~async_v20.PriceValue`
                The price threshold specified for the TakeProfit Order. The associated Trade will be
                closed by a market price that is equal to or better than this threshold.
            time_in_force: :class:`~async_v20.TimeInForce`
                The time-in-force requested for the TakeProfit Order. Restricted
                to "GTC", "GFD" and "GTD" for TakeProfit Orders.
            gtd_time: :class:`~async_v20.DateTime`
                The date/time when the TakeProfit Order will
                be cancelled if its timeInForce is "GTD".
            trigger_condition: :class:`~async_v20.OrderTriggerCondition`
                Specification of what component of a price should be used
                for comparison when determining if the Order should be filled.
            client_extensions: :class:`~async_v20.ClientExtensions`
                The client extensions to add to the Order. Do not set,
                modify, or delete clientExtensions if your account is associated with MT4.

        Returns:

            status [201]
                :class:`~async_v20.interface.response.Response`
                (orderCreateTransaction= :class:`~async_v20.Transaction`,
                orderFillTransaction= :class:`~async_v20.OrderFillTransaction`,
                orderCancelTransaction= :class:`~async_v20.OrderCancelTransaction`,
                orderReissueTransaction= :class:`~async_v20.Transaction`,
                orderReissueRejectTransaction= :class:`~async_v20.Transaction`,
                relatedTransactionIDs=( :class:`~async_v20.TransactionID`, ...),
                lastTransactionID= :class:`~async_v20.TransactionID`)

            status [400]
                :class:`~async_v20.interface.response.Response`
                (orderRejectTransaction= :class:`~async_v20.Transaction`,
                relatedTransactionIDs=( :class:`~async_v20.TransactionID`, ...),
                lastTransactionID= :class:`~async_v20.TransactionID`,
                errorCode= :class:`~builtins.str`,
                errorMessage= :class:`~builtins.str`)

            status [401]
                :class:`~async_v20.interface.response.Response`
                (orderRejectTransaction= :class:`~async_v20.Transaction`,
                relatedTransactionIDs=( :class:`~async_v20.TransactionID`, ...),
                lastTransactionID= :class:`~async_v20.TransactionID`,
                errorCode= :class:`~builtins.str`,
                errorMessage= :class:`~builtins.str`)

        """
        return self.post_order(
            order_request=TakeProfitOrderRequest(
                instrument=instrument,
                trade_id=trade_id, price=price, client_trade_id=client_trade_id,
                time_in_force=time_in_force, gtd_time=gtd_time,
                trigger_condition=trigger_condition,
                client_extensions=client_extensions
            ))

    @shortcut
    def take_profit_replace_order(self,
                                  instrument: InstrumentName,
                                  order_specifier: OrderSpecifier,

                                  trade_id: TradeID, price: PriceValue,