From 0916b707e2034a38ef9512f352a87bab9b8a8713 Mon Sep 17 00:00:00 2001 From: Nelson Torres Date: Thu, 14 Nov 2024 17:39:52 -0300 Subject: [PATCH] Added options symbols to get_assets --- piker/brokers/deribit/api.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/piker/brokers/deribit/api.py b/piker/brokers/deribit/api.py index 1e17868e..480f2ba0 100644 --- a/piker/brokers/deribit/api.py +++ b/piker/brokers/deribit/api.py @@ -321,6 +321,15 @@ class Client: name=name, atype=atype, tx_tick=tx_tick) + + instruments = await self.symbol_info(currency=name.lower()) + for instrument in instruments: + pair = instruments[instrument] + assets[pair.symbol] = Asset( + name=pair.symbol, + atype='option', + tx_tick=pair.size_tick) + return assets async def get_mkt_pairs(self) -> dict[str, Pair]: