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

Class Enum

packages/ibkr/ref/source/pythonclient/ibapi/enum_implem.py:12–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11
12class Enum:
13 def __init__(self, *args):
14 self.idx2name = {}
15 for idx, name in enumerate(args):
16 setattr(self, name, idx)
17 self.idx2name[idx] = name
18
19 def toStr(self, idx):
20 return self.idx2name.get(idx, "NOTFOUND")

Callers 5

PriceConditionClass · 0.90
ticktype.pyFile · 0.90
common.pyFile · 0.90
test_enumMethod · 0.90
test_enumMethod · 0.90

Calls

no outgoing calls

Tested by 2

test_enumMethod · 0.72
test_enumMethod · 0.72