Events
Event Types stored in EventHeap
#[derive(
Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable, AnchorSerialize, AnchorDeserialize,
)]
#[repr(C)]
pub struct FillEvent {
pub event_type: u8,
pub taker_side: u8, // Side, from the taker's POV
pub maker_out: u8, // 1 if maker order quantity == 0
pub maker_slot: u8,
pub padding: [u8; 4],
pub timestamp: u64,
pub seq_num: u64,
pub maker: Pubkey,
// Timestamp of when the maker order was placed; copied over from the LeafNode
pub maker_timestamp: u64,
pub taker: Pubkey,
pub taker_client_order_id: u64,
pub price: i64,
pub peg_limit: i64,
pub quantity: i64, // number of quote lots
pub maker_client_order_id: u64,
pub reserved: [u8; 8],
}
#[derive(
Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable, AnchorSerialize, AnchorDeserialize,
)]
#[repr(C)]
pub struct OutEvent {
pub event_type: u8,
pub side: u8, // Side
pub owner_slot: u8,
padding0: [u8; 5],
pub timestamp: u64,
pub seq_num: u64,
pub owner: Pubkey,
pub quantity: i64,
padding1: [u8; 80],
}
Last updated