diff --git a/piker/brokers/deribit/venues.py b/piker/brokers/deribit/venues.py index 33d3139c..b814a068 100644 --- a/piker/brokers/deribit/venues.py +++ b/piker/brokers/deribit/venues.py @@ -64,19 +64,19 @@ class Pair(Struct, frozen=True, kw_only=True): quote_currency: str # 'BTC' # dst - settlement_currency: str # "BTC", + base_currency: str # "BTC", tick_size: float # 0.0001 tick_size_steps: list[dict[str, str | int | float]] # [{'above_price': 0.005, 'tick_size': 0.0005}] @property def price_tick(self) -> Decimal: - step_size: str = self.tick_size_steps[0].get('above_price') + step_size: float = self.tick_size_steps[0].get('above_price') return Decimal(step_size) @property def size_tick(self) -> Decimal: - step_size: str = self.tick_size_steps[0].get('tick_size') + step_size: float = self.tick_size_steps[0].get('tick_size') return Decimal(step_size) @property @@ -88,11 +88,12 @@ class Pair(Struct, frozen=True, kw_only=True): return f'{self.symbol}.{self.venue}' -class OptionPair(Struct, frozen=True, kw_only=True): +class OptionPair(Pair, frozen=True, kw_only=True): taker_commission: float # 0.0003 strike: float # 5000.0 settlement_period: str # 'day' + settlement_currency: str # "BTC", rfq: bool # false price_index: str # 'btc_usd' option_type: str # 'call' @@ -129,7 +130,7 @@ class OptionPair(Struct, frozen=True, kw_only=True): @property def bs_dst_asset(self) -> str: - return f'{self.settlement_currency}' + return f'{self.base_currency}' @property def bs_mktid(self) -> str: