pub struct Market {Show 20 fields
pub discriminator: [u8; 8],
pub version: u16,
pub bump: [u8; 1],
pub market_maker: MarketMaker,
pub pool: Pubkey,
pub address_lookup_table: Pubkey,
pub max_leverage: u32,
pub protocol_fee: u16,
pub protocol_fee_on_collateral: u16,
pub liquidation_fee: u32,
pub liquidation_threshold: u32,
pub limit_order_execution_fee: u32,
pub oracle_price_deviation_threshold: u32,
pub disabled: bool,
pub borrowed_shares_a: u64,
pub borrowed_shares_b: u64,
pub borrow_limit_a: u64,
pub borrow_limit_b: u64,
pub max_swap_slippage: u32,
pub reserved: [u8; 211],
}Fields§
§discriminator: [u8; 8]§version: u16Struct version
bump: [u8; 1]Bump seed for the market account
market_maker: MarketMakerMarket maker: Orca, Fusion, Raydium, etc…
pool: PubkeyLiquidity pool address
address_lookup_table: PubkeyAddress Lookup Table address for this market
max_leverage: u32Maximum allowed leverage for this market
protocol_fee: u16Protocol fee denominated in hundredths of a bip. (Value of 100 is equal to 0.01%)
protocol_fee_on_collateral: u16Protocol fee on collateral (funds provided by a user) denominated in hundredths of a bip. (Value of 100 is equal to 0.01%)
liquidation_fee: u32Liquidation fee denominated in hundredths of a bip. (Value of 100 is equal to 0.01%)
liquidation_threshold: u32Liquidation threshold. The position is treated as unhealthy if debt > balance * (liquidation_threshold / HUNDRED_PERCENT).
limit_order_execution_fee: u32Limit order execution fee denominated in hundredths of a bip. (Value of 100 is equal to 0.01%)
oracle_price_deviation_threshold: u32Oracle price deviation threshold in percent. If it’s set to zero, the default value from the global config is used.
disabled: boolTrue if the market is disabled (no more position can be opened).
Total borrowed shares of token A.
Total borrowed shares of token B.
borrow_limit_a: u64Total borrow limit for this market in token A.
borrow_limit_b: u64Total borrow limit for this market in token B.
max_swap_slippage: u32Maximum allowed swap slippage percentage. If it’s set to zero, the default value from the global config is used.
reserved: [u8; 211]Reserved
Implementations§
Trait Implementations§
Source§impl BorshDeserialize for Marketwhere
[u8; 8]: BorshDeserialize,
u16: BorshDeserialize,
[u8; 1]: BorshDeserialize,
MarketMaker: BorshDeserialize,
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
bool: BorshDeserialize,
u64: BorshDeserialize,
[u8; 211]: BorshDeserialize,
impl BorshDeserialize for Marketwhere
[u8; 8]: BorshDeserialize,
u16: BorshDeserialize,
[u8; 1]: BorshDeserialize,
MarketMaker: BorshDeserialize,
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
bool: BorshDeserialize,
u64: BorshDeserialize,
[u8; 211]: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for Marketwhere
[u8; 8]: BorshSerialize,
u16: BorshSerialize,
[u8; 1]: BorshSerialize,
MarketMaker: BorshSerialize,
Pubkey: BorshSerialize,
u32: BorshSerialize,
bool: BorshSerialize,
u64: BorshSerialize,
[u8; 211]: BorshSerialize,
impl BorshSerialize for Marketwhere
[u8; 8]: BorshSerialize,
u16: BorshSerialize,
[u8; 1]: BorshSerialize,
MarketMaker: BorshSerialize,
Pubkey: BorshSerialize,
u32: BorshSerialize,
bool: BorshSerialize,
u64: BorshSerialize,
[u8; 211]: BorshSerialize,
Source§impl<'a> TryFrom<&AccountInfo<'a>> for Market
impl<'a> TryFrom<&AccountInfo<'a>> for Market
impl Eq for Market
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more