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.

Cratecarbon-phoenix-v1-decoder 2.0.0
Installcargo add carbon-phoenix-v1-decoder@2.0.0
Program IDPhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY (carbon_phoenix_v1_decoder::PROGRAM_ID)
CategoryDEX & AMM
Decodercarbon_phoenix_v1_decoder::PhoenixV1Decoder
Instruction enuminstructions::PhoenixV1Instruction
Account enumaccounts::PhoenixV1Account (no variants)
Featuresserde, postgres, graphql (none enabled by default)
API docsdocs.rs/carbon-phoenix-v1-decoder/2.0.0
Sourcedecoders/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:

Terminal
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/full
src/main.rs
use {
    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(())
    }
}
Terminal
RUST_LOG=info cargo run

Each 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::<Variant> { program_id, data, accounts }, where data and accounts are the types listed under the variant, exported from carbon_phoenix_v1_decoder::instructions. 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:

  1. The instruction's program ID is PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY.
  2. The data starts with the variant's discriminator, and the rest deserializes into its data type.
  3. 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_ID) too. Accounts after the listed ones are in accounts.remaining as AccountMetas. The decoder doesn't record whether an account signed or was writable: read that from input.raw_instruction.accounts[i].is_signer and .is_writable, 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:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4base_accountPubkey
5quote_accountPubkey
6base_vaultPubkey
7quote_vaultPubkey
8token_programPubkey
9…remainingVec<AccountMeta>

CancelAllOrdersWithFreeFunds#

Discriminator 07 · data CancelAllOrdersWithFreeFunds · accounts CancelAllOrdersWithFreeFundsInstructionAccounts.

No data fields.

Required accounts: 4; extras go to remaining.

Fields of CancelAllOrdersWithFreeFundsInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4…remainingVec<AccountMeta>

CancelMultipleOrdersById#

Discriminator 0a · data CancelMultipleOrdersById · accounts CancelMultipleOrdersByIdInstructionAccounts.

Required accounts: 9; extras go to remaining.

Fields of CancelMultipleOrdersByIdInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4base_accountPubkey
5quote_accountPubkey
6base_vaultPubkey
7quote_vaultPubkey
8token_programPubkey
9…remainingVec<AccountMeta>

CancelMultipleOrdersByIdWithFreeFunds#

Discriminator 0b · data CancelMultipleOrdersByIdWithFreeFunds · accounts CancelMultipleOrdersByIdWithFreeFundsInstructionAccounts.

Required accounts: 4; extras go to remaining.

Fields of CancelMultipleOrdersByIdWithFreeFundsInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4…remainingVec<AccountMeta>

CancelUpTo#

Discriminator 08 · data CancelUpTo · accounts CancelUpToInstructionAccounts.

FieldType
paramsCancelUpToParams

Required accounts: 9; extras go to remaining.

Fields of CancelUpToInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4base_accountPubkey
5quote_accountPubkey
6base_vaultPubkey
7quote_vaultPubkey
8token_programPubkey
9…remainingVec<AccountMeta>

CancelUpToWithFreeFunds#

Discriminator 09 · data CancelUpToWithFreeFunds · accounts CancelUpToWithFreeFundsInstructionAccounts.

FieldType
paramsCancelUpToParams

Required accounts: 4; extras go to remaining.

Fields of CancelUpToWithFreeFundsInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4…remainingVec<AccountMeta>

ChangeFeeRecipient#

Discriminator 6d · data ChangeFeeRecipient · accounts ChangeFeeRecipientInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of ChangeFeeRecipientInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3market_authorityPubkey
4new_fee_recipientPubkey
5…remainingVec<AccountMeta>

ChangeMarketStatus#

Discriminator 67 · data ChangeMarketStatus · accounts ChangeMarketStatusInstructionAccounts.

FieldType
market_statusMarketStatus

Required accounts: 4; extras go to remaining.

Fields of ChangeMarketStatusInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3market_authorityPubkey
4…remainingVec<AccountMeta>

ChangeSeatStatus#

Discriminator 68 · data ChangeSeatStatus · accounts ChangeSeatStatusInstructionAccounts.

FieldType
approval_statusSeatApprovalStatus

Required accounts: 5; extras go to remaining.

Fields of ChangeSeatStatusInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3market_authorityPubkey
4seatPubkey
5…remainingVec<AccountMeta>

ClaimAuthority#

Discriminator 65 · data ClaimAuthority · accounts ClaimAuthorityInstructionAccounts.

No data fields.

Required accounts: 4; extras go to remaining.

Fields of ClaimAuthorityInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3successorPubkey
4…remainingVec<AccountMeta>

CollectFees#

Discriminator 6c · data CollectFees · accounts CollectFeesInstructionAccounts.

No data fields.

Required accounts: 7; extras go to remaining.

