From c415bd1ee1379a883cdd03c43b2756eb49bff865 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 9 May 2023 14:37:32 -0400 Subject: [PATCH] If backend does not provide `bs_mktid`, use the `bs_fqme` --- piker/data/validate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/piker/data/validate.py b/piker/data/validate.py index 4b92e662..2b07a094 100644 --- a/piker/data/validate.py +++ b/piker/data/validate.py @@ -144,13 +144,14 @@ def validate_backend( 'lot_tick_size', Decimal('1'), ) + bs_mktid = init.get('bs_mktid') or bs_fqme mkt = MktPair.from_fqme( fqme=f'{bs_fqme}.{mod.name}', price_tick=price_tick, size_tick=size_tick, - bs_mktid=str(init['bs_mktid']), + bs_mktid=str(bs_mktid), _atype=symbol_info['asset_type'] )