Logic tidbits for the ems and paper engine to handle racy cases discovered after more thorough testing using 1s sampled feeds on the binance backend - i.e. testing against actual HFT feeds.
summary:
tweaking the PaperBoi internal order tables to use dict[str, defaultdict[str, bidict]] with only oid keys on the second level instead of price (which can change in a racy way relative to existing / modified entries).
adding special skip cases to the ems relay loop for when the paper engine relays status messages fast enough that they get scheduled for processing before preceding ack msgs - this might eventually drive adding .oid to BrokerdStatus responses and/or replacing that msg with Status on the brokerd leg
a bug fix to actually pass the broker suffixed symbol key to PaperBoi.submit_limit() so that submissions actually clear 😂
todo:
[x] sure would like the paper engine to clear "live" submissions on 'last', 'trade' ticks to be more realistic instead of only on the l1 (bid/ask) ticks. => completed in cbc0eb43
[x] there currently seems to be a bug with the order mode allocator where you can make a position outside the limit and even close it out 😂 ?!? => e5d8fa59, 80b5c4bd
turns out there's more issue here but we're deferring to #392.. since the issues are actually already on master from the reworks to the .ui.order_mode codez.
[x] fix this stupid thing:
Aug 24 15:13:54 (chart, 7162, piker.ui._interaction.handle_viewmode_kb_inputs)) [ERROR] piker.ui._position _position.py:260 Invalid value foraccount: paper=> 91ccdb71
Logic tidbits for the ems and paper engine to handle racy cases discovered after more thorough testing using 1s sampled feeds on the
binance
backend - i.e. testing against actual HFT feeds.summary:
PaperBoi
internal order tables to usedict[str, defaultdict[str, bidict]]
with onlyoid
keys on the second level instead of price (which can change in a racy way relative to existing / modified entries)..oid
toBrokerdStatus
responses and/or replacing that msg withStatus
on thebrokerd
legPaperBoi.submit_limit()
so that submissions actually clear 😂todo:
'last', 'trade'
ticks to be more realistic instead of only on the l1 (bid/ask) ticks. => completed in cbc0eb43.ui.order_mode
codez.Aug 24 15:13:54 (chart, 7162, piker.ui._interaction.handle_viewmode_kb_inputs)) [ERROR] piker.ui._position _position.py:260 Invalid value for
account: paper
=> 91ccdb71