Fields of CollectFeesInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3sweeperPubkey
4fee_recipientPubkey
5quote_vaultPubkey
6token_programPubkey
7…remainingVec<AccountMeta>

DepositFunds#

Discriminator 0d · data DepositFunds · accounts DepositFundsInstructionAccounts.

FieldType
deposit_funds_paramsDepositParams

Required accounts: 10; extras go to remaining.

Fields of DepositFundsInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4seatPubkey
5base_accountPubkey
6quote_accountPubkey
7base_vaultPubkey
8quote_vaultPubkey
9token_programPubkey
10…remainingVec<AccountMeta>

EvictSeat#

Discriminator 6a · data EvictSeat · accounts EvictSeatInstructionAccounts.

No data fields.

Required accounts: 11; extras go to remaining.

Fields of EvictSeatInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3market_authorityPubkey
4traderPubkey
5seatPubkey
6base_accountPubkey
7quote_accountPubkey
8base_vaultPubkey
9quote_vaultPubkey
10token_programPubkey
11…remainingVec<AccountMeta>

ForceCancelOrders#

Discriminator 6b · data ForceCancelOrders · accounts ForceCancelOrdersInstructionAccounts.

FieldType
paramsCancelUpToParams

Required accounts: 11; extras go to remaining.

Fields of ForceCancelOrdersInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3market_authorityPubkey
4traderPubkey
5seatPubkey
6base_accountPubkey
7quote_accountPubkey
8base_vaultPubkey
9quote_vaultPubkey
10token_programPubkey
11…remainingVec<AccountMeta>

InitializeMarket#

Discriminator 64 · data InitializeMarket · accounts InitializeMarketInstructionAccounts.

FieldType
initialize_paramsInitializeParams

Required accounts: 10; extras go to remaining.

Fields of InitializeMarketInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3market_creatorPubkey
4base_mintPubkey
5quote_mintPubkey
6base_vaultPubkey
7quote_vaultPubkey
8system_programPubkey
9token_programPubkey
10…remainingVec<AccountMeta>

Log#

Discriminator 0f · data Log · accounts LogInstructionAccounts.

No data fields.

Required accounts: 1; extras go to remaining.

Fields of LogInstructionAccounts, in account order:

#FieldType
0log_authorityPubkey
1…remainingVec<AccountMeta>

NameSuccessor#

Discriminator 66 · data NameSuccessor · accounts NameSuccessorInstructionAccounts.

FieldType
successorPubkey

Required accounts: 4; extras go to remaining.

Fields of NameSuccessorInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3market_authorityPubkey
4…remainingVec<AccountMeta>

PlaceLimitOrder#

Discriminator 02 · data PlaceLimitOrder · accounts PlaceLimitOrderInstructionAccounts.

FieldType
order_packetOrderPacket

Required accounts: 10; extras go to remaining.

Fields of PlaceLimitOrderInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4seatPubkey
5base_accountPubkey
6quote_accountPubkey
7base_vaultPubkey
8quote_vaultPubkey
9token_programPubkey
10…remainingVec<AccountMeta>

PlaceLimitOrderWithFreeFunds#

Discriminator 03 · data PlaceLimitOrderWithFreeFunds · accounts PlaceLimitOrderWithFreeFundsInstructionAccounts.

FieldType
order_packetOrderPacket

Required accounts: 5; extras go to remaining.

Fields of PlaceLimitOrderWithFreeFundsInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4seatPubkey
5…remainingVec<AccountMeta>

PlaceMultiplePostOnlyOrders#

Discriminator 10 · data PlaceMultiplePostOnlyOrders · accounts PlaceMultiplePostOnlyOrdersInstructionAccounts.

FieldType
multiple_order_packetMultipleOrderPacket

Required accounts: 10; extras go to remaining.

Fields of PlaceMultiplePostOnlyOrdersInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4seatPubkey
5base_accountPubkey
6quote_accountPubkey
7base_vaultPubkey
8quote_vaultPubkey
9token_programPubkey
10…remainingVec<AccountMeta>

PlaceMultiplePostOnlyOrdersWithFreeFunds#

Discriminator 11 · data PlaceMultiplePostOnlyOrdersWithFreeFunds · accounts PlaceMultiplePostOnlyOrdersWithFreeFundsInstructionAccounts.

FieldType
multiple_order_packetMultipleOrderPacket

Required accounts: 5; extras go to remaining.

Fields of PlaceMultiplePostOnlyOrdersWithFreeFundsInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4seatPubkey
5…remainingVec<AccountMeta>

ReduceOrder#

Discriminator 04 · data ReduceOrder · accounts ReduceOrderInstructionAccounts.

FieldType
paramsReduceOrderParams

Required accounts: 9; extras go to remaining.

