Skip to main content

dxf_trade_t

Struct dxf_trade_t 

Source
#[repr(C)]
pub struct dxf_trade_t {
Show 16 fields pub time: dxf_long_t, pub sequence: dxf_int_t, pub time_nanos: dxf_int_t, pub exchange_code: dxf_char_t, pub trade_id: dxf_long_t, pub price: dxf_double_t, pub size: dxf_double_t, pub tick: dxf_int_t, pub change: dxf_double_t, pub day_id: dxf_dayid_t, pub day_volume: dxf_double_t, pub day_turnover: dxf_double_t, pub raw_flags: dxf_int_t, pub direction: dxf_direction_t, pub is_eth: dxf_bool_t, pub scope: dxf_order_scope_t,
}
Expand description

Trade event is a snapshot of the price and size of the last trade during regular trading hours and an overall day volume and day turnover. It represents the most recent information that is available about the regular last trade on the market at any given moment of time.

Fields§

§time: dxf_long_t

Time of the last trade.

§sequence: dxf_int_t

Sequence number of the last trade to distinguish trades that have the same #time.

§time_nanos: dxf_int_t

Microseconds and nanoseconds part of time of the last trade

§exchange_code: dxf_char_t

Exchange code of the last trade

§trade_id: dxf_long_t

Trade id of the last trade

§price: dxf_double_t

Price of the last trade

§size: dxf_double_t

Size of the last trade

§tick: dxf_int_t

Trend indicator – in which direction price is moving. The values are: Up (Tick = 1), Down (Tick = 2), and Undefined (Tick = 0). Should be used if #direction is Undefined (#dxf_dir_undefined = 0).

This field is absent in TradeETH

§change: dxf_double_t

Change of the last trade. Value equals price minus dxf_summary_t#prev_day_close_price

§day_id: dxf_dayid_t

Identifier of the day that this trade or trade_eth represents. Identifier of the day is the number of days passed since January 1, 1970.

§day_volume: dxf_double_t

Total volume traded for a day

§day_turnover: dxf_double_t

Total turnover traded for a day

§raw_flags: dxf_int_t

This field contains several individual flags encoded as an integer number the following way:

31...43210
DirectionETH
  1. Tick Direction (#dxf_direction_t)
  2. ETH (extendedTradingHours) - flag that determines current trading session: extended or regular (0 - regular trading hours, 1 - extended trading hours).
§direction: dxf_direction_t

Tick direction of the last trade

§is_eth: dxf_bool_t

Last trade was in extended trading hours

§scope: dxf_order_scope_t

Last trade scope.

Possible values: #dxf_osc_composite (Trade events) , #dxf_osc_regional (Trade& events)

Trait Implementations§

Source§

impl Clone for dxf_trade_t

Source§

fn clone(&self) -> dxf_trade_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for dxf_trade_t

Source§

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

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

impl PartialEq for dxf_trade_t

Source§

fn eq(&self, other: &dxf_trade_t) -> 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 Copy for dxf_trade_t

Source§

impl StructuralPartialEq for dxf_trade_t

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> 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.