Skip to main content

TickerFullPoint

Struct TickerFullPoint 

Source
pub struct TickerFullPoint {
Show 46 fields pub ts_ms: i64, pub last: f64, pub bid: f64, pub ask: f64, pub bid_qty: f64, pub ask_qty: f64, pub high_24h: f64, pub low_24h: f64, pub vol_24h: f64, pub quote_vol_24h: f64, pub price_change_24h: f64, pub price_change_pct_24h: f64, pub open_price: f64, pub prev_close_price: f64, pub prev_price_24h: f64, pub prev_price_1h: f64, pub weighted_avg_price: f64, pub open_utc: f64, pub turnover_24h: f64, pub first_id: Option<i64>, pub last_id: Option<i64>, pub count: Option<i64>, pub mark_price: f64, pub index_price: f64, pub open_interest: f64, pub open_interest_value: f64, pub single_open_interest: f64, pub funding_rate: f64, pub next_funding_time: Option<i64>, pub funding_interval_hour: f64, pub funding_cap: f64, pub basis: f64, pub basis_rate: f64, pub predicted_delivery_price: f64, pub delivery_time: Option<i64>, pub settlement_price: f64, pub funding_8h: f64, pub min_price: f64, pub max_price: f64, pub volume_notional: f64, pub last_qty: f64, pub interest_value: f64, pub last_trade_time: Option<i64>, pub open_time: Option<i64>, pub update_id: Option<i64>, pub state: Option<String>,
}
Expand description

Full Ticker record — every numeric wire field.

Layout (all LE): u64 ts_ms (8) f64 last (8) f64 bid, ask, bid_qty, ask_qty (4 × 8 = 32) f64 high_24h, low_24h, vol_24h, quote_vol_24h (4 × 8 = 32) f64 price_change_24h, price_change_pct_24h (2 × 8 = 16) f64 open_price, prev_close_price (2 × 8 = 16) f64 prev_price_24h, prev_price_1h (2 × 8 = 16) f64 weighted_avg_price, open_utc, turnover_24h (3 × 8 = 24) u64 first_id, last_id, count (sentinels) (3 × 8 = 24) f64 mark_price, index_price (2 × 8 = 16) f64 open_interest, open_interest_value (2 × 8 = 16) f64 single_open_interest (8) f64 funding_rate (8) u64 next_funding_time (sentinel) (8) f64 funding_interval_hour, funding_cap (2 × 8 = 16) f64 basis, basis_rate (2 × 8 = 16) f64 predicted_delivery_price (8) u64 delivery_time (sentinel) (8) f64 settlement_price, funding_8h (2 × 8 = 16) f64 min_price, max_price, volume_notional (3 × 8 = 24) f64 last_qty, interest_value (2 × 8 = 16) u64 last_trade_time, open_time, update_id (senti) (3 × 8 = 24) u64 blob_offset (8), u32 blob_len (4) (12)

Fixed total: 8+8+32+32+16+16+16+24+24+16+16+8+8+8+16+16+8+8+16+24+16+24+12 = 376 B

Blob (variable): u16-len-prefixed UTF-8 state string (empty if None). update_id is stored as u64 with sentinel.

Fields§

§ts_ms: i64§last: f64§bid: f64§ask: f64§bid_qty: f64§ask_qty: f64§high_24h: f64§low_24h: f64§vol_24h: f64§quote_vol_24h: f64§price_change_24h: f64§price_change_pct_24h: f64§open_price: f64§prev_close_price: f64§prev_price_24h: f64§prev_price_1h: f64§weighted_avg_price: f64§open_utc: f64§turnover_24h: f64§first_id: Option<i64>§last_id: Option<i64>§count: Option<i64>§mark_price: f64§index_price: f64§open_interest: f64§open_interest_value: f64§single_open_interest: f64§funding_rate: f64§next_funding_time: Option<i64>§funding_interval_hour: f64§funding_cap: f64§basis: f64§basis_rate: f64§predicted_delivery_price: f64§delivery_time: Option<i64>§settlement_price: f64§funding_8h: f64§min_price: f64§max_price: f64§volume_notional: f64§last_qty: f64§interest_value: f64§last_trade_time: Option<i64>§open_time: Option<i64>§update_id: Option<i64>§state: Option<String>

Instrument state string (“open”/“closed” etc.) — stored in blob.

Implementations§

Trait Implementations§

Source§

impl Clone for TickerFullPoint

Source§

fn clone(&self) -> TickerFullPoint

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 DataPoint for TickerFullPoint

Source§

const RECORD_SIZE: usize = FULL_SIZE

On-disk record size in bytes. MUST be constant for the type. Read more
Source§

fn encode(&self, out: &mut [u8])

Encode self to a fixed-size buffer (little-endian). Read more
Source§

fn decode(bytes: &[u8]) -> Option<Self>

Decode from a fixed-size buffer. Returns None on malformed bytes. Read more
Source§

fn timestamp_ms(&self) -> i64

Timestamp in milliseconds. Used for warm-start / range queries.
Source§

fn from_stream_event(ev: &StreamEvent) -> Option<Self>

Try to extract Self from a raw WS StreamEvent. Returns None if the event doesn’t carry data for this class.
Source§

fn encode_blob(&self) -> Option<Vec<u8>>

Variable-length bytes to append to the companion .blob file. Read more
Source§

fn decode_blob(header: &[u8], blob: &[u8]) -> Option<Self>

Reconstruct Self from header bytes + blob slice. Read more
Source§

fn blob_pointer_offset() -> Option<usize>

Some(offset) if the type uses blob storage; None otherwise. Read more
Source§

impl Debug for TickerFullPoint

Source§

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

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

impl<'de> Deserialize<'de> for TickerFullPoint

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 TickerFullPoint

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

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more