From 22622e1c01a2d0c99c3da85d06c2a000938f7010 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 10 Mar 2023 17:59:00 -0500 Subject: [PATCH] `ib`: (cukcit) just presume a stonk if we can read type from existing ledger.. --- piker/brokers/ib/broker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piker/brokers/ib/broker.py b/piker/brokers/ib/broker.py index d5b7571e..bc65d6a2 100644 --- a/piker/brokers/ib/broker.py +++ b/piker/brokers/ib/broker.py @@ -1153,7 +1153,7 @@ def norm_trade_records( # special handling of symbol extraction from # flex records using some ad-hoc schema parsing. - asset_type: str = record.get('assetCategory') or record['secType'] + asset_type: str = record.get('assetCategory') or record.get('secType', 'STK') # TODO: XXX: WOA this is kinda hacky.. probably # should figure out the correct future pair key more