Skip to content

Commit

Permalink
add parse_event func
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWang committed Mar 2, 2017
1 parent a38fb8d commit 6eafed4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rqalpha/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,7 @@ class EVENT(Enum):
TRADE = 'trade'

ON_LINE_PROFILER_RESULT = 'on_line_profiler_result'


def parse_event(event_str):
return EVENT.__members__.get(event_str.upper(), None)

0 comments on commit 6eafed4

Please sign in to comment.