pub struct Order {Show 36 fields
pub order_id: String,
pub product_id: Ustr,
pub user_id: String,
pub order_configuration: Option<Value>,
pub side: CoinbaseOrderSide,
pub client_order_id: String,
pub status: CoinbaseOrderStatus,
pub time_in_force: Option<CoinbaseTimeInForce>,
pub created_time: String,
pub completion_percentage: String,
pub filled_size: String,
pub average_filled_price: String,
pub fee: Decimal,
pub number_of_fills: u64,
pub filled_value: Decimal,
pub pending_cancel: bool,
pub size_in_quote: bool,
pub total_fees: Decimal,
pub size_inclusive_of_fees: bool,
pub total_value_after_fees: Decimal,
pub trigger_status: CoinbaseTriggerStatus,
pub order_type: CoinbaseOrderType,
pub reject_reason: String,
pub settled: bool,
pub product_type: CoinbaseProductType,
pub reject_message: String,
pub cancel_message: String,
pub order_placement_source: CoinbaseOrderPlacementSource,
pub outstanding_hold_amount: Decimal,
pub is_liquidation: bool,
pub last_fill_time: Option<String>,
pub leverage: String,
pub margin_type: Option<CoinbaseMarginType>,
pub retail_portfolio_id: String,
pub originating_order_id: String,
pub attached_order_id: String,
}Expand description
A historical or open order as returned by /orders/historical/*.
order_configuration is kept as a raw JSON value because Coinbase returns
a wider set of config shapes on history responses than on submit (bracket
orders, TWAP, trigger variants, and new shapes Coinbase may ship without
bumping the API version). Consumers that need typed access can try to
deserialize the inner value into
crate::http::query::OrderConfiguration and tolerate failures. Keeping
the wire shape permissive prevents a single unknown variant from failing
the entire batch response.
Fields§
§order_id: String§product_id: Ustr§user_id: String§order_configuration: Option<Value>§side: CoinbaseOrderSide§client_order_id: String§status: CoinbaseOrderStatus§time_in_force: Option<CoinbaseTimeInForce>§created_time: String§completion_percentage: String§filled_size: String§average_filled_price: String§fee: Decimal§number_of_fills: u64§filled_value: Decimal§pending_cancel: bool§size_in_quote: bool§total_fees: Decimal§size_inclusive_of_fees: bool§total_value_after_fees: Decimal§trigger_status: CoinbaseTriggerStatus§order_type: CoinbaseOrderType§reject_reason: String§settled: bool§product_type: CoinbaseProductType§reject_message: String§cancel_message: String§order_placement_source: CoinbaseOrderPlacementSource§outstanding_hold_amount: Decimal§is_liquidation: bool§last_fill_time: Option<String>§leverage: String§margin_type: Option<CoinbaseMarginType>§retail_portfolio_id: String§originating_order_id: String§attached_order_id: StringTrait Implementations§
Source§impl<'de> Deserialize<'de> for Order
impl<'de> Deserialize<'de> for Order
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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