Enum dex_v3::instruction::DexInstruction[][src]

pub enum DexInstruction {
    CreateMarket(Params),
    NewOrder(Params),
    CancelOrder(Params),
    ConsumeEvents(Params),
    Settle(Params),
    InitializeAccount(Params),
    SweepFees,
    CloseAccount,
    CloseMarket,
}
Expand description

Describes all possible instructions and their required accounts

Variants

CreateMarket(Params)

Creates a new DEX market

indexwritablesignerdescription
0The sysvar clock account
1The market account
2The orderbook account
4The base token vault account
5The quote token vault account
6The Asset Agnostic Orderbook program account
6The market admin account
NewOrder(Params)

Execute a new order instruction. Supported types include Limit, IOC, FOK, or Post only.

indexwritablesignerdescription
0The asset agnostic orderbook program
1The SPL token program
3The system program
4The rent sysvar
5The DEX market
6The DEX market signer
7The orderbook
8The event queue
9The bids shared memory
10The asks shared memory
11The base token vault
12The quote token vault
13The DEX user account
14The user’s source token account
15The user’s wallet
16The optional SRM or MSRM discount token account (must be owned by the user wallet)
CancelOrder(Params)

Cancel an existing order and remove it from the orderbook.

indexwritablesignerdescription
0The asset agnostic orderbook program
1The DEX market
2The DEX market signer
3The orderbook
4The event queue
5The bids shared memory
6The asks shared memory
7The DEX user ac count
8The user’s wallet
ConsumeEvents(Params)

Crank the processing of DEX events.

indexwritablesignerdescription
0The asset agnostic orderbook program
1The DEX market
2The DEX market signer
3The orderbook
4The event queue
5The reward target
6The MSRM token account
7The MSRM token account owner
8..The relevant user account
Settle(Params)

Extract available base and quote token assets from a user account

indexwritablesignerdescription
0The asset agnostic orderbook program
1The spl token program
2The DEX market
3The base token vault
4The quote token vault
5The DEX market signer
6The DEX user account
7The DEX user account owner wallet
8The destination base token account
9The destination quote token account
InitializeAccount(Params)

Initialize a new user account

indexwritablesignerdescription
0The system program
1The rent sysvar
2The user account to initialize
3The owner of the user account
4The fee payer
SweepFees

Extract accumulated fees from the market. This is an admin instruction

indexwritablesignerdescription
0The DEX market
1The market signer
2The market admin
3The market quote token vault
4The destination token account
5The SPL token program
CloseAccount

Close an inactive and empty user account

indexwritablesignerdescription
0The user account to close
1The owner of the user account to close
2The target lamports account
CloseMarket

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Serialize this instance into a vector of bytes.

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 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.