pub enum LimitOrderType {
GoodTilCancelled,
FillOrKill,
ImmediateOrCancel,
JustInTime,
GoodTilTime,
}Variants§
GoodTilCancelled
Good-til-Cancelled limit orders are hybrid maker and taker limit orders. They will attempt to trade the supplied AmountIn at the TickIndex or better. However, if they total AmountIn cannot be traded at the limit price they are remaining amount will be placed as a maker limit order. The proceeds from the taker portion are deposited into the user’s account immediately, however, the proceeds from the maker portion must be explicitly withdrawn via WithdrawLimitOrder.
FillOrKill
Fill-or-Kill limit orders are taker limit orders that either successfully swap 100%
of the supplied AmountIn or return an error. If there is insufficient liquidity to
complete the trade at or above the supplied TickIndex a Fill-or-Kill order will
return an error codespace: dex, code: 1134
(https://github.com/neutron-org/neutron/blob/main/x/dex/types/errors.go#L107 ErrGoodTilOrderWithoutExpiration).
ImmediateOrCancel
Immediate-or-Cancel limit orders are taker orders that will swap as much as of the AmountIn as possible given available liquidity above the supplied TickIndex. Unlike Fill-or-Kill orders they will still successfully complete even if they are only able to partially trade through the AmountIn at the TickIndex or better.
JustInTime
Just-in-Time limit orders are an advanced maker limit order that provides tradeable liquidity for exactly one block. At the end of the same block in which the Just-in-Time order was submitted the order is canceled and any untraded portion will no longer be usable as active liquidity.
GoodTilTime
Good-til-Time limit order function exactly the same as Good-til-Cancelled limit orders first trying to trade as a taker limit order and then placing any remaining amount as a maker limit order. However, the maker portion of the limit order has a specified ExpirationTime. After the ExpirationTime the order will be cancelled and can no longer be traded against. When withdrawing a Good-til-Time limit order the user will receive both the successfully traded portion of the limit order (TokenOut) as well as any remaining untraded amount (TokenIn).
Trait Implementations§
Source§impl Clone for LimitOrderType
impl Clone for LimitOrderType
Source§fn clone(&self) -> LimitOrderType
fn clone(&self) -> LimitOrderType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LimitOrderType
impl Debug for LimitOrderType
Source§impl Default for LimitOrderType
impl Default for LimitOrderType
Source§fn default() -> LimitOrderType
fn default() -> LimitOrderType
Source§impl<'de> Deserialize<'de> for LimitOrderType
impl<'de> Deserialize<'de> for LimitOrderType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for LimitOrderType
impl JsonSchema for LimitOrderType
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for LimitOrderType
impl PartialEq for LimitOrderType
Source§impl Serialize for LimitOrderType
impl Serialize for LimitOrderType
impl Eq for LimitOrderType
impl StructuralPartialEq for LimitOrderType
Auto Trait Implementations§
impl Freeze for LimitOrderType
impl RefUnwindSafe for LimitOrderType
impl Send for LimitOrderType
impl Sync for LimitOrderType
impl Unpin for LimitOrderType
impl UnwindSafe for LimitOrderType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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