diff --git a/piker/clearing/_ems.py b/piker/clearing/_ems.py index 70187a6c..f5eeff87 100644 --- a/piker/clearing/_ems.py +++ b/piker/clearing/_ems.py @@ -576,7 +576,8 @@ async def translate_and_relay_brokerd_events( # cancelled by the ems controlling client before we # received this ack, in which case we relay that cancel # signal **asap** to the backend broker - if entry.action == 'cancel': + action = getattr(entry, 'action', None) + if action and action == 'cancel': # assign newly providerd broker backend request id entry.reqid = reqid @@ -965,10 +966,10 @@ async def _emsd_main( ): # XXX: this should be initial price quote from target provider - first_quote = feed.first_quote + first_quote = feed.first_quotes[symbol] book = _router.get_dark_book(broker) - book.lasts[(broker, symbol)] = first_quote[symbol]['last'] + book.lasts[(broker, symbol)] = first_quote['last'] # open a stream with the brokerd backend for order # flow dialogue