pub struct PerpSnapshot {
pub mark_price: f64,
pub index_price: f64,
pub funding_rate_daily: f64,
pub open_interest: OpenInterest,
}Expand description
Live market data from a multicall snapshot.
Pure market state — no static config. Returned alongside PerpData
from PerpClient::get_perp_snapshot.
Fields§
§mark_price: f64Current mark price (TWAP) in human-readable units.
index_price: f64Oracle index price from the beacon contract.
funding_rate_daily: f64Daily funding rate (positive = longs pay shorts).
open_interest: OpenInterestTaker open interest.
Trait Implementations§
Source§impl Clone for PerpSnapshot
impl Clone for PerpSnapshot
Source§fn clone(&self) -> PerpSnapshot
fn clone(&self) -> PerpSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PerpSnapshot
impl Debug for PerpSnapshot
Source§impl<'de> Deserialize<'de> for PerpSnapshot
impl<'de> Deserialize<'de> for PerpSnapshot
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 PerpSnapshot
impl PartialEq for PerpSnapshot
Source§impl Serialize for PerpSnapshot
impl Serialize for PerpSnapshot
impl Copy for PerpSnapshot
impl StructuralPartialEq for PerpSnapshot
Auto Trait Implementations§
impl Freeze for PerpSnapshot
impl RefUnwindSafe for PerpSnapshot
impl Send for PerpSnapshot
impl Sync for PerpSnapshot
impl Unpin for PerpSnapshot
impl UnsafeUnpin for PerpSnapshot
impl UnwindSafe for PerpSnapshot
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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