Enum MarketConfigKey

Source
#[non_exhaustive]
#[repr(u16)]
pub enum MarketConfigKey {
Show 62 variants SwapImpactExponent = 0, SwapImpactPositiveFactor = 1, SwapImpactNegativeFactor = 2, SwapFeeReceiverFactor = 3, SwapFeeFactorForPositiveImpact = 4, SwapFeeFactorForNegativeImpact = 5, MinPositionSizeUsd = 6, MinCollateralValue = 7, MinCollateralFactor = 8, MinCollateralFactorForOpenInterestMultiplierForLong = 9, MinCollateralFactorForOpenInterestMultiplierForShort = 10, MaxPositivePositionImpactFactor = 11, MaxNegativePositionImpactFactor = 12, MaxPositionImpactFactorForLiquidations = 13, PositionImpactExponent = 14, PositionImpactPositiveFactor = 15, PositionImpactNegativeFactor = 16, OrderFeeReceiverFactor = 17, OrderFeeFactorForPositiveImpact = 18, OrderFeeFactorForNegativeImpact = 19, LiquidationFeeReceiverFactor = 20, LiquidationFeeFactor = 21, PositionImpactDistributeFactor = 22, MinPositionImpactPoolAmount = 23, BorrowingFeeReceiverFactor = 24, BorrowingFeeFactorForLong = 25, BorrowingFeeFactorForShort = 26, BorrowingFeeExponentForLong = 27, BorrowingFeeExponentForShort = 28, BorrowingFeeOptimalUsageFactorForLong = 29, BorrowingFeeOptimalUsageFactorForShort = 30, BorrowingFeeBaseFactorForLong = 31, BorrowingFeeBaseFactorForShort = 32, BorrowingFeeAboveOptimalUsageFactorForLong = 33, BorrowingFeeAboveOptimalUsageFactorForShort = 34, FundingFeeExponent = 35, FundingFeeFactor = 36, FundingFeeMaxFactorPerSecond = 37, FundingFeeMinFactorPerSecond = 38, FundingFeeIncreaseFactorPerSecond = 39, FundingFeeDecreaseFactorPerSecond = 40, FundingFeeThresholdForStableFunding = 41, FundingFeeThresholdForDecreaseFunding = 42, ReserveFactor = 43, OpenInterestReserveFactor = 44, MaxPnlFactorForLongDeposit = 45, MaxPnlFactorForShortDeposit = 46, MaxPnlFactorForLongWithdrawal = 47, MaxPnlFactorForShortWithdrawal = 48, MaxPnlFactorForLongTrader = 49, MaxPnlFactorForShortTrader = 50, MaxPnlFactorForLongAdl = 51, MaxPnlFactorForShortAdl = 52, MinPnlFactorAfterLongAdl = 53, MinPnlFactorAfterShortAdl = 54, MaxPoolAmountForLongToken = 55, MaxPoolAmountForShortToken = 56, MaxPoolValueForDepositForLongToken = 57, MaxPoolValueForDepositForShortToken = 58, MaxOpenInterestForLong = 59, MaxOpenInterestForShort = 60, MinTokensForFirstDeposit = 61,
}
Expand description

Market config keys.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

SwapImpactExponent = 0

Swap impact exponent.

§

SwapImpactPositiveFactor = 1

Swap impact positive factor.

§

SwapImpactNegativeFactor = 2

Swap impact negative factor.

§

SwapFeeReceiverFactor = 3

Swap fee receiver factor.

§

SwapFeeFactorForPositiveImpact = 4

Swap fee factor for positive impact.

§

SwapFeeFactorForNegativeImpact = 5

Swap fee factor for negative impact.

§

MinPositionSizeUsd = 6

Min position size usd.

§

MinCollateralValue = 7

Min collateral value.

§

MinCollateralFactor = 8

Min collateral factor.

§

MinCollateralFactorForOpenInterestMultiplierForLong = 9

Min collateral factor for open interest multiplier for long.

§

MinCollateralFactorForOpenInterestMultiplierForShort = 10

Min collateral factor for open interest multiplier for short.

§

MaxPositivePositionImpactFactor = 11

Max positive position impact factor.

§

MaxNegativePositionImpactFactor = 12

Max negative position impact factor.

§

MaxPositionImpactFactorForLiquidations = 13

Max position impact factor for liquidations.

§

PositionImpactExponent = 14

Position impact exponent.

§

PositionImpactPositiveFactor = 15

Position impact positive factor.

§

PositionImpactNegativeFactor = 16

Position impact negative factor.

§

OrderFeeReceiverFactor = 17

Order fee receiver factor.

§

OrderFeeFactorForPositiveImpact = 18

Order fee factor for positive impact.

§

OrderFeeFactorForNegativeImpact = 19

Order fee factor for negative impact.

§

LiquidationFeeReceiverFactor = 20

Liquidation fee receiver factor.

§

LiquidationFeeFactor = 21

Liquidation fee factor.

§

