pub trait PerpMarket<const DECIMALS: u8>:
SwapMarket<DECIMALS>
+ PositionImpactMarket<DECIMALS>
+ BorrowingFeeMarket<DECIMALS> {
// Required methods
fn funding_factor_per_second(&self) -> &Self::Signed;
fn funding_amount_per_size_pool(&self, is_long: bool) -> Result<&Self::Pool>;
fn claimable_funding_amount_per_size_pool(
&self,
is_long: bool,
) -> Result<&Self::Pool>;
fn funding_amount_per_size_adjustment(&self) -> Self::Num;
fn funding_fee_params(&self) -> Result<FundingFeeParams<Self::Num>>;
fn position_params(&self) -> Result<PositionParams<Self::Num>>;
fn order_fee_params(&self) -> Result<FeeParams<Self::Num>>;
fn min_collateral_factor_for_open_interest_multiplier(
&self,
is_long: bool,
) -> Result<Self::Num>;
fn liquidation_fee_params(&self) -> Result<LiquidationFeeParams<Self::Num>>;
}
Expand description
A perpetual market.
Required Methods§
Sourcefn funding_factor_per_second(&self) -> &Self::Signed
fn funding_factor_per_second(&self) -> &Self::Signed
Get funding factor per second.
Sourcefn funding_amount_per_size_pool(&self, is_long: bool) -> Result<&Self::Pool>
fn funding_amount_per_size_pool(&self, is_long: bool) -> Result<&Self::Pool>
Get funding amount per size pool.
Sourcefn claimable_funding_amount_per_size_pool(
&self,
is_long: bool,
) -> Result<&Self::Pool>
fn claimable_funding_amount_per_size_pool( &self, is_long: bool, ) -> Result<&Self::Pool>
Get claimable funding amount per size pool.
Sourcefn funding_amount_per_size_adjustment(&self) -> Self::Num
fn funding_amount_per_size_adjustment(&self) -> Self::Num
Adjustment factor for packing funding amount per size.
Sourcefn funding_fee_params(&self) -> Result<FundingFeeParams<Self::Num>>
fn funding_fee_params(&self) -> Result<FundingFeeParams<Self::Num>>
Get funding fee params.
Sourcefn position_params(&self) -> Result<PositionParams<Self::Num>>
fn position_params(&self) -> Result<PositionParams<Self::Num>>
Get basic position params.
Sourcefn order_fee_params(&self) -> Result<FeeParams<Self::Num>>
fn order_fee_params(&self) -> Result<FeeParams<Self::Num>>
Get the order fee params.
Sourcefn min_collateral_factor_for_open_interest_multiplier(
&self,
is_long: bool,
) -> Result<Self::Num>
fn min_collateral_factor_for_open_interest_multiplier( &self, is_long: bool, ) -> Result<Self::Num>
Get min collateral factor for open interest multiplier.
Sourcefn liquidation_fee_params(&self) -> Result<LiquidationFeeParams<Self::Num>>
fn liquidation_fee_params(&self) -> Result<LiquidationFeeParams<Self::Num>>
Get liquidation fee params.