From 7ff80fc04975b2de11f7f8bdfb146863c82b9158 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 29 May 2023 17:48:03 -0400 Subject: [PATCH] Lower the paper engine order-cancel latency --- piker/clearing/_paper_engine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/piker/clearing/_paper_engine.py b/piker/clearing/_paper_engine.py index 44171dbc0..fd998e97d 100644 --- a/piker/clearing/_paper_engine.py +++ b/piker/clearing/_paper_engine.py @@ -124,7 +124,7 @@ async def submit_limit( # for dark orders since we want the dark_executed # to trigger first thus creating a lookup entry # in the broker trades event processing loop - await trio.sleep(0.05) + await trio.sleep(0.01) if ( action == 'sell' @@ -191,7 +191,7 @@ async def submit_cancel( self._sells[symbol].pop(oid, None) # TODO: net latency model - await trio.sleep(0.05) + await trio.sleep(0.01) msg = BrokerdStatus( status='canceled', @@ -224,7 +224,7 @@ async def fake_fill( ''' # TODO: net latency model - await trio.sleep(0.05) + await trio.sleep(0.01) fill_time_ns = time.time_ns() fill_time_s = time.time()