pub struct Market {Show 15 fields
pub pair: String,
pub enabled: bool,
pub version: u64,
pub maintenance_margin_ratio: String,
pub max_leverage: String,
pub latest_cumulative_premium_fraction: String,
pub exchange_fee_ratio: String,
pub ecosystem_fund_fee_ratio: String,
pub liquidation_fee_ratio: String,
pub partial_liquidation_ratio: String,
pub funding_rate_epoch_id: String,
pub twap_lookback_window: Option<Duration>,
pub prepaid_bad_debt: Option<Coin>,
pub max_funding_rate: String,
pub oracle_pair: String,
}
Fields§
§pair: String
the trading pair represented by this market always BASE:QUOTE, e.g. BTC:NUSD or ETH:NUSD
enabled: bool
whether or not the market is enabled
version: u64
the version of the Market, only one market can exist per pair, when one is closed it cannot be reactivated, so a new market must be created, this is the version of the market
maintenance_margin_ratio: String
the minimum margin ratio which a user must maintain on this market
max_leverage: String
the maximum leverage a user is able to be taken on this market
Latest cumulative premium fraction for a given pair. Calculated once per funding rate interval. A premium fraction is the difference between mark and index, divided by the number of payments per day. (mark - index) / # payments in a day
exchange_fee_ratio: String
the percentage of the notional given to the exchange when trading
ecosystem_fund_fee_ratio: String
the percentage of the notional transferred to the ecosystem fund when trading
liquidation_fee_ratio: String
the percentage of liquidated position that will be given to out as a reward. Half of the liquidation fee is given to the liquidator, and the other half is given to the ecosystem fund.
partial_liquidation_ratio: String
the portion of the position size we try to liquidate if the available margin is higher than liquidation fee
funding_rate_epoch_id: String
specifies the interval on which the funding rate is updated
twap_lookback_window: Option<Duration>
amount of time to look back for TWAP calculations
prepaid_bad_debt: Option<Coin>
the amount of collateral already credited from the ecosystem fund
max_funding_rate: String
the maximum funding rate payment per epoch, this represents the maximum amount of funding that can be paid out per epoch as a percentage of the position size
oracle_pair: String
the pair of the oracle that is used to determine the index price for the market
Trait Implementations§
Source§impl Message for Market
impl Message for Market
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.impl StructuralPartialEq for Market
Auto Trait Implementations§
impl Freeze for Market
impl RefUnwindSafe for Market
impl Send for Market
impl Sync for Market
impl Unpin for Market
impl UnwindSafe for Market
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<M> NibiruProstMsg for Mwhere
M: Message,
impl<M> NibiruProstMsg for Mwhere
M: Message,
fn to_binary(&self) -> Binary
Source§fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
Name.type_url()
function. This method attempts
to downcast the message to prost::Name, and if successful, constructs a
CosmosMsg::Stargate
object corresponding to the type.