Drop paper limit submissions for alerts
parent
9f9b5480a6
commit
327129db37
|
@ -157,11 +157,6 @@ async def execute_triggers(
|
||||||
price = tick.get('price')
|
price = tick.get('price')
|
||||||
ttype = tick['type']
|
ttype = tick['type']
|
||||||
|
|
||||||
# lel, fuck you ib
|
|
||||||
# if price < 0:
|
|
||||||
# log.error(f'!!?!?!VOLUME TICK {tick}!?!?')
|
|
||||||
# continue
|
|
||||||
|
|
||||||
# update to keep new cmds informed
|
# update to keep new cmds informed
|
||||||
book.lasts[(broker, symbol)] = price
|
book.lasts[(broker, symbol)] = price
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,10 @@ class PaperBoi:
|
||||||
# {'local_trades': (event_name, msg)}
|
# {'local_trades': (event_name, msg)}
|
||||||
reqid = str(uuid.uuid4())
|
reqid = str(uuid.uuid4())
|
||||||
|
|
||||||
|
if action == 'alert':
|
||||||
|
# bypass all fill simulation
|
||||||
|
return reqid
|
||||||
|
|
||||||
# TODO: net latency model
|
# TODO: net latency model
|
||||||
# we checkpoint here quickly particulalry
|
# we checkpoint here quickly particulalry
|
||||||
# for dark orders since we want the dark_executed
|
# for dark orders since we want the dark_executed
|
||||||
|
@ -102,7 +106,8 @@ class PaperBoi:
|
||||||
):
|
):
|
||||||
await self.fake_fill(clear_price, size, action, reqid, oid)
|
await self.fake_fill(clear_price, size, action, reqid, oid)
|
||||||
|
|
||||||
else: # register this submissions as a paper live order
|
else:
|
||||||
|
# register this submissions as a paper live order
|
||||||
|
|
||||||
# submit order to book simulation fill loop
|
# submit order to book simulation fill loop
|
||||||
if action == 'buy':
|
if action == 'buy':
|
||||||
|
|
Loading…
Reference in New Issue