Order

Struct Order 

Source
pub struct Order<'a> {
Show 35 fields pub category: &'a str, pub order_id: &'a str, pub order_link_id: &'a str, pub is_leverage: &'a str, pub block_trade_id: &'a str, pub symbol: &'a str, pub price: &'a str, pub qty: &'a str, pub side: &'a str, pub position_idx: u8, pub order_status: &'a str, pub cancel_type: &'a str, pub reject_reason: &'a str, pub avg_price: &'a str, pub leaves_qty: &'a str, pub leaves_value: &'a str, pub cum_exec_qty: &'a str, pub cum_exec_value: &'a str, pub cum_exec_fee: &'a str, pub time_in_force: &'a str, pub order_type: &'a str, pub stop_order_type: &'a str, pub order_iv: &'a str, pub trigger_price: &'a str, pub take_profit: &'a str, pub stop_loss: &'a str, pub tp_trigger_by: &'a str, pub sl_trigger_by: &'a str, pub trigger_direction: u8, pub trigger_by: &'a str, pub last_price_on_created: &'a str, pub reduce_only: bool, pub close_on_trigger: bool, pub created_time: &'a str, pub updated_time: &'a str,
}
Expand description

The order data.

Fields§

§category: &'a str

Product type.

  • Unified account: spot, linear, option.
  • Normal account: linear, inverse.
§order_id: &'a str

Order ID.

§order_link_id: &'a str

User customised order ID.

§is_leverage: &'a str

Whether to borrow. spot returns this field only. 0 (default): false, 1: true.

§block_trade_id: &'a str

Block trade ID.

§symbol: &'a str

Symbol name.

§price: &'a str

Order price.

§qty: &'a str

Order qty.

§side: &'a str

Side. Buy, Sell.

§position_idx: u8

Position index. Used to identify positions in different position modes.

§order_status: &'a str

Order status.

§cancel_type: &'a str

Cancel type.

§reject_reason: &'a str

Reject reason.

§avg_price: &'a str

Average filled price. If unfilled, it is “”.

§leaves_qty: &'a str

The remaining qty not executed.

§leaves_value: &'a str

The remaining value not executed.

§cum_exec_qty: &'a str

Cumulative executed order qty.

§cum_exec_value: &'a str

Cumulative executed order value.

§cum_exec_fee: &'a str

Cumulative executed trading fee.

§time_in_force: &'a str

Time in force.

§order_type: &'a str

Order type. Market, Limit.

§stop_order_type: &'a str

Stop order type.

§order_iv: &'a str

Implied volatility.

§trigger_price: &'a str

Trigger price. If stopOrderType=TrailingStop, it is activate price. Otherwise, it is trigger price.

§take_profit: &'a str

Take profit price.

§stop_loss: &'a str

Stop loss price.

§tp_trigger_by: &'a str

The price type to trigger take profit.

§sl_trigger_by: &'a str

The price type to trigger stop loss.

§trigger_direction: u8

Trigger direction. 1: rise, 2: fall.

§trigger_by: &'a str

The price type of trigger price.

§last_price_on_created: &'a str

Last price when place the order. For linear only.

§reduce_only: bool

Reduce only. true means reduce position size.

§close_on_trigger: bool

Close on trigger.

§created_time: &'a str

Order created timestamp (ms).

§updated_time: &'a str

Order updated timestamp (ms).

Trait Implementations§

Source§

impl<'a> Debug for Order<'a>

Source§

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

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

impl<'de: 'a, 'a> Deserialize<'de> for Order<'a>

Source§

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

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Order<'a>

§

impl<'a> RefUnwindSafe for Order<'a>

§

impl<'a> Send for Order<'a>

§

impl<'a> Sync for Order<'a>

§

impl<'a> Unpin for Order<'a>

§

impl<'a> UnwindSafe for Order<'a>

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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