minor fixes in venues
parent
b3bbef30c0
commit
d3ca571c0e
|
@ -64,19 +64,19 @@ class Pair(Struct, frozen=True, kw_only=True):
|
||||||
quote_currency: str # 'BTC'
|
quote_currency: str # 'BTC'
|
||||||
|
|
||||||
# dst
|
# dst
|
||||||
settlement_currency: str # "BTC",
|
base_currency: str # "BTC",
|
||||||
|
|
||||||
tick_size: float # 0.0001
|
tick_size: float # 0.0001
|
||||||
tick_size_steps: list[dict[str, str | int | float]] # [{'above_price': 0.005, 'tick_size': 0.0005}]
|
tick_size_steps: list[dict[str, str | int | float]] # [{'above_price': 0.005, 'tick_size': 0.0005}]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def price_tick(self) -> Decimal:
|
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)
|
return Decimal(step_size)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def size_tick(self) -> Decimal:
|
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)
|
return Decimal(step_size)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -88,11 +88,12 @@ class Pair(Struct, frozen=True, kw_only=True):
|
||||||
return f'{self.symbol}.{self.venue}'
|
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
|
taker_commission: float # 0.0003
|
||||||
strike: float # 5000.0
|
strike: float # 5000.0
|
||||||
settlement_period: str # 'day'
|
settlement_period: str # 'day'
|
||||||
|
settlement_currency: str # "BTC",
|
||||||
rfq: bool # false
|
rfq: bool # false
|
||||||
price_index: str # 'btc_usd'
|
price_index: str # 'btc_usd'
|
||||||
option_type: str # 'call'
|
option_type: str # 'call'
|
||||||
|
@ -129,7 +130,7 @@ class OptionPair(Struct, frozen=True, kw_only=True):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def bs_dst_asset(self) -> str:
|
def bs_dst_asset(self) -> str:
|
||||||
return f'{self.settlement_currency}'
|
return f'{self.base_currency}'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def bs_mktid(self) -> str:
|
def bs_mktid(self) -> str:
|
||||||
|
|
Loading…
Reference in New Issue