Skip to main content

Fill

Struct Fill 

Source
pub struct Fill {
Show 16 fields pub order_id: u64, pub qty: Quantity, pub price: Price, pub fee: Money, pub ts: u64, pub account_id: String, pub strategy_id: Option<String>, pub signal_id: Option<u64>, pub intent_id: Option<u64>, pub venue_id: Option<String>, pub venue_order_id: Option<String>, pub rule_version: Option<String>, pub fee_currency: Option<String>, pub fees: Vec<FillFee>, pub exact_fees: Vec<ExactFillFee>, pub exact_amounts: Option<ExactFillAmounts>,
}

Fields§

§order_id: u64§qty: Quantity§price: Price§fee: Money§ts: u64§account_id: String

成交归属账户。真实 Venue 回报必须填充;旧模拟路径允许为空并由 OMS 补齐。

§strategy_id: Option<String>§signal_id: Option<u64>§intent_id: Option<u64>§venue_id: Option<String>§venue_order_id: Option<String>§rule_version: Option<String>§fee_currency: Option<String>§fees: Vec<FillFee>

按币种拆分的成交手续费。为空时读取旧的 fee / fee_currency 两格。

§exact_fees: Vec<ExactFillFee>

Scale-aware per-currency fee rows for fills that exceed the legacy 1e9 amount grid.

§exact_amounts: Option<ExactFillAmounts>

Versioned high-precision quantity/price payload; absent on legacy 1e9 fills.

Implementations§

Source§

impl Fill

Source

pub fn exact_identity_suffix(&self) -> String

Stable suffix for trade identities and scale-aware fill fields used by replay dedup.

Source

pub fn validate_exact_amounts(&self) -> Result<(), String>

Source

pub fn require_legacy_amounts(&self) -> Result<(), String>

Guard a legacy 1e9 consumer against silently reading an exact fill as zero.

Source

pub fn quantity_decimal(&self) -> ExactDecimal

Source

pub fn price_decimal(&self) -> ExactDecimal

Source

pub fn fee_charges(&self) -> Result<Vec<FillFee>, String>

读取新旧格式统一的费用事实,并拒绝同时写入互相矛盾的字段。

Trait Implementations§

Source§

impl Clone for Fill

Source§

fn clone(&self) -> Fill

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 Fill

Source§

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

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

impl Default for Fill

Source§

fn default() -> Fill

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Fill

Source§

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

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

impl Eq for Fill

Source§

impl PartialEq for Fill

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for Fill

Source§

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

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Fill

Auto Trait Implementations§

§

impl Forget for Fill

§

impl Freeze for Fill

§

impl Move for Fill

§

impl RefUnwindSafe for Fill

§

impl Send for Fill
where RawVecInner: Send,

§

impl Sync for Fill
where RawVecInner: Sync,

§

impl Unpin for Fill
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for Fill

§

impl UnwindSafe for Fill
where RawVecInner: UnwindSafe,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.