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

Transforms the locally defined struct into the expected struct for the agnostic orderbook

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more
Deserialize this instance from a slice of bytes.
Serialize this instance into a vector of bytes.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.