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
impl BorshDeserialize for Params where
u64: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
Side: BorshDeserialize,
u64: BorshDeserialize,
Vec<u8>: BorshDeserialize,
bool: BorshDeserialize,
bool: BorshDeserialize,
SelfTradeBehavior: BorshDeserialize,
[src]
impl BorshDeserialize for Params where
u64: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
Side: BorshDeserialize,
u64: BorshDeserialize,
Vec<u8>: BorshDeserialize,
bool: BorshDeserialize,
bool: BorshDeserialize,
SelfTradeBehavior: BorshDeserialize,
[src]impl BorshSerialize for Params where
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
Side: BorshSerialize,
u64: BorshSerialize,
Vec<u8>: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
SelfTradeBehavior: BorshSerialize,
[src]
impl BorshSerialize for Params where
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
Side: BorshSerialize,
u64: BorshSerialize,
Vec<u8>: BorshSerialize,
bool: BorshSerialize,
bool: BorshSerialize,
SelfTradeBehavior: BorshSerialize,
[src]Auto Trait Implementations
impl RefUnwindSafe for Params
impl UnwindSafe for Params
Blanket Implementations
Mutably borrows from an owned value. Read more