pub struct DerivativesTick {
pub funding_rate: f64,
pub mark_price: f64,
pub index_price: f64,
pub futures_price: f64,
pub open_interest: f64,
pub long_size: f64,
pub short_size: f64,
pub taker_buy_volume: f64,
pub taker_sell_volume: f64,
pub long_liquidation: f64,
pub short_liquidation: f64,
pub timestamp: i64,
}Expand description
A derivatives (perpetual / futures) tick, fed to derivatives indicators.
Fields§
§funding_rate: f64Funding rate for the interval (finite; may be negative).
mark_price: f64Perpetual mark price (strictly positive).
index_price: f64Spot / index price the perpetual tracks (strictly positive).
futures_price: f64Dated futures mark price (strictly positive).
open_interest: f64Open interest (non-negative).
long_size: f64Aggregate long size (non-negative).
short_size: f64Aggregate short size (non-negative).
taker_buy_volume: f64Taker buy volume (non-negative).
taker_sell_volume: f64Taker sell volume (non-negative).
long_liquidation: f64Long-liquidation volume (non-negative).
short_liquidation: f64Short-liquidation volume (non-negative).
timestamp: i64Tick timestamp (engine-defined epoch unit).
Implementations§
Source§impl DerivativesTick
impl DerivativesTick
Sourcepub fn to_core(self) -> Result<CoreDerivativesTick>
pub fn to_core(self) -> Result<CoreDerivativesTick>
Convert into a wickra-core derivatives tick, validating the fields.
Trait Implementations§
Source§impl Clone for DerivativesTick
impl Clone for DerivativesTick
Source§fn clone(&self) -> DerivativesTick
fn clone(&self) -> DerivativesTick
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 moreimpl Copy for DerivativesTick
Source§impl Debug for DerivativesTick
impl Debug for DerivativesTick
Source§impl<'de> Deserialize<'de> for DerivativesTick
impl<'de> Deserialize<'de> for DerivativesTick
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
Source§impl PartialEq for DerivativesTick
impl PartialEq for DerivativesTick
Source§impl Serialize for DerivativesTick
impl Serialize for DerivativesTick
impl StructuralPartialEq for DerivativesTick
Auto Trait Implementations§
impl Freeze for DerivativesTick
impl RefUnwindSafe for DerivativesTick
impl Send for DerivativesTick
impl Sync for DerivativesTick
impl Unpin for DerivativesTick
impl UnsafeUnpin for DerivativesTick
impl UnwindSafe for DerivativesTick
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more