Skip to content

Commit

Permalink
Lower the paper engine order-cancel latency
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed May 29, 2023
1 parent 8f54cc1 commit 7ff80fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions piker/clearing/_paper_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 7ff80fc

Please sign in to comment.