pub struct OpenInterestIndicatorsPoint {Show 13 fields
pub ts_ms: i64,
pub open_interest: f64,
pub open_interest_value: f64,
pub open_interest_ccy: f64,
pub open_interest_usd: f64,
pub single_open_interest: f64,
pub sum_open_interest: f64,
pub single_open_interest_value: f64,
pub sum_open_interest_value: f64,
pub cmc_circulating_supply: f64,
pub trade_amount: f64,
pub trade_volume: f64,
pub trade_turnover: f64,
}Expand description
104 B OpenInterest record for Indicators depth.
Layout (all LE): u64 ts_ms (8) f64 open_interest, open_interest_value (2 × 8 = 16) f64 open_interest_ccy, open_interest_usd (2 × 8 = 16) f64 single_open_interest, sum_open_interest (2 × 8 = 16) f64 single_open_interest_value, sum_open_interest_value (2 × 8 = 16) f64 cmc_circulating_supply (8) f64 trade_amount, trade_volume, trade_turnover (3 × 8 = 24)
Total: 8+16+16+16+16+8+24 = 104 B
Fields§
§ts_ms: i64§open_interest: f64§open_interest_value: f64§open_interest_ccy: f64§open_interest_usd: f64§single_open_interest: f64§sum_open_interest: f64§single_open_interest_value: f64§sum_open_interest_value: f64§cmc_circulating_supply: f64§trade_amount: f64§trade_volume: f64§trade_turnover: f64Implementations§
Source§impl OpenInterestIndicatorsPoint
impl OpenInterestIndicatorsPoint
Sourcepub fn from_open_interest(oi: &OpenInterest) -> Self
pub fn from_open_interest(oi: &OpenInterest) -> Self
Construct from a REST OpenInterest record (e.g. from get_open_interest_history).
Trait Implementations§
Source§impl Clone for OpenInterestIndicatorsPoint
impl Clone for OpenInterestIndicatorsPoint
Source§fn clone(&self) -> OpenInterestIndicatorsPoint
fn clone(&self) -> OpenInterestIndicatorsPoint
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 OpenInterestIndicatorsPoint
impl DataPoint for OpenInterestIndicatorsPoint
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 OpenInterestIndicatorsPoint
impl Debug for OpenInterestIndicatorsPoint
Source§impl<'de> Deserialize<'de> for OpenInterestIndicatorsPoint
impl<'de> Deserialize<'de> for OpenInterestIndicatorsPoint
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 OpenInterestIndicatorsPoint
impl RefUnwindSafe for OpenInterestIndicatorsPoint
impl Send for OpenInterestIndicatorsPoint
impl Sync for OpenInterestIndicatorsPoint
impl Unpin for OpenInterestIndicatorsPoint
impl UnsafeUnpin for OpenInterestIndicatorsPoint
impl UnwindSafe for OpenInterestIndicatorsPoint
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