MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / Order

Class Order

packages/ibkr/ref/source/pythonclient/ibapi/order.py:31–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30
31class Order(Object):
32 def __init__(self):
33 self.softDollarTier = SoftDollarTier("", "", "")
34 # order identifier
35 self.orderId = 0
36 self.clientId = 0
37 self.permId = 0
38
39 # main order fields
40 self.action = ""
41 self.totalQuantity = UNSET_DECIMAL
42 self.orderType = ""
43 self.lmtPrice = UNSET_DOUBLE
44 self.auxPrice = UNSET_DOUBLE
45
46 # extended order fields
47 self.tif = "" # "Time in Force" - DAY, GTC, etc.
48 self.activeStartTime = "" # for GTC orders
49 self.activeStopTime = "" # for GTC orders
50 self.ocaGroup = "" # one cancels all group name
51 self.ocaType = (
52 0 # 1 = CANCEL_WITH_BLOCK, 2 = REDUCE_WITH_BLOCK, 3 = REDUCE_NON_BLOCK
53 )
54 self.orderRef = ""
55 self.transmit = True # if false, order will be created but not transmitted
56 self.parentId = 0 # Parent order id, to associate Auto STP or TRAIL orders with the original order.
57 self.blockOrder = False
58 self.sweepToFill = False
59 self.displaySize = 0
60 self.triggerMethod = 0 # 0=Default, 1=Double_Bid_Ask, 2=Last, 3=Double_Last, 4=Bid_Ask, 7=Last_or_Bid_Ask, 8=Mid-point
61 self.outsideRth = False
62 self.hidden = False
63 self.goodAfterTime = "" # Format: 20060505 08:00:00 {time zone}
64 self.goodTillDate = "" # Format: 20060505 08:00:00 {time zone}
65 self.rule80A = "" # Individual = 'I', Agency = 'A', AgentOtherMember = 'W', IndividualPTIA = 'J', AgencyPTIA = 'U', AgentOtherMemberPTIA = 'M', IndividualPT = 'K', AgencyPT = 'Y', AgentOtherMemberPT = 'N'
66 self.allOrNone = False
67 self.minQty = UNSET_INTEGER # type: int
68 self.percentOffset = UNSET_DOUBLE # type: float # REL orders only
69 self.overridePercentageConstraints = False
70 self.trailStopPrice = UNSET_DOUBLE # type: float
71 self.trailingPercent = UNSET_DOUBLE # type: float # TRAILLIMIT orders only
72
73 # financial advisors only
74 self.faGroup = ""
75 self.faMethod = ""
76 self.faPercentage = ""
77
78 # institutional (ie non-cleared) only
79 self.designatedLocation = "" # used only when shortSaleSlot=2
80 self.openClose = "" # O=Open, C=Close
81 self.origin = CUSTOMER # 0=Customer, 1=Firm
82 self.shortSaleSlot = (
83 0
84 ) # type: int # 1 if you hold the shares, 2 if they will be delivered from elsewhere. Only for Action=SSHORT
85 self.exemptCode = -1
86
87 # SMART routing only
88 self.discretionaryAmt = 0

Callers 15

AtAuctionMethod · 0.90
DiscretionaryMethod · 0.90
MarketOrderMethod · 0.90
MarketIfTouchedMethod · 0.90
MarketOnCloseMethod · 0.90
MarketOnOpenMethod · 0.90
MidpointMatchMethod · 0.90
MidpriceMethod · 0.90
PeggedToMarketMethod · 0.90
PeggedToStockMethod · 0.90
SweepToFillMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected