| 15 | from enum import Enum |
| 16 | |
| 17 | class Execution(Object): |
| 18 | def __init__(self): |
| 19 | self.execId = "" |
| 20 | self.time = "" |
| 21 | self.acctNumber = "" |
| 22 | self.exchange = "" |
| 23 | self.side = "" |
| 24 | self.shares = UNSET_DECIMAL |
| 25 | self.price = 0.0 |
| 26 | self.permId = 0 |
| 27 | self.clientId = 0 |
| 28 | self.orderId = 0 |
| 29 | self.liquidation = 0 |
| 30 | self.cumQty = UNSET_DECIMAL |
| 31 | self.avgPrice = 0.0 |
| 32 | self.orderRef = "" |
| 33 | self.evRule = "" |
| 34 | self.evMultiplier = 0.0 |
| 35 | self.modelCode = "" |
| 36 | self.lastLiquidity = 0 |
| 37 | self.pendingPriceRevision = False |
| 38 | self.submitter = "" |
| 39 | self.optExerciseOrLapseType = OptionExerciseType.NoneItem |
| 40 | |
| 41 | def __str__(self): |
| 42 | return ( |
| 43 | "ExecId: %s, Time: %s, Account: %s, Exchange: %s, Side: %s, Shares: %s, Price: %s, PermId: %s, " |
| 44 | "ClientId: %s, OrderId: %s, Liquidation: %s, CumQty: %s, AvgPrice: %s, OrderRef: %s, EvRule: %s, " |
| 45 | "EvMultiplier: %s, ModelCode: %s, LastLiquidity: %s, PendingPriceRevision: %s, Submitter: %s, OptExerciseOrLapseType: %s" |
| 46 | % ( |
| 47 | self.execId, |
| 48 | self.time, |
| 49 | self.acctNumber, |
| 50 | self.exchange, |
| 51 | self.side, |
| 52 | decimalMaxString(self.shares), |
| 53 | floatMaxString(self.price), |
| 54 | longMaxString(self.permId), |
| 55 | intMaxString(self.clientId), |
| 56 | intMaxString(self.orderId), |
| 57 | intMaxString(self.liquidation), |
| 58 | decimalMaxString(self.cumQty), |
| 59 | floatMaxString(self.avgPrice), |
| 60 | self.orderRef, |
| 61 | self.evRule, |
| 62 | floatMaxString(self.evMultiplier), |
| 63 | self.modelCode, |
| 64 | intMaxString(self.lastLiquidity), |
| 65 | self.pendingPriceRevision, |
| 66 | self.submitter, |
| 67 | getEnumTypeName(OptionExerciseType, self.optExerciseOrLapseType), |
| 68 | ) |
| 69 | ) |
| 70 | |
| 71 | |
| 72 | class ExecutionFilter(Object): |
no outgoing calls
no test coverage detected