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

Class ComboLeg

packages/ibkr/ref/source/pythonclient/ibapi/contract.py:23–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23class ComboLeg(Object):
24 def __init__(self):
25 self.conId = 0 # type: int
26 self.ratio = 0 # type: int
27 self.action = "" # BUY/SELL/SHORT
28 self.exchange = ""
29 self.openClose = 0 # type: int # LegOpenClose enum values
30 # for stock legs when doing short sale
31 self.shortSaleSlot = 0
32 self.designatedLocation = ""
33 self.exemptCode = -1
34
35 def __str__(self):
36 return ",".join(
37 (
38 intMaxString(self.conId),
39 intMaxString(self.ratio),
40 str(self.action),
41 str(self.exchange),
42 intMaxString(self.openClose),
43 intMaxString(self.shortSaleSlot),
44 str(self.designatedLocation),
45 intMaxString(self.exemptCode),
46 )
47 )
48
49
50class DeltaNeutralContract(Object):

Callers 7

decodeComboLegsMethod · 0.90
decodeComboLegsFunction · 0.90
OptionComboContractMethod · 0.50
StockComboContractMethod · 0.50
FutureComboContractMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected