Struct agnostic_orderbook::instruction::new_order::Params[][src]

pub struct Params {
    pub max_base_qty: u64,
    pub max_quote_qty: u64,
    pub limit_price: u64,
    pub side: Side,
    pub match_limit: u64,
    pub callback_info: Vec<u8>,
    pub post_only: bool,
    pub post_allowed: bool,
    pub self_trade_behavior: SelfTradeBehavior,
}
Expand description

The required arguments for a new_order instruction.

Fields

max_base_qty: u64

The maximum quantity of base to be traded.

max_quote_qty: u64

The maximum quantity of quote to be traded.

limit_price: u64

The limit price of the order. This value is understood as a 32-bit fixed point number.

side: Side

The order’s side.

match_limit: u64

The maximum number of orders to match against before performing a partial fill.

It is then possible for a caller program to detect a partial fill by reading the OrderSummary in the event queue register.

callback_info: Vec<u8>

The callback information is used to attach metadata to an order. This callback information will be transmitted back through the event queue.

The size of this vector should not exceed the current market’s callback_info_len.

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

The order will be matched against the orderbook, but what remains will not be written as a new order into the orderbook.

self_trade_behavior: SelfTradeBehavior

Describes what would happen if this order was matched against an order with an equal callback_info field.

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

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.