minor fixes in venues

jsonrpc_err_in_rent_task
Nelson Torres 2024-11-08 21:34:03 +00:00
parent b3bbef30c0
commit d3ca571c0e
1 changed files with 6 additions and 5 deletions

View File

@ -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: