Don't submit limits on alerts

syseng_tweaks
Tyler Goodlet 2021-04-29 08:17:40 -04:00
parent ecd94ce24d
commit 4d03d62641
1 changed files with 29 additions and 20 deletions

View File

@ -179,6 +179,11 @@ async def execute_triggers(
# majority of iterations will be non-matches
continue
action = cmd['action']
if action != 'alert':
# executable order submission
# submit_price = price + price*percent_away
submit_price = price + abs_diff_away
@ -205,6 +210,10 @@ async def execute_triggers(
# register broker request id to ems id
book._broker2ems_ids[reqid] = oid
else:
# alerts have no broker request id
reqid = ''
resp = {
'resp': 'dark_executed',
'time_ns': time.time_ns(),