PositionImpactDistributeFactor = 22

Position impact distribute factor.

§

MinPositionImpactPoolAmount = 23

Min position impact pool amount.

§

BorrowingFeeReceiverFactor = 24

Borrowing fee receiver factor.

§

BorrowingFeeFactorForLong = 25

Borrowing fee factor for long.

§

BorrowingFeeFactorForShort = 26

Borrowing fee factor for short.

§

BorrowingFeeExponentForLong = 27

Borrowing fee exponent for long.

§

BorrowingFeeExponentForShort = 28

Borrowing fee exponent for short.

§

BorrowingFeeOptimalUsageFactorForLong = 29

Borrowing fee optimal usage factor for long.

§

BorrowingFeeOptimalUsageFactorForShort = 30

Borrowing fee optimal usage factor for short.

§

BorrowingFeeBaseFactorForLong = 31

Borrowing fee base factor for long.

§

BorrowingFeeBaseFactorForShort = 32

Borrowing fee base factor for short.

§

BorrowingFeeAboveOptimalUsageFactorForLong = 33

Borrowing fee above optimal usage factor for long.

§

BorrowingFeeAboveOptimalUsageFactorForShort = 34

Borrowing fee above optimal usage factor for short.

§

FundingFeeExponent = 35

Funding fee exponent.

§

FundingFeeFactor = 36

Funding fee factor.

§

FundingFeeMaxFactorPerSecond = 37

Funding fee max factor per second.

§

FundingFeeMinFactorPerSecond = 38

Funding fee min factor per second.

§

FundingFeeIncreaseFactorPerSecond = 39

Funding fee increase factor per second.

§

FundingFeeDecreaseFactorPerSecond = 40

Funding fee decrease factor per second.

§

FundingFeeThresholdForStableFunding = 41

Funding fee threshold for stable funding.

§

FundingFeeThresholdForDecreaseFunding = 42

Funding fee threshold for decrease funding.

§

ReserveFactor = 43

Reserve factor.

§

OpenInterestReserveFactor = 44

Open interest reserve factor.

§

MaxPnlFactorForLongDeposit = 45

Max PNL factor for long deposit.

§

MaxPnlFactorForShortDeposit = 46

Max PNL factor for short deposit.

§

MaxPnlFactorForLongWithdrawal = 47

Max PNL factor for long withdrawal.

§

MaxPnlFactorForShortWithdrawal = 48

Max PNL factor for short withdrawal.

§

MaxPnlFactorForLongTrader = 49

Max PNL factor for long trader.

§

MaxPnlFactorForShortTrader = 50

Max PNL factor for short trader.

§

MaxPnlFactorForLongAdl = 51

Max PNL factor for long ADL.

§

MaxPnlFactorForShortAdl = 52

Max PNL factor for short ADL.

§

MinPnlFactorAfterLongAdl = 53

Min PNL factor after long ADL.

§

MinPnlFactorAfterShortAdl = 54

Min PNL factor after short ADL.

§

MaxPoolAmountForLongToken = 55

Max pool amount for long token.

§

MaxPoolAmountForShortToken = 56

Max pool amount for short token.

§

MaxPoolValueForDepositForLongToken = 57

Max pool value for deposit for long token.

§

MaxPoolValueForDepositForShortToken = 58

Max pool value for deposit for short token.

§

MaxOpenInterestForLong = 59

Max open interest for long.

§

MaxOpenInterestForShort = 60

Max open interest for short.

§

MinTokensForFirstDeposit = 61

Min tokens for first deposit.

Trait Implementations§

Source§

impl Clone for MarketConfigKey

Source§

fn clone(&self) -> MarketConfigKey

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MarketConfigKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MarketConfigKey

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for MarketConfigKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<MarketConfigKey> for u16

Source§

fn from(enum_value: MarketConfigKey) -> Self

Converts to this type from the input type.
Source§

impl FromStr for MarketConfigKey

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<MarketConfigKey, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for MarketConfigKey

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoEnumIterator for MarketConfigKey

Source§

impl Ord for MarketConfigKey

Source§

fn cmp(&self, other: &MarketConfigKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for MarketConfigKey

Source§

fn eq(&self, other: &MarketConfigKey) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for MarketConfigKey

Source§

fn partial_cmp(&self, other: &MarketConfigKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for MarketConfigKey

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<&str> for MarketConfigKey

Source§

type Error = ParseError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<MarketConfigKey, <Self as TryFrom<&str>>::Error>

Performs the conversion.
Source§

impl TryFrom<u16> for MarketConfigKey

Source§

type Error = TryFromPrimitiveError<MarketConfigKey>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for MarketConfigKey

Source§

const NAME: &'static str = "MarketConfigKey"

Source§

type Primitive = u16

Source§

type Error = TryFromPrimitiveError<MarketConfigKey>

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Source§

impl Copy for MarketConfigKey

Source§

impl Eq for MarketConfigKey

Source§

impl StructuralPartialEq for MarketConfigKey

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,