Enum serum_dex::instruction::MarketInstruction[][src]

pub enum MarketInstruction {
Show variants InitializeMarket(InitializeMarketInstruction), NewOrder(NewOrderInstructionV1), MatchOrders(u16), ConsumeEvents(u16), CancelOrder(CancelOrderInstruction), SettleFunds, CancelOrderByClientId(u64), DisableMarket, SweepFees, NewOrderV2(NewOrderInstructionV2), NewOrderV3(NewOrderInstructionV3), CancelOrderV2(CancelOrderInstructionV2), CancelOrderByClientIdV2(u64), SendTake(SendTakeInstruction), CloseOpenOrders, InitOpenOrders,
}

Variants

InitializeMarket(InitializeMarketInstruction)
  1. [writable] the market to initialize
  2. [writable] zeroed out request queue
  3. [writable] zeroed out event queue
  4. [writable] zeroed out bids
  5. [writable] zeroed out asks
  6. [writable] spl-token account for the coin currency
  7. [writable] spl-token account for the price currency
  8. [] coin currency Mint
  9. [] price currency Mint
  10. [] the rent sysvar
  1. [writable] the market
  2. [writable] the OpenOrders account to use
  3. [writable] the request queue
  4. [writable] the (coin or price currency) account paying for the order
  5. [signer] owner of the OpenOrders account
  6. [writable] coin vault
  7. [writable] pc vault
  8. [] spl token program
  9. [] the rent sysvar
  10. [writable] (optional) the (M)SRM account used for fee discounts
MatchOrders(u16)
  1. [writable] market
  2. [writable] req_q
  3. [writable] event_q
  4. [writable] bids
  5. [writable] asks
  6. [writable] coin fee receivable account
  7. [writable] pc fee receivable account
ConsumeEvents(u16)

[writable] OpenOrders accounts.len() - 4 [writable] market accounts.len() - 3 [writable] event queue accounts.len() - 2 [writable] coin fee receivable account accounts.len() - 1 [writable] pc fee receivable account

  1. [] market
  2. [writable] OpenOrders
  3. [writable] the request queue
  4. [signer] the OpenOrders owner
SettleFunds
  1. [writable] market
  2. [writable] OpenOrders
  3. [signer] the OpenOrders owner
  4. [writable] coin vault
  5. [writable] pc vault
  6. [writable] coin wallet
  7. [writable] pc wallet
  8. [] vault signer
  9. [] spl token program
  10. [writable] (optional) referrer pc wallet
CancelOrderByClientId(u64)
  1. [] market
  2. [writable] OpenOrders
  3. [writable] the request queue
  4. [signer] the OpenOrders owner
DisableMarket
  1. [writable] market
  2. [signer] disable authority
SweepFees
  1. [writable] market
  2. [writable] pc vault
  3. [signer] fee sweeping authority
  4. [writable] fee receivable account
  5. [] vault signer
  6. [] spl token program
  1. [writable] the market
  2. [writable] the OpenOrders account to use
  3. [writable] the request queue
  4. [writable] the (coin or price currency) account paying for the order
  5. [signer] owner of the OpenOrders account
  6. [writable] coin vault
  7. [writable] pc vault
  8. [] spl token program
  9. [] the rent sysvar
  10. [writable] (optional) the (M)SRM account used for fee discounts
  1. [writable] the market
  2. [writable] the OpenOrders account to use
  3. [writable] the request queue
  4. [writable] the event queue
  5. [writable] bids
  6. [writable] asks
  7. [writable] the (coin or price currency) account paying for the order
  8. [signer] owner of the OpenOrders account
  9. [writable] coin vault
  10. [writable] pc vault
  11. [] spl token program
  12. [] the rent sysvar
  13. [writable] (optional) the (M)SRM account used for fee discounts
  1. [writable] market
  2. [writable] bids
  3. [writable] asks
  4. [writable] OpenOrders
  5. [signer] the OpenOrders owner
  6. [writable] event_q
CancelOrderByClientIdV2(u64)
  1. [writable] market
  2. [writable] bids
  3. [writable] asks
  4. [writable] OpenOrders
  5. [signer] the OpenOrders owner
  6. [writable] event_q
  1. [writable] market
  2. [writable] bids
  3. [writable] asks
  4. [writable] OpenOrders
  5. []
CloseOpenOrders
  1. [writable] OpenOrders
  2. [signer] the OpenOrders owner
  3. [writable] the destination account to send rent exemption SOL to
  4. [] market
InitOpenOrders
  1. [writable] OpenOrders
  2. [signer] the OpenOrders owner
  3. [] market
  4. [] the rent sysvar

Implementations

impl MarketInstruction[src]

pub fn pack(&self) -> Vec<u8>[src]

pub fn unpack(versioned_bytes: &[u8]) -> Option<Self>[src]

Trait Implementations

impl Clone for MarketInstruction[src]

fn clone(&self) -> MarketInstruction[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for MarketInstruction[src]

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

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for MarketInstruction[src]

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

Deserialize this value from the given Serde deserializer. Read more

impl PartialEq<MarketInstruction> for MarketInstruction[src]

fn eq(&self, other: &MarketInstruction) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &MarketInstruction) -> bool[src]

This method tests for !=.

impl Serialize for MarketInstruction[src]

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

Serialize this value into the given Serde serializer. Read more

impl Eq for MarketInstruction[src]

impl StructuralEq for MarketInstruction[src]

impl StructuralPartialEq for MarketInstruction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> AbiEnumVisitor for T where
    T: Serialize + AbiExample + ?Sized

pub default fn visit_for_abi(
    &self,
    digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>

impl<T> AbiEnumVisitor for T where
    T: Serialize + ?Sized

pub default fn visit_for_abi(
    &self,
    _digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>

impl<T> AbiExample for T

pub default fn example() -> T

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

pub fn vzip(self) -> V

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