From 327129db37c12cbb209dd04c3e4adf36d748f283 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 25 Feb 2021 18:44:40 -0500 Subject: [PATCH] Drop paper limit submissions for alerts --- piker/exchange/_ems.py | 5 ----- piker/exchange/_paper_engine.py | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/piker/exchange/_ems.py b/piker/exchange/_ems.py index 465b9d15..a3938b06 100644 --- a/piker/exchange/_ems.py +++ b/piker/exchange/_ems.py @@ -157,11 +157,6 @@ async def execute_triggers( price = tick.get('price') ttype = tick['type'] - # lel, fuck you ib - # if price < 0: - # log.error(f'!!?!?!VOLUME TICK {tick}!?!?') - # continue - # update to keep new cmds informed book.lasts[(broker, symbol)] = price diff --git a/piker/exchange/_paper_engine.py b/piker/exchange/_paper_engine.py index 35f24f98..d218ffb7 100644 --- a/piker/exchange/_paper_engine.py +++ b/piker/exchange/_paper_engine.py @@ -67,6 +67,10 @@ class PaperBoi: # {'local_trades': (event_name, msg)} reqid = str(uuid.uuid4()) + if action == 'alert': + # bypass all fill simulation + return reqid + # TODO: net latency model # we checkpoint here quickly particulalry # 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) - 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 if action == 'buy':