Struct jet_fixed_term::orderbook::state::OrderParams
source · [−]pub struct OrderParams {
pub max_ticket_qty: u64,
pub max_underlying_token_qty: u64,
pub limit_price: u64,
pub match_limit: u64,
pub post_only: bool,
pub post_allowed: bool,
pub auto_stake: bool,
}
Expand description
Parameters needed for order placement
Fields
max_ticket_qty: u64
The maximum quantity of tickets to be traded.
max_underlying_token_qty: u64
The maximum quantity of underlying token to be traded.
limit_price: u64
The limit price of the order. This value is understood as a 32-bit fixed point number.
match_limit: u64
The maximum number of orderbook postings to match in order to fulfill the order
post_only: bool
The order will not be matched against the orderbook and will be direcly written into it.
The operation will fail if the order’s limit_price crosses the spread.
post_allowed: bool
Should the unfilled portion of the order be reposted to the orderbook
auto_stake: bool
Should the purchased tickets be automatically staked with the ticket program
Implementations
sourceimpl OrderParams
impl OrderParams
sourcepub fn as_new_order_params(
&self,
side: Side,
callback_info: CallbackInfo
) -> Params<CallbackInfo>
pub fn as_new_order_params(
&self,
side: Side,
callback_info: CallbackInfo
) -> Params<CallbackInfo>
Transforms the locally defined struct into the expected struct for the agnostic orderbook
Trait Implementations
sourceimpl BorshDeserialize for OrderParamswhere
u64: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
bool: BorshDeserialize,
bool: BorshDeserialize,
bool: BorshDeserialize,
impl BorshDeserialize for OrderParamswhere
u64: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
bool: BorshDeserialize,
bool: BorshDeserialize,
bool: BorshDeserialize,
sourcefn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
sourceimpl BorshSerialize for OrderParamswhere
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
impl BorshSerialize for OrderParamswhere
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
sourceimpl Clone for OrderParams
impl Clone for OrderParams
sourcefn clone(&self) -> OrderParams
fn clone(&self) -> OrderParams
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for OrderParams
Auto Trait Implementations
impl RefUnwindSafe for OrderParams
impl Send for OrderParams
impl Sync for OrderParams
impl Unpin for OrderParams
impl UnwindSafe for OrderParams
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more