Skip to main content

TradeFillData

Struct TradeFillData 

Source
pub struct TradeFillData {
Show 16 fields pub common: OrderUpdateCommon, pub side: String, pub price: Option<String>, pub avg_price: Option<String>, pub quantity: Option<String>, pub last_filled_qty: String, pub last_filled_price: String, pub commission: String, pub commission_asset: String, pub is_maker: bool, pub trade_id: u64, pub realized_pnl: String, pub fill_type: Option<String>, pub cumulative_filled_size: Option<String>, pub cumulative_filled_cot: Option<String>, pub remaining_size: Option<String>,
}
Expand description

Order data for TRADE fills.

Fields populated only for orderbook fills (when the rollup emits cumulative counters) are wrapped in Option: ap, ft, z, Z, rs. Liquidation fills typically omit these — use X == "FILLED" from OrderUpdateCommon as the canonical “fully filled” signal in that case.

Fields§

§common: OrderUpdateCommon§side: String§price: Option<String>§avg_price: Option<String>

Average fill price across cumulative fills. Added 2026-05-23.

§quantity: Option<String>§last_filled_qty: String§last_filled_price: String§commission: String§commission_asset: String

Commission asset (e.g. "USDC"). Added 2026-05-23.

§is_maker: bool

Whether this fill was on the maker side.

§trade_id: u64

Sequencer-assigned trade id.

§realized_pnl: String

Realized PnL for this fill. Added 2026-05-23.

§fill_type: Option<String>

Fill type: "orderbook" ("o") for book fills, "liquidation" ("l") for liquidation fills. Absent on legacy fills.

§cumulative_filled_size: Option<String>

Cumulative filled size across partial fills. Absent when upstream did not provide it (e.g. liquidations).

§cumulative_filled_cot: Option<String>

Cumulative quote notional filled. Absent when upstream did not provide it.

§remaining_size: Option<String>

Remaining size on the order ("0" means fully filled). Absent when upstream did not provide it; fall back to X == "FILLED" for that case.

Trait Implementations§

Source§

impl Clone for TradeFillData

Source§

fn clone(&self) -> TradeFillData

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TradeFillData

Source§

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

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

impl<'de> Deserialize<'de> for TradeFillData

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 Serialize for TradeFillData

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.