pub struct MultipleOrderPacket {
pub bids: Vec<CondensedOrder>,
pub asks: Vec<CondensedOrder>,
pub client_order_id: Option<u128>,
pub failed_multiple_limit_order_behavior: FailedMultipleLimitOrderBehavior,
}Expand description
Struct to send a vector of bids and asks as PostOnly orders in a single packet.
Fields§
§bids: Vec<CondensedOrder>Bids and asks are in the format (price in ticks, size in base lots)
asks: Vec<CondensedOrder>§client_order_id: Option<u128>§failed_multiple_limit_order_behavior: FailedMultipleLimitOrderBehaviorImplementations§
Source§impl MultipleOrderPacket
impl MultipleOrderPacket
pub fn new( bids: Vec<CondensedOrder>, asks: Vec<CondensedOrder>, client_order_id: Option<u128>, reject_post_only: bool, ) -> Self
pub fn new_default(bids: Vec<CondensedOrder>, asks: Vec<CondensedOrder>) -> Self
pub fn new_with_failure_behavior( bids: Vec<CondensedOrder>, asks: Vec<CondensedOrder>, client_order_id: Option<u128>, failed_multiple_limit_order_behavior: FailedMultipleLimitOrderBehavior, ) -> Self
Trait Implementations§
Source§impl BorshSerialize for MultipleOrderPacket
impl BorshSerialize for MultipleOrderPacket
Auto Trait Implementations§
impl Freeze for MultipleOrderPacket
impl RefUnwindSafe for MultipleOrderPacket
impl Send for MultipleOrderPacket
impl Sync for MultipleOrderPacket
impl Unpin for MultipleOrderPacket
impl UnwindSafe for MultipleOrderPacket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more