Fields of ReduceOrderInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4base_accountPubkey
5quote_accountPubkey
6base_vaultPubkey
7quote_vaultPubkey
8token_programPubkey
9…remainingVec<AccountMeta>

ReduceOrderWithFreeFunds#

Discriminator 05 · data ReduceOrderWithFreeFunds · accounts ReduceOrderWithFreeFundsInstructionAccounts.

FieldType
paramsReduceOrderParams

Required accounts: 4; extras go to remaining.

Fields of ReduceOrderWithFreeFundsInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4…remainingVec<AccountMeta>

RequestSeat#

Discriminator 0e · data RequestSeat · accounts RequestSeatInstructionAccounts.

No data fields.

Required accounts: 6; extras go to remaining.

Fields of RequestSeatInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3payerPubkey
4seatPubkey
5system_programPubkey
6…remainingVec<AccountMeta>

RequestSeatAuthorized#

Discriminator 69 · data RequestSeatAuthorized · accounts RequestSeatAuthorizedInstructionAccounts.

No data fields.

Required accounts: 8; extras go to remaining.

Fields of RequestSeatAuthorizedInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3market_authorityPubkey
4payerPubkey
5traderPubkey
6seatPubkey
7system_programPubkey
8…remainingVec<AccountMeta>

Swap#

Discriminator 00 · data Swap · accounts SwapInstructionAccounts.

FieldType
order_packetOrderPacket

Required accounts: 9; extras go to remaining.

Fields of SwapInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4base_accountPubkey
5quote_accountPubkey
6base_vaultPubkey
7quote_vaultPubkey
8token_programPubkey
9…remainingVec<AccountMeta>

SwapWithFreeFunds#

Discriminator 01 · data SwapWithFreeFunds · accounts SwapWithFreeFundsInstructionAccounts.

FieldType
order_packetOrderPacket

Required accounts: 5; extras go to remaining.

Fields of SwapWithFreeFundsInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4seatPubkey
5…remainingVec<AccountMeta>

WithdrawFunds#

Discriminator 0c · data WithdrawFunds · accounts WithdrawFundsInstructionAccounts.

FieldType
withdraw_funds_paramsWithdrawParams

Required accounts: 9; extras go to remaining.

Fields of WithdrawFundsInstructionAccounts, in account order:

#FieldType
0phoenix_programPubkey
1log_authorityPubkey
2marketPubkey
3traderPubkey
4base_accountPubkey
5quote_accountPubkey
6base_vaultPubkey
7quote_vaultPubkey
8token_programPubkey
9…remainingVec<AccountMeta>

Types#

Types used by the instructions, accounts and events above, exported from carbon_phoenix_v1_decoder::types.

AuditLogHeader#

Struct types::AuditLogHeader.

FieldType
instructionu8
sequence_numberu64
timestampi64
slotu64
marketPubkey
signerPubkey
total_eventsu16

CancelMultipleOrdersByIdParams#

Struct types::CancelMultipleOrdersByIdParams.

FieldType
ordersVec<CancelOrderParams>

CancelOrderParams#

Struct types::CancelOrderParams.

FieldType
sideSide
price_in_ticksu64
order_sequence_numberu64

CancelUpToParams#

Struct types::CancelUpToParams.

FieldType
sideSide
tick_limitOption<u64>
num_orders_to_searchOption<u32>
num_orders_to_cancelOption<u32>

CondensedOrder#

Struct types::CondensedOrder.

FieldType
price_in_ticksu64
size_in_base_lotsu64
last_valid_slotOption<u64>
last_valid_unix_timestamp_in_secondsOption<u64>

DepositParams#

Struct types::DepositParams.

FieldType
quote_lots_to_depositu64
base_lots_to_depositu64

EvictEvent#

Struct types::EvictEvent.

FieldType
indexu16
maker_idPubkey
order_sequence_numberu64
price_in_ticksu64
base_lots_evictedu64

ExpiredOrderEvent#

Struct types::ExpiredOrderEvent.

FieldType
indexu16
maker_idPubkey
order_sequence_numberu64
price_in_ticksu64
base_lots_removedu64

FailedMultipleLimitOrderBehavior#

Enum types::FailedMultipleLimitOrderBehavior.

Variant
FailOnInsufficientFundsAndAmendOnCross
FailOnInsufficientFundsAndFailOnCross
SkipOnInsufficientFundsAndAmendOnCross
SkipOnInsufficientFundsAndFailOnCross

FeeEvent#

Struct types::FeeEvent.

FieldType
indexu16
fees_collected_in_quote_lotsu64

FillEvent#

Struct types::FillEvent.

FieldType
indexu16
maker_idPubkey
order_sequence_numberu64
price_in_ticksu64
base_lots_filledu64
base_lots_remainingu64

FillSummaryEvent#

Struct types::FillSummaryEvent.

