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, **data: dict,
) -> dict: ) -> dict:
cmd = self._sent_orders[uuid] cmd = self._sent_orders[uuid]
cmd.update(data) msg = cmd.dict()
self._sent_orders[uuid] = cmd msg.update(data)
self._to_ems.send_nowait(cmd) self._sent_orders[uuid] = OrderMsg(**msg)
self._to_ems.send_nowait(msg)
return cmd return cmd
def cancel(self, uuid: str) -> bool: def cancel(self, uuid: str) -> bool: