pub struct TickerIndicatorsPoint {Show 20 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 open_price: f64,
pub prev_close_price: f64,
pub vol_24h: f64,
pub quote_vol_24h: f64,
pub change_pct_24h: f64,
pub weighted_avg_price: f64,
pub last_qty: f64,
pub mark_price: f64,
pub index_price: f64,
pub open_interest: f64,
pub funding_rate: f64,
pub count: Option<i64>,
}Expand description
160 B ticker record for Indicators depth.
Fields (all LE): u64 ts_ms (8) f64 last, bid, ask, bid_qty, ask_qty (5 × 8 = 40) f64 high_24h, low_24h (2 × 8 = 16) f64 open_price, prev_close_price (2 × 8 = 16) f64 vol_24h, quote_vol_24h (2 × 8 = 16) f64 change_pct_24h (8) f64 weighted_avg_price (8) f64 last_qty (8) f64 mark_price, index_price, open_interest (3 × 8 = 24) f64 funding_rate (8) u64 count (sentinel i64::MIN) (8)
Total: 8 + 40 + 16 + 16 + 16 + 8 + 8 + 8 + 24 + 8 + 8 = 160 B
Fields§
§ts_ms: i64§last: f64§bid: f64§ask: f64§bid_qty: f64§ask_qty: f64§high_24h: f64§low_24h: f64§open_price: f64§prev_close_price: f64§vol_24h: f64§quote_vol_24h: f64§change_pct_24h: f64§weighted_avg_price: f64§last_qty: f64§mark_price: f64§index_price: f64§open_interest: f64§funding_rate: f64§count: Option<i64>None stored as i64::MIN.
Implementations§
Source§impl TickerIndicatorsPoint
impl TickerIndicatorsPoint
pub fn from_ticker(t: &Ticker) -> Self
Trait Implementations§
Source§impl Clone for TickerIndicatorsPoint
impl Clone for TickerIndicatorsPoint
Source§fn clone(&self) -> TickerIndicatorsPoint
fn clone(&self) -> TickerIndicatorsPoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DataPoint for TickerIndicatorsPoint
impl DataPoint for TickerIndicatorsPoint
Source§const RECORD_SIZE: usize = INDICATORS_SIZE
const RECORD_SIZE: usize = INDICATORS_SIZE
On-disk record size in bytes. MUST be constant for the type. Read more
Source§fn encode(&self, out: &mut [u8])
fn encode(&self, out: &mut [u8])
Encode
self to a fixed-size buffer (little-endian). Read moreSource§fn decode(bytes: &[u8]) -> Option<Self>
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
fn timestamp_ms(&self) -> i64
Timestamp in milliseconds. Used for warm-start / range queries.
Source§fn from_stream_event(ev: &StreamEvent) -> Option<Self>
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>>
fn encode_blob(&self) -> Option<Vec<u8>>
Variable-length bytes to append to the companion
.blob file. Read moreSource§impl Debug for TickerIndicatorsPoint
impl Debug for TickerIndicatorsPoint
Source§impl<'de> Deserialize<'de> for TickerIndicatorsPoint
impl<'de> Deserialize<'de> for TickerIndicatorsPoint
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 TickerIndicatorsPoint
impl RefUnwindSafe for TickerIndicatorsPoint
impl Send for TickerIndicatorsPoint
impl Sync for TickerIndicatorsPoint
impl Unpin for TickerIndicatorsPoint
impl UnsafeUnpin for TickerIndicatorsPoint
impl UnwindSafe for TickerIndicatorsPoint
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