FieldType
indexu16
client_order_idu128
total_base_lots_filledu64
total_quote_lots_filledu64
total_fee_in_quote_lotsu64

InitializeParams#

Struct types::InitializeParams.

FieldType
market_size_paramsMarketSizeParams
num_quote_lots_per_quote_unitu64
tick_size_in_quote_lots_per_base_unitu64
num_base_lots_per_base_unitu64
taker_fee_bpsu16
fee_collectorPubkey
raw_base_units_per_base_unitOption<u32>

MarketHeader#

Struct types::MarketHeader.

FieldType
discriminantu64
statusu64
market_size_paramsMarketSizeParams
base_paramsTokenParams
base_lot_sizeu64
quote_paramsTokenParams
quote_lot_sizeu64
tick_size_in_quote_atoms_per_base_unitu64
authorityPubkey
fee_recipientPubkey
market_sequence_numberu64
successorPubkey
raw_base_units_per_base_unitu32
padding1u32
padding2[u64; 32]

MarketSizeParams#

Struct types::MarketSizeParams.

FieldType
bids_sizeu64
asks_sizeu64
num_seatsu64

MarketStatus#

Enum types::MarketStatus.

Variant
Uninitialized
Active
PostOnly
Paused
Closed
Tombstoned

MultipleOrderPacket#

Struct types::MultipleOrderPacket.

FieldType
bidsVec<CondensedOrder>
asksVec<CondensedOrder>
client_order_idOption<u128>
failed_multiple_limit_order_behaviorFailedMultipleLimitOrderBehavior

OrderPacket#

Enum types::OrderPacket.

VariantFields
PostOnlyside: Side, price_in_ticks: u64, num_base_lots: u64, client_order_id: u128, reject_post_only: bool, use_only_deposited_funds: bool, last_valid_slot: Option<u64>, last_valid_unix_timestamp_in_seconds: Option<u64>, fail_silently_on_insufficient_funds: bool
Limitside: Side, price_in_ticks: u64, num_base_lots: u64, self_trade_behavior: SelfTradeBehavior, match_limit: Option<u64>, client_order_id: u128, use_only_deposited_funds: bool, last_valid_slot: Option<u64>, last_valid_unix_timestamp_in_seconds: Option<u64>, fail_silently_on_insufficient_funds: bool
ImmediateOrCancelside: Side, price_in_ticks: Option<u64>, num_base_lots: u64, num_quote_lots: u64, min_base_lots_to_fill: u64, min_quote_lots_to_fill: u64, self_trade_behavior: SelfTradeBehavior, match_limit: Option<u64>, client_order_id: u128, use_only_deposited_funds: bool, last_valid_slot: Option<u64>, last_valid_unix_timestamp_in_seconds: Option<u64>

PhoenixMarketEvent#

Enum types::PhoenixMarketEvent.

VariantFields
Uninitialized
HeaderAuditLogHeader
FillFillEvent
PlacePlaceEvent
ReduceReduceEvent
EvictEvictEvent
FillSummaryFillSummaryEvent
FeeFeeEvent
TimeInForceTimeInForceEvent
ExpiredOrderExpiredOrderEvent

PlaceEvent#

Struct types::PlaceEvent.

FieldType
indexu16
order_sequence_numberu64
client_order_idu128
price_in_ticksu64
base_lots_placedu64

ReduceEvent#

Struct types::ReduceEvent.

FieldType
indexu16
order_sequence_numberu64
price_in_ticksu64
base_lots_removedu64
base_lots_remainingu64

ReduceOrderParams#

Struct types::ReduceOrderParams.

FieldType
base_paramsCancelOrderParams
sizeu64

Seat#

Struct types::Seat.

FieldType
discriminantu64
marketPubkey
traderPubkey
approval_statusu64
padding[u64; 6]

SeatApprovalStatus#

Enum types::SeatApprovalStatus.

Variant
NotApproved
Approved
Retired

SelfTradeBehavior#

Enum types::SelfTradeBehavior.

Variant
Abort
CancelProvide
DecrementTake

Side#

Enum types::Side.

Variant
Bid
Ask

TimeInForceEvent#

Struct types::TimeInForceEvent.

FieldType
indexu16
order_sequence_numberu64
last_valid_slotu64
last_valid_unix_timestamp_in_secondsu64

TokenParams#

Struct types::TokenParams.

FieldType
decimalsu32
vault_bumpu32
mint_keyPubkey
vault_keyPubkey

WithdrawParams#

Struct types::WithdrawParams.

FieldType
quote_lots_to_withdrawOption<u64>
base_lots_to_withdrawOption<u64>

Generated from the crate’s source at Carbon v2.0.0, so it always matches the published code. Spotted a problem? Report it; edits to this page itself are overwritten on the next release.

Your endpoints

Code samples use these instead of the placeholders, so you can copy and run them as they are. They’re stored only in this browser and never sent anywhere.