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

pub enum MarketInstruction {
Show 17 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, Prune(u16),
}

Variants

InitializeMarket
  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
  11. [] open orders market authority (optional)
  12. [] prune authority (optional, requires open orders market authority)

Tuple Fields of InitializeMarket

0: InitializeMarketInstruction
NewOrder
  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

Tuple Fields of NewOrder

0: NewOrderInstructionV1
MatchOrders
  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

Tuple Fields of MatchOrders

0: u16
ConsumeEvents

[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

Tuple Fields of ConsumeEvents

0: u16
CancelOrder
  1. [] market
  2. [writable] OpenOrders
  3. [writable] the request queue
  4. [signer] the OpenOrders owner

Tuple Fields of CancelOrder

0: CancelOrderInstruction
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
  1. [] market
  2. [writable] OpenOrders
  3. [writable] the request queue
  4. [signer] the OpenOrders owner

Tuple Fields of CancelOrderByClientId

0: u64
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
NewOrderV2
  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

Tuple Fields of NewOrderV2

0: NewOrderInstructionV2
NewOrderV3
  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

Tuple Fields of NewOrderV3

0: NewOrderInstructionV3
CancelOrderV2
  1. [writable] market
  2. [writable] bids
  3. [writable] asks
  4. [writable] OpenOrders
  5. [signer] the OpenOrders owner
  6. [writable] event_q

Tuple Fields of CancelOrderV2

0: CancelOrderInstructionV2
CancelOrderByClientIdV2
  1. [writable] market
  2. [writable] bids
  3. [writable] asks
  4. [writable] OpenOrders
  5. [signer] the OpenOrders owner
  6. [writable] event_q

Tuple Fields of CancelOrderByClientIdV2

0: u64
SendTake
  1. [writable] market
  2. [writable] bids
  3. [writable] asks
  4. [writable] OpenOrders
  5. []

Tuple Fields of SendTake

0: SendTakeInstruction
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
  5. [signer] open orders market authority (optional).
Prune

Removes all orders for a given open orders account from the orderbook.

  1. [writable] market
  2. [writable] bids
  3. [writable] asks
  4. [signer] prune authority
  5. [] open orders.
  6. [] open orders owner.
  7. [writable] event queue.

Tuple Fields of Prune

0: u16

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

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

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.