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

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

NewOrder(NewOrderInstructionV1)

  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. [] (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

ConsumeEvents(u16)

[writable] OpenOrders accounts.len() - 4 [writable] market accounts.len() - 3 [writable] event queue accounts.len() - 2 [] accounts.len() - 1 []

CancelOrder(CancelOrderInstruction)

  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

NewOrderV2(NewOrderInstructionV2)

  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. [] (optional) the (M)SRM account used for fee discounts

NewOrderV3(NewOrderInstructionV3)

  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. [] (optional) the (M)SRM account used for fee discounts

CancelOrderV2(CancelOrderInstructionV2)

  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

SendTake(SendTakeInstruction)

  1. [writable] market
  2. [writable] the request queue
  3. [writable] the event queue
  4. [writable] bids
  5. [writable] asks
  6. [writable] the coin currency wallet account
  7. [writable] the price currency wallet account
  8. [] signer
  9. [writable] coin vault
  10. [writable] pc vault
  11. [] spl token program
  12. [] (optional) the (M)SRM account used for fee discounts

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

Prune(u16)

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.

ConsumeEventsPermissioned(u16)

[writable] OpenOrders accounts.len() - 3 [writable] market accounts.len() - 2 [writable] event queue accounts.len() - 1 [signer] crank authority

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)

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.