<s> """<STR_LIT>""" <EOL> from ib . lib import Double , Integer <EOL> from ib . ext . Util import Util <EOL> class Order ( object ) : <EOL> """<STR_LIT>""" <EOL> CUSTOMER = <NUM_LIT:0> <EOL> FIRM = <NUM_LIT:1> <EOL> OPT_UNKNOWN = '<STR_LIT:?>' <EOL> OPT_BROKER_DEALER = '<STR_LIT:b>' <EOL> OPT_CUSTOMER = '<STR_LIT:c>' <EOL> OPT_FIRM = '<STR_LIT:f>' <EOL> OPT_ISEMM = '<STR_LIT:m>' <EOL> OPT_FARMM = '<STR_LIT:n>' <EOL> OPT_SPECIALIST = '<STR_LIT:y>' <EOL> AUCTION_MATCH = <NUM_LIT:1> <EOL> AUCTION_IMPROVEMENT = <NUM_LIT:2> <EOL> AUCTION_TRANSPARENT = <NUM_LIT:3> <EOL> EMPTY_STR = "<STR_LIT>" <EOL> m_orderId = <NUM_LIT:0> <EOL> m_clientId = <NUM_LIT:0> <EOL> m_permId = <NUM_LIT:0> <EOL> m_action = "<STR_LIT>" <EOL> m_totalQuantity = <NUM_LIT:0> <EOL> m_orderType = "<STR_LIT>" <EOL> m_lmtPrice = float ( ) <EOL> m_auxPrice = float ( ) <EOL> m_tif = "<STR_LIT>" <EOL> m_activeStartTime = "<STR_LIT>" <EOL> m_activeStopTime = "<STR_LIT>" <EOL> m_ocaGroup = "<STR_LIT>" <EOL> m_ocaType = <NUM_LIT:0> <EOL> m_orderRef = "<STR_LIT>" <EOL> m_transmit = bool ( ) <EOL> m_parentId = <NUM_LIT:0> <EOL> m_blockOrder = bool ( ) <EOL> m_sweepToFill = bool ( ) <EOL> m_displaySize = <NUM_LIT:0> <EOL> m_triggerMethod = <NUM_LIT:0> <EOL> m_outsideRth = bool ( ) <EOL> m_hidden = bool ( ) <EOL> m_goodAfterTime = "<STR_LIT>" <EOL> m_goodTillDate = "<STR_LIT>" <EOL> m_overridePercentageConstraints = bool ( ) <EOL> m_rule80A = "<STR_LIT>" <EOL> m_allOrNone = bool ( ) <EOL> m_minQty = <NUM_LIT:0> <EOL> m_percentOffset = float ( ) <EOL> m_trailStopPrice = float ( ) <EOL> m_trailingPercent = float ( ) <EOL> m_faGroup = "<STR_LIT>" <EOL> m_faProfile = "<STR_LIT>" <EOL> m_faMethod = "<STR_LIT>" <EOL> m_faPercentage = "<STR_LIT>" <EOL> m_openClose = "<STR_LIT>" <EOL> m_origin = <NUM_LIT:0> <EOL> m_shortSaleSlot = <NUM_LIT:0> <EOL> m_designatedLocation = "<STR_LIT>" <EOL> m_exemptCode = <NUM_LIT:0> <EOL> m_discretionaryAmt = float ( ) <EOL> m_eTradeOnly = bool ( ) <EOL> m_firmQuoteOnly = bool ( ) <EOL> m_nbboPriceCap = float ( ) <EOL> m_optOutSmartRouting = bool ( ) <EOL> m_auctionStrategy = <NUM_LIT:0> <EOL> m_startingPrice = float ( ) <EOL> m_stockRefPrice = float ( ) <EOL> m_delta = float ( ) <EOL> m_stockRangeLower = float ( ) <EOL> m_stockRangeUpper = float ( ) <EOL> m_volatility = float ( ) <EOL> m_volatilityType = <NUM_LIT:0> <EOL> m_continuousUpdate = <NUM_LIT:0> <EOL> m_referencePriceType = <NUM_LIT:0> <EOL> m_deltaNeutralOrderType = "<STR_LIT>" <EOL> m_deltaNeutralAuxPrice = float ( ) <EOL> m_deltaNeutralConId = <NUM_LIT:0> <EOL> m_deltaNeutralSettlingFirm = "<STR_LIT>" <EOL> m_deltaNeutralClearingAccount = "<STR_LIT>" <EOL> m_deltaNeutralClearingIntent = "<STR_LIT>" <EOL> m_deltaNeutralOpenClose = "<STR_LIT>" <EOL> m_deltaNeutralShortSale = bool ( ) <EOL> m_deltaNeutralShortSaleSlot = <NUM_LIT:0> <EOL> m_deltaNeutralDesignatedLocation = "<STR_LIT>" <EOL> m_basisPoints = float ( ) <EOL> m_basisPointsType = <NUM_LIT:0> <EOL> m_scaleInitLevelSize = <NUM_LIT:0> <EOL> m_scaleSubsLevelSize = <NUM_LIT:0> <EOL> m_scalePriceIncrement = float ( ) <EOL> m_scalePriceAdjustValue = float ( ) <EOL> m_scalePriceAdjustInterval = <NUM_LIT:0> <EOL> m_scaleProfitOffset = float ( ) <EOL> m_scaleAutoReset = bool ( ) <EOL> m_scaleInitPosition = <NUM_LIT:0> <EOL> m_scaleInitFillQty = <NUM_LIT:0> <EOL> m_scaleRandomPercent = bool ( ) <EOL> m_scaleTable = "<STR_LIT>" <EOL> m_hedgeType = "<STR_LIT>" <EOL> m_hedgeParam = "<STR_LIT>" <EOL> m_account = "<STR_LIT>" <EOL> m_settlingFirm = "<STR_LIT>" <EOL> m_clearingAccount = "<STR_LIT>" <EOL> m_clearingIntent = "<STR_LIT>" <EOL> m_algoStrategy = "<STR_LIT>" <EOL> m_algoParams = None <EOL> m_whatIf = bool ( ) <EOL> m_notHeld = bool ( ) <EOL> m_smartComboRoutingParams = None <EOL> m_orderComboLegs = [ ] <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> self . m_lmtPrice = Double . MAX_VALUE <EOL> self . m_auxPrice = Double . MAX_VALUE <EOL> self . m_activeStartTime = self . EMPTY_STR <EOL> self . m_activeStopTime = self . EMPTY_STR <EOL> self . m_outsideRth = False <EOL> self . m_openClose = "<STR_LIT:O>" <EOL> self . m_origin = self . CUSTOMER <EOL> self . m_transmit = True <EOL> self . m_designatedLocation = self . EMPTY_STR <EOL> self . m_exemptCode = - <NUM_LIT:1> <EOL> self . m_minQty = Integer . MAX_VALUE <EOL> self . m_percentOffset = Double . MAX_VALUE <EOL> self . m_nbboPriceCap = Double . MAX_VALUE <EOL> self . m_optOutSmartRouting = False <EOL> self . m_startingPrice = Double . MAX_VALUE <EOL> self . m_stockRefPrice = Double . MAX_VALUE <EOL> self . m_delta = Double . MAX_VALUE <EOL> self . m_stockRangeLower = Double . MAX_VALUE <EOL> self . m_stockRangeUpper = Double . MAX_VALUE <EOL> self . m_volatility = Double . MAX_VALUE <EOL> self . m_volatilityType = Integer . MAX_VALUE <EOL> self . m_deltaNeutralOrderType = self . EMPTY_STR <EOL> self . m_deltaNeutralAuxPrice = Double . MAX_VALUE <EOL> self . m_deltaNeutralConId = <NUM_LIT:0> <EOL> self . m_deltaNeutralSettlingFirm = self . EMPTY_STR <EOL> self . m_deltaNeutralClearingAccount = self . EMPTY_STR <EOL> self . m_deltaNeutralClearingIntent = self . EMPTY_STR <EOL> self . m_deltaNeutralOpenClose = self . EMPTY_STR <EOL> self . m_deltaNeutralShortSale = False <EOL> self . m_deltaNeutralShortSaleSlot = <NUM_LIT:0> <EOL> self . m_deltaNeutralDesignatedLocation = self . EMPTY_STR <EOL> self . m_referencePriceType = Integer . MAX_VALUE <EOL> self . m_trailStopPrice = Double . MAX_VALUE <EOL> self . m_trailingPercent = Double . MAX_VALUE <EOL> self . m_basisPoints = Double . MAX_VALUE <EOL> self . m_basisPointsType = Integer . MAX_VALUE <EOL> self . m_scaleInitLevelSize = Integer . MAX_VALUE <EOL> self . m_scaleSubsLevelSize = Integer . MAX_VALUE <EOL> self . m_scalePriceIncrement = Double . MAX_VALUE <EOL> self . m_scalePriceAdjustValue = Double . MAX_VALUE <EOL> self . m_scalePriceAdjustInterval = Integer . MAX_VALUE <EOL> self . m_scaleProfitOffset = Double . MAX_VALUE <EOL> self . m_scaleAutoReset = False <EOL> self . m_scaleInitPosition = Integer . MAX_VALUE <EOL> self . m_scaleInitFillQty = Integer . MAX_VALUE <EOL> self . m_scaleRandomPercent = False <EOL> self . m_scaleTable = self . EMPTY_STR <EOL> self . m_whatIf = False <EOL> self . m_notHeld = False <EOL> def __eq__ ( self , p_other ) : <EOL> """<STR_LIT>""" <EOL> if self is p_other : <EOL> return True <EOL> if p_other is None : <EOL> return False <EOL> l_theOther = p_other <EOL> if self . m_permId == l_theOther . m_permId : <EOL> return True <EOL> if self . m_orderId != l_theOther . m_orderId or self . m_clientId != l_theOther . m_clientId or self . m_totalQuantity != l_theOther . m_totalQuantity or self . m_lmtPrice != l_theOther . m_lmtPrice or self . m_auxPrice != l_theOther . m_auxPrice or self . m_ocaType != l_theOther . m_ocaType or self . m_transmit != l_theOther . m_transmit or self . m_parentId != l_theOther . m_parentId or self . m_blockOrder != l_theOther . m_blockOrder or self . m_sweepToFill != l_theOther . m_sweepToFill or self . m_displaySize != l_theOther . m_displaySize or self . m_triggerMethod != l_theOther . m_triggerMethod or self . m_outsideRth != l_theOther . m_outsideRth or self . m_hidden != l_theOther . m_hidden or self . m_overridePercentageConstraints != l_theOther . m_overridePercentageConstraints or self . m_allOrNone != l_theOther . m_allOrNone or self . m_minQty != l_theOther . m_minQty or self . m_percentOffset != l_theOther . m_percentOffset or self . m_trailStopPrice != l_theOther . m_trailStopPrice or self . m_trailingPercent != l_theOther . m_trailingPercent or self . m_origin != l_theOther . m_origin or self . m_shortSaleSlot != l_theOther . m_shortSaleSlot or self . m_discretionaryAmt != l_theOther . m_discretionaryAmt or self . m_eTradeOnly != l_theOther . m_eTradeOnly or self . m_firmQuoteOnly != l_theOther . m_firmQuoteOnly or self . m_nbboPriceCap != l_theOther . m_nbboPriceCap or self . m_optOutSmartRouting != l_theOther . m_optOutSmartRouting or self . m_auctionStrategy != l_theOther . m_auctionStrategy or self . m_startingPrice != l_theOther . m_startingPrice or self . m_stockRefPrice != l_theOther . m_stockRefPrice or self . m_delta != l_theOther . m_delta or self . m_stockRangeLower != l_theOther . m_stockRangeLower or self . m_stockRangeUpper != l_theOther . m_stockRangeUpper or self . m_volatility != l_theOther . m_volatility or self . m_volatilityType != l_theOther . m_volatilityType or self . m_continuousUpdate != l_theOther . m_continuousUpdate or self . m_referencePriceType != l_theOther . m_referencePriceType or self . m_deltaNeutralAuxPrice != l_theOther . m_deltaNeutralAuxPrice or self . m_deltaNeutralConId != l_theOther . m_deltaNeutralConId or self . m_deltaNeutralShortSale != l_theOther . m_deltaNeutralShortSale or self . m_deltaNeutralShortSaleSlot != l_theOther . m_deltaNeutralShortSaleSlot or self . m_basisPoints != l_theOther . m_basisPoints or self . m_basisPointsType != l_theOther . m_basisPointsType or self . m_scaleInitLevelSize != l_theOther . m_scaleInitLevelSize or self . m_scaleSubsLevelSize != l_theOther . m_scaleSubsLevelSize or self . m_scalePriceIncrement != l_theOther . m_scalePriceIncrement or self . m_scalePriceAdjustValue != l_theOther . m_scalePriceAdjustValue or self . m_scalePriceAdjustInterval != l_theOther . m_scalePriceAdjustInterval or self . m_scaleProfitOffset != l_theOther . m_scaleProfitOffset or self . m_scaleAutoReset != l_theOther . m_scaleAutoReset or self . m_scaleInitPosition != l_theOther . m_scaleInitPosition or self . m_scaleInitFillQty != l_theOther . m_scaleInitFillQty or self . m_scaleRandomPercent != l_theOther . m_scaleRandomPercent or self . m_whatIf != l_theOther . m_whatIf or self . m_notHeld != l_theOther . m_notHeld or self . m_exemptCode != l_theOther . m_exemptCode : <EOL> return False <EOL> if Util . StringCompare ( self . m_action , l_theOther . m_action ) != <NUM_LIT:0> or Util . StringCompare ( self . m_orderType , l_theOther . m_orderType ) != <NUM_LIT:0> or Util . StringCompare ( self . m_tif , l_theOther . m_tif ) != <NUM_LIT:0> or Util . StringCompare ( self . m_activeStartTime , l_theOther . m_activeStartTime ) != <NUM_LIT:0> or Util . StringCompare ( self . m_activeStopTime , l_theOther . m_activeStopTime ) != <NUM_LIT:0> or Util . StringCompare ( self . m_ocaGroup , l_theOther . m_ocaGroup ) != <NUM_LIT:0> or Util . StringCompare ( self . m_orderRef , l_theOther . m_orderRef ) != <NUM_LIT:0> or Util . StringCompare ( self . m_goodAfterTime , l_theOther . m_goodAfterTime ) != <NUM_LIT:0> or Util . StringCompare ( self . m_goodTillDate , l_theOther . m_goodTillDate ) != <NUM_LIT:0> or Util . StringCompare ( self . m_rule80A , l_theOther . m_rule80A ) != <NUM_LIT:0> or Util . StringCompare ( self . m_faGroup , l_theOther . m_faGroup ) != <NUM_LIT:0> or Util . StringCompare ( self . m_faProfile , l_theOther . m_faProfile ) != <NUM_LIT:0> or Util . StringCompare ( self . m_faMethod , l_theOther . m_faMethod ) != <NUM_LIT:0> or Util . StringCompare ( self . m_faPercentage , l_theOther . m_faPercentage ) != <NUM_LIT:0> or Util . StringCompare ( self . m_openClose , l_theOther . m_openClose ) != <NUM_LIT:0> or Util . StringCompare ( self . m_designatedLocation , l_theOther . m_designatedLocation ) != <NUM_LIT:0> or Util . StringCompare ( self . m_deltaNeutralOrderType , l_theOther . m_deltaNeutralOrderType ) != <NUM_LIT:0> or Util . StringCompare ( self . m_deltaNeutralSettlingFirm , l_theOther . m_deltaNeutralSettlingFirm ) != <NUM_LIT:0> or Util . StringCompare ( self . m_deltaNeutralClearingAccount , l_theOther . m_deltaNeutralClearingAccount ) != <NUM_LIT:0> or Util . StringCompare ( self . m_deltaNeutralClearingIntent , l_theOther . m_deltaNeutralClearingIntent ) != <NUM_LIT:0> or Util . StringCompare ( self . m_deltaNeutralOpenClose , l_theOther . m_deltaNeutralOpenClose ) != <NUM_LIT:0> or Util . StringCompare ( self . m_deltaNeutralDesignatedLocation , l_theOther . m_deltaNeutralDesignatedLocation ) != <NUM_LIT:0> or Util . StringCompare ( self . m_hedgeType , l_theOther . m_hedgeType ) != <NUM_LIT:0> or Util . StringCompare ( self . m_hedgeParam , l_theOther . m_hedgeParam ) != <NUM_LIT:0> or Util . StringCompare ( self . m_account , l_theOther . m_account ) != <NUM_LIT:0> or Util . StringCompare ( self . m_settlingFirm , l_theOther . m_settlingFirm ) != <NUM_LIT:0> or Util . StringCompare ( self . m_clearingAccount , l_theOther . m_clearingAccount ) != <NUM_LIT:0> or Util . StringCompare ( self . m_clearingIntent , l_theOther . m_clearingIntent ) != <NUM_LIT:0> or Util . StringCompare ( self . m_algoStrategy , l_theOther . m_algoStrategy ) != <NUM_LIT:0> or Util . StringCompare ( self . m_scaleTable , l_theOther . m_scaleTable ) != <NUM_LIT:0> : <EOL> return False <EOL> if not Util . VectorEqualsUnordered ( self . m_algoParams , l_theOther . m_algoParams ) : <EOL> return False <EOL> if not Util . VectorEqualsUnordered ( self . m_smartComboRoutingParams , l_theOther . m_smartComboRoutingParams ) : <EOL> return False <EOL> if not Util . VectorEqualsUnordered ( self . m_orderComboLegs , l_theOther . m_orderComboLegs ) : <EOL> return False <EOL> return True </s>
