Validate client message updates

ems_to_bidir_streaming
Tyler Goodlet 2021-06-03 09:06:08 -04:00
parent f4c9e20f0d
commit f9238f3a8a
1 changed files with 4 additions and 3 deletions

View File

@ -96,9 +96,10 @@ class OrderBook:
**data: dict,
) -> dict:
cmd = self._sent_orders[uuid]
cmd.update(data)
self._sent_orders[uuid] = cmd
self._to_ems.send_nowait(cmd)
msg = cmd.dict()
msg.update(data)
self._sent_orders[uuid] = OrderMsg(**msg)
self._to_ems.send_nowait(msg)
return cmd
def cancel(self, uuid: str) -> bool: