Order

Struct Order 

Source
pub struct Order {
Show 30 fields pub order_id: String, pub product_id: String, pub user_id: String, pub order_configuration: OrderConfiguration, pub side: Side, pub client_order_id: String, pub status: Status, pub time_in_force: TimeInForce, pub created_time: DateTime, pub completion_percentage: String, pub filled_size: String, pub average_filled_price: String, pub fee: String, pub number_of_fills: String, pub filled_value: String, pub pending_cancel: bool, pub size_in_quote: bool, pub total_fees: String, pub size_inclusive_of_fees: bool, pub total_value_after_fees: String, pub trigger_status: TriggerStatus, pub order_type: OrderType, pub reject_reason: RejectReason, pub settled: bool, pub product_type: ProductType, pub reject_message: Option<String>, pub cancel_message: Option<String>, pub order_placement_source: OrderPlacementSource, pub outstanding_hold_amount: String, pub is_liquidation: bool,
}
Expand description

Structure representing an order response

Fields§

§order_id: String

The unique id for this order

§product_id: String

The product this order was created for e.g. ‘BTC-USD’

§user_id: String

The id of the User owning this Order

§order_configuration: OrderConfiguration§side: Side

Possible values: [UNKNOWN_ORDER_SIDE, BUY, SELL]

§client_order_id: String

Client specified ID of order.

§status: Status

Possible values: [OPEN, FILLED, CANCELLED, EXPIRED, FAILED, UNKNOWN_ORDER_STATUS]

§time_in_force: TimeInForce

Possible values: [UNKNOWN_TIME_IN_FORCE, GOOD_UNTIL_DATE_TIME, GOOD_UNTIL_CANCELLED, IMMEDIATE_OR_CANCEL, FILL_OR_KILL]

§created_time: DateTime

Timestamp for when the order was created

§completion_percentage: String

The percent of total order amount that has been filled

§filled_size: String

The portion (in base currency) of total order amount that has been filled

§average_filled_price: String

The average of all prices of fills for this order

§fee: String

Commission amount

§number_of_fills: String

Number of fills that have been posted for this order

§filled_value: String

The portion (in quote current) of total order amount that has been filled

§pending_cancel: bool

Whether a cancel request has been initiated for the order, and not yet completed

§size_in_quote: bool

Whether the order was placed with quote currency

§total_fees: String

The total fees for the order

§size_inclusive_of_fees: bool

Whether the order size includes fees

§total_value_after_fees: String

derived field: filled_value + total_fees for buy orders and filled_value - total_fees for sell orders.

§trigger_status: TriggerStatus

Possible values: [UNKNOWN_TRIGGER_STATUS, INVALID_ORDER_TYPE, STOP_PENDING, STOP_TRIGGERED]

§order_type: OrderType

Possible values: [UNKNOWN_ORDER_TYPE, MARKET, LIMIT, STOP, STOP_LIMIT]

§reject_reason: RejectReason

Possible values: REJECT_REASON_UNSPECIFIED

§settled: bool§product_type: ProductType

Possible values: [SPOT, FUTURE]

§reject_message: Option<String>

Message stating why the order was rejected.

§cancel_message: Option<String>

Message stating why the order was canceled.

§order_placement_source: OrderPlacementSource

Possible values: [RETAIL_SIMPLE, RETAIL_ADVANCED]

§outstanding_hold_amount: String§is_liquidation: bool

True if order is of liquidation type.

Trait Implementations§

Source§

impl Debug for Order

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Order

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Order

Source§

fn eq(&self, other: &Order) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Order

Source§

impl StructuralPartialEq for Order

Auto Trait Implementations§

§

impl Freeze for Order

§

impl RefUnwindSafe for Order

§

impl Send for Order

§

impl Sync for Order

§

impl Unpin for Order

§

impl UnwindSafe for Order

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,