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

Method __str__

packages/ibkr/ref/source/pythonclient/ibapi/order.py:247–275  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

245 self.ptOrderType = ""
246
247 def __str__(self):
248 s = "%s,%s,%s:" % (
249 intMaxString(self.orderId),
250 intMaxString(self.clientId),
251 longMaxString(self.permId),
252 )
253
254 s += " %s %s %s@%s" % (
255 self.orderType,
256 self.action,
257 decimalMaxString(self.totalQuantity),
258 floatMaxString(self.lmtPrice),
259 )
260
261 s += f" {self.tif}"
262
263 if self.orderComboLegs:
264 s += " CMB("
265 for leg in self.orderComboLegs:
266 s += str(leg) + ","
267 s += ")"
268
269 if self.conditions:
270 s += " COND("
271 for cond in self.conditions:
272 s += str(cond) + ","
273 s += ")"
274
275 return s

Callers 1

Calls 4

intMaxStringFunction · 0.90
longMaxStringFunction · 0.90
decimalMaxStringFunction · 0.90
floatMaxStringFunction · 0.90

Tested by

no test coverage detected