| 21 | |
| 22 | |
| 23 | class 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 | |
| 50 | class DeltaNeutralContract(Object): |
no outgoing calls
no test coverage detected