Don't submit limits on alerts
parent
ecd94ce24d
commit
4d03d62641
|
@ -179,6 +179,11 @@ async def execute_triggers(
|
||||||
# majority of iterations will be non-matches
|
# majority of iterations will be non-matches
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
action = cmd['action']
|
||||||
|
|
||||||
|
if action != 'alert':
|
||||||
|
# executable order submission
|
||||||
|
|
||||||
# submit_price = price + price*percent_away
|
# submit_price = price + price*percent_away
|
||||||
submit_price = price + abs_diff_away
|
submit_price = price + abs_diff_away
|
||||||
|
|
||||||
|
@ -205,6 +210,10 @@ async def execute_triggers(
|
||||||
# register broker request id to ems id
|
# register broker request id to ems id
|
||||||
book._broker2ems_ids[reqid] = oid
|
book._broker2ems_ids[reqid] = oid
|
||||||
|
|
||||||
|
else:
|
||||||
|
# alerts have no broker request id
|
||||||
|
reqid = ''
|
||||||
|
|
||||||
resp = {
|
resp = {
|
||||||
'resp': 'dark_executed',
|
'resp': 'dark_executed',
|
||||||
'time_ns': time.time_ns(),
|
'time_ns': time.time_ns(),
|
||||||
|
|
Loading…
Reference in New Issue