Fields
entitled_tokens: u64
tokens to transfer into settlement account
entitled_tickets: u64
tickets to transfer into settlement account
Implementations
sourceimpl Assets
impl Assets
sourcepub fn post_order(&mut self, quote: u64) -> Result<()>
pub fn post_order(&mut self, quote: u64) -> Result<()>
either a bid or ask was placed quote: the amount of quote that was posted IMPORTANT: always input the quote (underlying), not the base always shorts by one lamport to be defensive todo maybe this is too defensive
sourcepub fn reduce_order(&mut self, quote: u64)
pub fn reduce_order(&mut self, quote: u64)
An order was filled or cancelled quote: the amount of quote that was removed from the order IMPORTANT: always input the quote (underlying), not the base always subtracts an extra lamport to be defensive todo maybe this is too defensive
sourcepub fn stake_tickets(&mut self, tickets: u64) -> Result<()>
pub fn stake_tickets(&mut self, tickets: u64) -> Result<()>
make sure the order has already been accounted for before calling this method
pub fn redeem_staked_tickets(&mut self, tickets: u64)
sourcepub fn collateral(&self) -> Result<u64>
pub fn collateral(&self) -> Result<u64>
represents the amount of collateral in staked tickets and open orders. does not reflect the entitled tickets/tokens because they are expected to be disbursed whenever this value is used.