Phoenix v1 decoder
Decode Phoenix v1 instructions in Rust with carbon-phoenix-v1-decoder 2.0.0. Program ID PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY.
On this page
carbon-phoenix-v1-decoder decodes the instructions of the Phoenix v1 program (PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY): 28 instructions. It decodes no accounts: PhoenixV1Account has no variants. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.
| Crate | carbon-phoenix-v1-decoder 2.0.0 |
| Install | cargo add carbon-phoenix-v1-decoder@2. |
| Program ID | PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY (carbon_) |
| Category | DEX & AMM |
| Decoder | carbon_ |
| Instruction enum | instructions:: |
| Account enum | accounts:: (no variants) |
| Features | serde, postgres, graphql (none enabled by default) |
| API docs | docs.rs/carbon-phoenix-v1-decoder/2.0.0 |
| Source | decoders/phoenix-v1-decoder |
Other DEX and AMM decoders: BonkSwap, FluxBeam, Gavel, Heaven, Jupiter Limit Order, Jupiter Limit Order v2, Kamino Limit Order, Lifinity AMM v2, Meteora DAMM v2, Meteora DLMM, Meteora Pools, OpenBook v2, Orca Whirlpools, PancakeSwap, PumpSwap, Raydium AMM v4, Raydium CLMM, Raydium CPMM, Raydium Stable Swap, Stabble Stable Swap, Stabble Weighted Swap. To decode several in one pipeline, see dEX and AMM decoders.
The serde feature derives Serialize/Deserialize on every type, postgres adds tables and processors for Postgres, and graphql adds a schema for the GraphQL server.
Usage#
This program crawls recent Phoenix v1 transactions from the public RPC and prints every decoded Swap instruction. Add the dependencies:
cargo add carbon-core@2.0.0 carbon-phoenix-v1-decoder@2.0.0 carbon-rpc-transaction-crawler-datasource@2.0.0 carbon-log-metrics@2.0.0 env_logger tokio --features tokio/fulluse {
carbon_core::{
error::CarbonResult, instruction::InstructionProcessorInputType, pipeline::Pipeline,
processor::Processor,
},
carbon_log_metrics::LogMetrics,
carbon_phoenix_v1_decoder::{instructions::PhoenixV1Instruction, PhoenixV1Decoder, PROGRAM_ID},
carbon_rpc_transaction_crawler_datasource::{ConnectionConfig, Filters, RpcTransactionCrawler},
std::sync::Arc,
};
#[tokio::main]
async fn main() -> CarbonResult<()> {
env_logger::init();
// Fetches the program's recent transactions over JSON-RPC, newest first.
let datasource = RpcTransactionCrawler::new(
"https://api.mainnet-beta.solana.com".to_string(),
PROGRAM_ID,
ConnectionConfig::default(),
Filters::new(None, None, None),
None,
);
Pipeline::builder()
.datasource(datasource)
.metrics(Arc::new(LogMetrics::new()))
.instruction(PhoenixV1Decoder, InstructionLogger)
.build()?
.run()
.await
}
struct InstructionLogger;
impl Processor<InstructionProcessorInputType<'_, PhoenixV1Instruction>> for InstructionLogger {
async fn process(
&mut self,
input: &InstructionProcessorInputType<'_, PhoenixV1Instruction>,
) -> CarbonResult<()> {
let signature = input.metadata.transaction_metadata.signature;
if let PhoenixV1Instruction::Swap { data, accounts, .. } = input.decoded_instruction {
println!("swap {signature}: {data:?} phoenix_program={}", accounts.phoenix_program);
}
Ok(())
}
}RUST_LOG=info cargo runEach Swap instruction prints one line with the transaction signature and the decoded Swap data. The public endpoint rate-limits requests, so the first lines can take a while; use your own RPC URL for anything beyond a test. See stream with RPC for the crawler options.
Instructions#
Variants of PhoenixV1Instruction. Each is PhoenixV1Instruction::, where data and accounts are the types listed under the variant, exported from carbon_. Discriminators are the leading bytes of the instruction data, in hex.
How an instruction decodes. The decoder returns a variant only when all of these hold; otherwise the instruction is skipped and no processor is called:
- The instruction's program ID is
PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY. - The data starts with the variant's discriminator, and the rest deserializes into its data type.
- The instruction has at least as many accounts as the variant requires (the "Required accounts" count under each variant).
Accounts. They are matched by position, in the order listed. An account marked optional is None only when the instruction ends before it; Anchor programs pass the program ID as a placeholder for an omitted optional account, so check for Some(PROGRAM_ too. Accounts after the listed ones are in accounts. as AccountMetas. The decoder doesn't record whether an account signed or was writable: read that from input. and ., which follow the same order. It doesn't check signer, writable, owner or PDA constraints either; the program enforced those when the transaction executed, so a decoded instruction from a successful transaction already satisfied them.
CancelAllOrders#
Discriminator 06 · data CancelAllOrders · accounts CancelAllOrdersInstructionAccounts.
No data fields.
Required accounts: 9; extras go to remaining.
Fields of CancelAllOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | base_ | Pubkey |
| 5 | quote_ | Pubkey |
| 6 | base_vault | Pubkey |
| 7 | quote_vault | Pubkey |
| 8 | token_ | Pubkey |
| 9… | remaining | Vec< |
CancelAllOrdersWithFreeFunds#
Discriminator 07 · data CancelAllOrdersWithFreeFunds · accounts CancelAllOrdersWithFreeFundsInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of CancelAllOrdersWithFreeFundsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4… | remaining | Vec< |
CancelMultipleOrdersById#
Discriminator 0a · data CancelMultipleOrdersById · accounts CancelMultipleOrdersByIdInstructionAccounts.
| Field | Type |
|---|---|
params | CancelMultipleOrdersByIdParams |
Required accounts: 9; extras go to remaining.
Fields of CancelMultipleOrdersByIdInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | base_ | Pubkey |
| 5 | quote_ | Pubkey |
| 6 | base_vault | Pubkey |
| 7 | quote_vault | Pubkey |
| 8 | token_ | Pubkey |
| 9… | remaining | Vec< |
CancelMultipleOrdersByIdWithFreeFunds#
Discriminator 0b · data CancelMultipleOrdersByIdWithFreeFunds · accounts CancelMultipleOrdersByIdWithFreeFundsInstructionAccounts.
| Field | Type |
|---|---|
params | CancelMultipleOrdersByIdParams |
Required accounts: 4; extras go to remaining.
Fields of CancelMultipleOrdersByIdWithFreeFundsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4… | remaining | Vec< |
CancelUpTo#
Discriminator 08 · data CancelUpTo · accounts CancelUpToInstructionAccounts.
| Field | Type |
|---|---|
params | CancelUpToParams |
Required accounts: 9; extras go to remaining.
Fields of CancelUpToInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | base_ | Pubkey |
| 5 | quote_ | Pubkey |
| 6 | base_vault | Pubkey |
| 7 | quote_vault | Pubkey |
| 8 | token_ | Pubkey |
| 9… | remaining | Vec< |
CancelUpToWithFreeFunds#
Discriminator 09 · data CancelUpToWithFreeFunds · accounts CancelUpToWithFreeFundsInstructionAccounts.
| Field | Type |
|---|---|
params | CancelUpToParams |
Required accounts: 4; extras go to remaining.
Fields of CancelUpToWithFreeFundsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4… | remaining | Vec< |
ChangeFeeRecipient#
Discriminator 6d · data ChangeFeeRecipient · accounts ChangeFeeRecipientInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of ChangeFeeRecipientInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | market_ | Pubkey |
| 4 | new_ | Pubkey |
| 5… | remaining | Vec< |
ChangeMarketStatus#
Discriminator 67 · data ChangeMarketStatus · accounts ChangeMarketStatusInstructionAccounts.
| Field | Type |
|---|---|
market_ | MarketStatus |
Required accounts: 4; extras go to remaining.
Fields of ChangeMarketStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | market_ | Pubkey |
| 4… | remaining | Vec< |
ChangeSeatStatus#
Discriminator 68 · data ChangeSeatStatus · accounts ChangeSeatStatusInstructionAccounts.
| Field | Type |
|---|---|
approval_ | SeatApprovalStatus |
Required accounts: 5; extras go to remaining.
Fields of ChangeSeatStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | market_ | Pubkey |
| 4 | seat | Pubkey |
| 5… | remaining | Vec< |
ClaimAuthority#
Discriminator 65 · data ClaimAuthority · accounts ClaimAuthorityInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of ClaimAuthorityInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | successor | Pubkey |
| 4… | remaining | Vec< |
CollectFees#
Discriminator 6c · data CollectFees · accounts CollectFeesInstructionAccounts.
No data fields.
Required accounts: 7; extras go to remaining.
Fields of CollectFeesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | sweeper | Pubkey |
| 4 | fee_ | Pubkey |
| 5 | quote_vault | Pubkey |
| 6 | token_ | Pubkey |
| 7… | remaining | Vec< |
DepositFunds#
Discriminator 0d · data DepositFunds · accounts DepositFundsInstructionAccounts.
| Field | Type |
|---|---|
deposit_ | DepositParams |
Required accounts: 10; extras go to remaining.
Fields of DepositFundsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | seat | Pubkey |
| 5 | base_ | Pubkey |
| 6 | quote_ | Pubkey |
| 7 | base_vault | Pubkey |
| 8 | quote_vault | Pubkey |
| 9 | token_ | Pubkey |
| 10… | remaining | Vec< |
EvictSeat#
Discriminator 6a · data EvictSeat · accounts EvictSeatInstructionAccounts.
No data fields.
Required accounts: 11; extras go to remaining.
Fields of EvictSeatInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | market_ | Pubkey |
| 4 | trader | Pubkey |
| 5 | seat | Pubkey |
| 6 | base_ | Pubkey |
| 7 | quote_ | Pubkey |
| 8 | base_vault | Pubkey |
| 9 | quote_vault | Pubkey |
| 10 | token_ | Pubkey |
| 11… | remaining | Vec< |
ForceCancelOrders#
Discriminator 6b · data ForceCancelOrders · accounts ForceCancelOrdersInstructionAccounts.
| Field | Type |
|---|---|
params | CancelUpToParams |
Required accounts: 11; extras go to remaining.
Fields of ForceCancelOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | market_ | Pubkey |
| 4 | trader | Pubkey |
| 5 | seat | Pubkey |
| 6 | base_ | Pubkey |
| 7 | quote_ | Pubkey |
| 8 | base_vault | Pubkey |
| 9 | quote_vault | Pubkey |
| 10 | token_ | Pubkey |
| 11… | remaining | Vec< |
InitializeMarket#
Discriminator 64 · data InitializeMarket · accounts InitializeMarketInstructionAccounts.
| Field | Type |
|---|---|
initialize_ | InitializeParams |
Required accounts: 10; extras go to remaining.
Fields of InitializeMarketInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | market_ | Pubkey |
| 4 | base_mint | Pubkey |
| 5 | quote_mint | Pubkey |
| 6 | base_vault | Pubkey |
| 7 | quote_vault | Pubkey |
| 8 | system_ | Pubkey |
| 9 | token_ | Pubkey |
| 10… | remaining | Vec< |
Log#
Discriminator 0f · data Log · accounts LogInstructionAccounts.
No data fields.
Required accounts: 1; extras go to remaining.
Fields of LogInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | log_ | Pubkey |
| 1… | remaining | Vec< |
NameSuccessor#
Discriminator 66 · data NameSuccessor · accounts NameSuccessorInstructionAccounts.
| Field | Type |
|---|---|
successor | Pubkey |
Required accounts: 4; extras go to remaining.
Fields of NameSuccessorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | market_ | Pubkey |
| 4… | remaining | Vec< |
PlaceLimitOrder#
Discriminator 02 · data PlaceLimitOrder · accounts PlaceLimitOrderInstructionAccounts.
| Field | Type |
|---|---|
order_ | OrderPacket |
Required accounts: 10; extras go to remaining.
Fields of PlaceLimitOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | seat | Pubkey |
| 5 | base_ | Pubkey |
| 6 | quote_ | Pubkey |
| 7 | base_vault | Pubkey |
| 8 | quote_vault | Pubkey |
| 9 | token_ | Pubkey |
| 10… | remaining | Vec< |
PlaceLimitOrderWithFreeFunds#
Discriminator 03 · data PlaceLimitOrderWithFreeFunds · accounts PlaceLimitOrderWithFreeFundsInstructionAccounts.
| Field | Type |
|---|---|
order_ | OrderPacket |
Required accounts: 5; extras go to remaining.
Fields of PlaceLimitOrderWithFreeFundsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | seat | Pubkey |
| 5… | remaining | Vec< |
PlaceMultiplePostOnlyOrders#
Discriminator 10 · data PlaceMultiplePostOnlyOrders · accounts PlaceMultiplePostOnlyOrdersInstructionAccounts.
| Field | Type |
|---|---|
multiple_ | MultipleOrderPacket |
Required accounts: 10; extras go to remaining.
Fields of PlaceMultiplePostOnlyOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | seat | Pubkey |
| 5 | base_ | Pubkey |
| 6 | quote_ | Pubkey |
| 7 | base_vault | Pubkey |
| 8 | quote_vault | Pubkey |
| 9 | token_ | Pubkey |
| 10… | remaining | Vec< |
PlaceMultiplePostOnlyOrdersWithFreeFunds#
Discriminator 11 · data PlaceMultiplePostOnlyOrdersWithFreeFunds · accounts PlaceMultiplePostOnlyOrdersWithFreeFundsInstructionAccounts.
| Field | Type |
|---|---|
multiple_ | MultipleOrderPacket |
Required accounts: 5; extras go to remaining.
Fields of PlaceMultiplePostOnlyOrdersWithFreeFundsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | seat | Pubkey |
| 5… | remaining | Vec< |
ReduceOrder#
Discriminator 04 · data ReduceOrder · accounts ReduceOrderInstructionAccounts.
| Field | Type |
|---|---|
params | ReduceOrderParams |
Required accounts: 9; extras go to remaining.
Fields of ReduceOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | base_ | Pubkey |
| 5 | quote_ | Pubkey |
| 6 | base_vault | Pubkey |
| 7 | quote_vault | Pubkey |
| 8 | token_ | Pubkey |
| 9… | remaining | Vec< |
ReduceOrderWithFreeFunds#
Discriminator 05 · data ReduceOrderWithFreeFunds · accounts ReduceOrderWithFreeFundsInstructionAccounts.
| Field | Type |
|---|---|
params | ReduceOrderParams |
Required accounts: 4; extras go to remaining.
Fields of ReduceOrderWithFreeFundsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4… | remaining | Vec< |
RequestSeat#
Discriminator 0e · data RequestSeat · accounts RequestSeatInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of RequestSeatInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | payer | Pubkey |
| 4 | seat | Pubkey |
| 5 | system_ | Pubkey |
| 6… | remaining | Vec< |
RequestSeatAuthorized#
Discriminator 69 · data RequestSeatAuthorized · accounts RequestSeatAuthorizedInstructionAccounts.
No data fields.
Required accounts: 8; extras go to remaining.
Fields of RequestSeatAuthorizedInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | market_ | Pubkey |
| 4 | payer | Pubkey |
| 5 | trader | Pubkey |
| 6 | seat | Pubkey |
| 7 | system_ | Pubkey |
| 8… | remaining | Vec< |
Swap#
Discriminator 00 · data Swap · accounts SwapInstructionAccounts.
| Field | Type |
|---|---|
order_ | OrderPacket |
Required accounts: 9; extras go to remaining.
Fields of SwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | base_ | Pubkey |
| 5 | quote_ | Pubkey |
| 6 | base_vault | Pubkey |
| 7 | quote_vault | Pubkey |
| 8 | token_ | Pubkey |
| 9… | remaining | Vec< |
SwapWithFreeFunds#
Discriminator 01 · data SwapWithFreeFunds · accounts SwapWithFreeFundsInstructionAccounts.
| Field | Type |
|---|---|
order_ | OrderPacket |
Required accounts: 5; extras go to remaining.
Fields of SwapWithFreeFundsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | seat | Pubkey |
| 5… | remaining | Vec< |
WithdrawFunds#
Discriminator 0c · data WithdrawFunds · accounts WithdrawFundsInstructionAccounts.
| Field | Type |
|---|---|
withdraw_ | WithdrawParams |
Required accounts: 9; extras go to remaining.
Fields of WithdrawFundsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | phoenix_ | Pubkey |
| 1 | log_ | Pubkey |
| 2 | market | Pubkey |
| 3 | trader | Pubkey |
| 4 | base_ | Pubkey |
| 5 | quote_ | Pubkey |
| 6 | base_vault | Pubkey |
| 7 | quote_vault | Pubkey |
| 8 | token_ | Pubkey |
| 9… | remaining | Vec< |
Types#
Types used by the instructions, accounts and events above, exported from carbon_.
AuditLogHeader#
Struct types::.
| Field | Type |
|---|---|
instruction | u8 |
sequence_ | u64 |
timestamp | i64 |
slot | u64 |
market | Pubkey |
signer | Pubkey |
total_ | u16 |
CancelMultipleOrdersByIdParams#
Struct types::.
| Field | Type |
|---|---|
orders | Vec< |
CancelOrderParams#
Struct types::.
| Field | Type |
|---|---|
side | Side |
price_ | u64 |
order_ | u64 |
CancelUpToParams#
Struct types::.
| Field | Type |
|---|---|
side | Side |
tick_limit | Option<u64> |
num_ | Option<u32> |
num_ | Option<u32> |
CondensedOrder#
Struct types::.
| Field | Type |
|---|---|
price_ | u64 |
size_ | u64 |
last_ | Option<u64> |
last_ | Option<u64> |
DepositParams#
Struct types::.
| Field | Type |
|---|---|
quote_ | u64 |
base_ | u64 |
EvictEvent#
Struct types::.
| Field | Type |
|---|---|
index | u16 |
maker_id | Pubkey |
order_ | u64 |
price_ | u64 |
base_ | u64 |
ExpiredOrderEvent#
Struct types::.
| Field | Type |
|---|---|
index | u16 |
maker_id | Pubkey |
order_ | u64 |
price_ | u64 |
base_ | u64 |
FailedMultipleLimitOrderBehavior#
Enum types::.
| Variant |
|---|
FailOnInsufficientFundsAndAmendOnCross |
FailOnInsufficientFundsAndFailOnCross |
SkipOnInsufficientFundsAndAmendOnCross |
SkipOnInsufficientFundsAndFailOnCross |
FeeEvent#
Struct types::.
| Field | Type |
|---|---|
index | u16 |
fees_ | u64 |
FillEvent#
Struct types::.
| Field | Type |
|---|---|
index | u16 |
maker_id | Pubkey |
order_ | u64 |
price_ | u64 |
base_ | u64 |
base_ | u64 |
FillSummaryEvent#
Struct types::.
| Field | Type |
|---|---|
index | u16 |
client_ | u128 |
total_ | u64 |
total_ | u64 |
total_ | u64 |
InitializeParams#
Struct types::.
| Field | Type |
|---|---|
market_ | MarketSizeParams |
num_ | u64 |
tick_ | u64 |
num_ | u64 |
taker_ | u16 |
fee_ | Pubkey |
raw_ | Option<u32> |
MarketHeader#
Struct types::.
| Field | Type |
|---|---|
discriminant | u64 |
status | u64 |
market_ | MarketSizeParams |
base_params | TokenParams |
base_ | u64 |
quote_ | TokenParams |
quote_ | u64 |
tick_ | u64 |
authority | Pubkey |
fee_ | Pubkey |
market_ | u64 |
successor | Pubkey |
raw_ | u32 |
padding1 | u32 |
padding2 | [u64; 32] |
MarketSizeParams#
Struct types::.
| Field | Type |
|---|---|
bids_size | u64 |
asks_size | u64 |
num_seats | u64 |
MarketStatus#
Enum types::.
| Variant |
|---|
Uninitialized |
Active |
PostOnly |
Paused |
Closed |
Tombstoned |
MultipleOrderPacket#
Struct types::.
| Field | Type |
|---|---|
bids | Vec< |
asks | Vec< |
client_ | Option< |
failed_ | FailedMultipleLimitOrderBehavior |
OrderPacket#
Enum types::.
| Variant | Fields |
|---|---|
PostOnly | side: Side, price_: u64, num_: u64, client_: u128, reject_: bool, use_: bool, last_: Option<u64>, last_: Option<u64>, fail_: bool |
Limit | side: Side, price_: u64, num_: u64, self_: SelfTradeBehavior, match_limit: Option<u64>, client_: u128, use_: bool, last_: Option<u64>, last_: Option<u64>, fail_: bool |
ImmediateOrCancel | side: Side, price_: Option<u64>, num_: u64, num_: u64, min_: u64, min_: u64, self_: SelfTradeBehavior, match_limit: Option<u64>, client_: u128, use_: bool, last_: Option<u64>, last_: Option<u64> |
PhoenixMarketEvent#
Enum types::.
| Variant | Fields |
|---|---|
Uninitialized | |
Header | AuditLogHeader |
Fill | FillEvent |
Place | PlaceEvent |
Reduce | ReduceEvent |
Evict | EvictEvent |
FillSummary | FillSummaryEvent |
Fee | FeeEvent |
TimeInForce | TimeInForceEvent |
ExpiredOrder | ExpiredOrderEvent |
PlaceEvent#
Struct types::.
| Field | Type |
|---|---|
index | u16 |
order_ | u64 |
client_ | u128 |
price_ | u64 |
base_ | u64 |
ReduceEvent#
Struct types::.
| Field | Type |
|---|---|
index | u16 |
order_ | u64 |
price_ | u64 |
base_ | u64 |
base_ | u64 |
ReduceOrderParams#
Struct types::.
| Field | Type |
|---|---|
base_params | CancelOrderParams |
size | u64 |
Seat#
Struct types::Seat.
| Field | Type |
|---|---|
discriminant | u64 |
market | Pubkey |
trader | Pubkey |
approval_ | u64 |
padding | [u64; 6] |
SeatApprovalStatus#
Enum types::.
| Variant |
|---|
NotApproved |
Approved |
Retired |
SelfTradeBehavior#
Enum types::.
| Variant |
|---|
Abort |
CancelProvide |
DecrementTake |
Side#
Enum types::Side.
| Variant |
|---|
Bid |
Ask |
TimeInForceEvent#
Struct types::.
| Field | Type |
|---|---|
index | u16 |
order_ | u64 |
last_ | u64 |
last_ | u64 |
TokenParams#
Struct types::.
| Field | Type |
|---|---|
decimals | u32 |
vault_bump | u32 |
mint_key | Pubkey |
vault_key | Pubkey |
WithdrawParams#
Struct types::.
| Field | Type |
|---|---|
quote_ | Option<u64> |
base_ | Option<u64> |