pub struct Order {Show 15 fields
pub order_id: i64,
pub wallet_address: WalletAddress,
pub symbol: String,
pub side: String,
pub price: Decimal,
pub size: Decimal,
pub tif: Option<String>,
pub status: Option<String>,
pub created_at: i64,
pub updated_at: Option<DateTime<Utc>>,
pub filled_size: Option<Decimal>,
pub client_id: Option<String>,
pub reduce_only: Option<bool>,
pub mmp_enabled: bool,
pub instrument_type: String,
}Expand description
A resting or historical order on the matching engine.
Fields§
§order_id: i64Unique order identifier assigned by the engine.
wallet_address: WalletAddressOwner wallet address (checksummed Ethereum address).
symbol: StringInstrument symbol the order is placed on.
side: StringOrder side ("buy" or "sell").
price: DecimalLimit price in USD. Serialized as a string.
size: DecimalOrder size in contracts. Serialized as a string.
tif: Option<String>Time-in-force policy (e.g. "GTC", "IOC", "FOK"), when the source exposes it.
status: Option<String>Current order status (e.g. "open", "filled", "cancelled").
created_at: i64Order creation timestamp in milliseconds since epoch.
updated_at: Option<DateTime<Utc>>Timestamp of the last status change (ISO 8601).
filled_size: Option<Decimal>Cumulative filled size in contracts. Serialized as a string.
client_id: Option<String>Client-assigned order identifier, when one was supplied.
reduce_only: Option<bool>Whether the order can only reduce an existing position.
Historical option records may not contain this field. None preserves
that absence instead of inventing order intent.
mmp_enabled: boolWhether Market Maker Protection is enabled for this order.
instrument_type: StringInstrument family that produced this order ("option" or "perp").
Implementations§
Source§impl Order
impl Order
pub fn instrument_kind(&self) -> Result<InstrumentKind, ParseSdkEnumError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Order
impl<'de> Deserialize<'de> for Order
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Order, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Order, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Order
impl Serialize for Order
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for Order
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnsafeUnpin for Order
impl UnwindSafe for Order
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
impl<'de, T> BorrowedRpcObject<'de> for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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