Raw-dog-pop cancelled paper entries; old price dun matter

size_in_shm_token
Tyler Goodlet 2022-08-24 14:43:37 -04:00
parent 430d065da6
commit 9200e8da57
1 changed files with 2 additions and 3 deletions

View File

@ -106,7 +106,6 @@ class PaperBoi(Struct):
if entry:
# order is already existing, this is a modify
(oid, symbol, action, old_price) = entry
assert old_price != price
is_modify = True
else:
# register order internally
@ -183,9 +182,9 @@ class PaperBoi(Struct):
oid, symbol, action, price = self._reqids[reqid]
if action == 'buy':
self._buys[symbol].pop((oid, price))
self._buys[symbol].pop(oid, None)
elif action == 'sell':
self._sells[symbol].pop((oid, price))
self._sells[symbol].pop(oid, None)
# TODO: net latency model
await trio.sleep(0.05)