carbon-openbook-v2-decoder 2.0.0

Openbook V2 Decoder
Documentation
//! This code was AUTOGENERATED using the Codama library.
use solana_pubkey::Pubkey;
/// LeafNodes represent an order in the binary tree
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct LeafNode {
    /// NodeTag
    pub tag: u8,
    /// Index into the owning OpenOrdersAccount's OpenOrders
    pub owner_slot: u8,
    /// Time in seconds after `timestamp` at which the order expires.
    /// A value of 0 means no expiry.
    pub time_in_force: u16,
    pub padding: [u8; 4],
    /// The binary tree key, see new_node_key()
    pub key: u128,
    /// Address of the owning OpenOrdersAccount
    pub owner: Pubkey,
    /// Number of base lots to buy or sell, always >=1
    pub quantity: i64,
    /// The time the order was placed
    pub timestamp: u64,
    /// If the effective price of an oracle pegged order exceeds this limit,
    /// it will be considered invalid and may be removed.
    /// Only applicable in the oracle_pegged OrderTree
    pub peg_limit: i64,
    /// User defined id for this order, used in FillEvents
    pub client_order_id: u64,
}