Struct dex_v3::state::UserAccountHeader [−][src]
pub struct UserAccountHeader { pub tag: AccountTag, pub market: Pubkey, pub owner: Pubkey, pub base_token_free: u64, pub base_token_locked: u64, pub quote_token_free: u64, pub quote_token_locked: u64, pub accumulated_rebates: u64, pub number_of_orders: u32, }
Expand description
This header describes a user account’s state
Fields
tag: AccountTag
This byte is used to verify and version the dex state
market: Pubkey
The user account’s assocatied DEX market
owner: Pubkey
The user account owner’s wallet
base_token_free: u64
The amount of base token available for settlement
base_token_locked: u64
The amount of base token currently locked in the orderbook
quote_token_free: u64
The amount of quote token available for settlement
quote_token_locked: u64
The amount of quote token currently locked in the orderbook
accumulated_rebates: u64
The all time quantity of rebates accumulated by this user account.
The actual rebates will always be transfer to the user account’s main balance. This field is just a metric.
number_of_orders: u32
The user account’s number of active orders.
Trait Implementations
impl BorshSerialize for UserAccountHeader where
AccountTag: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u32: BorshSerialize,
[src]
impl BorshSerialize for UserAccountHeader where
AccountTag: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u32: BorshSerialize,
[src]Is initialized
Get the packed length
Unpack from slice and check if initialized
Unpack from slice without checking if initialized