Enum agnostic_orderbook::instruction::AgnosticOrderbookInstruction [−][src]
pub enum AgnosticOrderbookInstruction { CreateMarket(Params), NewOrder(Params), ConsumeEvents(Params), CancelOrder(Params), CloseMarket, }
Expand description
Describes all possible instructions and their required accounts
Variants
CreateMarket(Params)
Create and initialize a new orderbook market
Required accounts
index | writable | signer | description |
---|---|---|---|
0 | ✅ | ❌ | The market account |
1 | ✅ | ❌ | A zeroed out event queue account |
2 | ✅ | ❌ | A zeroed out bids account |
3 | ✅ | ❌ | A zeroed out asks account |
NewOrder(Params)
Execute a new order on the orderbook.
Depending on the provided parameters, the program will attempt to match the order with existing entries in the orderbook, and then optionally post the remaining order.
Required accounts
index | writable | signer | description |
---|---|---|---|
0 | ✅ | ❌ | The market account |
1 | ✅ | ❌ | The event queue account |
2 | ✅ | ❌ | The bids account |
3 | ✅ | ❌ | The asks account |
4 | ❌ | ✅ | The caller authority |
ConsumeEvents(Params)
Pop a series of events off the event queue.
Required accounts
index | writable | signer | description |
---|---|---|---|
0 | ✅ | ❌ | The market account |
1 | ✅ | ❌ | The event queue account |
3 | ❌ | ✅ | The caller authority |
4 | ✅ | ❌ | The reward target account |
5 | ❌ | ❌ | The MSRM token account |
6 | ❌ | ✅ | The MSRM token account owner |
CancelOrder(Params)
Cancel an existing order in the orderbook.
Required accounts
index | writable | signer | description |
---|---|---|---|
0 | ✅ | ❌ | The market account |
1 | ✅ | ❌ | The event queue account |
2 | ✅ | ❌ | The bids account |
3 | ✅ | ❌ | The asks account |
4 | ❌ | ✅ | The caller authority |
Close and existing market.
Required accounts
index | writable | signer | description |
---|---|---|---|
0 | ✅ | ❌ | The market account |
1 | ✅ | ❌ | The event queue account |
2 | ✅ | ❌ | The bids account |
3 | ✅ | ❌ | The asks account |
4 | ❌ | ✅ | The caller authority |
5 | ✅ | ❌ | The lamports target account |