diff --git a/piker/brokers/deribit/api.py b/piker/brokers/deribit/api.py index 6f8f659d..235a49d3 100644 --- a/piker/brokers/deribit/api.py +++ b/piker/brokers/deribit/api.py @@ -344,6 +344,28 @@ class Client: 'private/cancel', {'order_id': oid}) return resp.result + async def exch_info( + self, + sym: str | None = None, + + venue: MarketType | None = None, + expiry: str | None = None, + + ) -> dict[str, Pair] | Pair: + + pair_table: dict[str, Pair] = self._pairs + + if ( + sym + and (cached_pair := pair_table.get(sym)) + ): + return cached_pair + + if sym: + return pair_table[sym.lower()] + else: + return self._pairs + async def symbol_info( self, instrument: Optional[str] = None,