Struct HyperliquidAssetContext
#[non_exhaustive]pub struct HyperliquidAssetContext {
pub mid_price: Option<Decimal>,
pub mark_price: Option<Decimal>,
pub oracle_price: Option<Decimal>,
pub funding_rate: Option<Decimal>,
pub open_interest: Option<Decimal>,
pub size_decimals: u32,
pub price_decimals: u32,
}Expand description
Hyperliquid’s current context and order precision for one market.
HyperliquidAssetContext::funding_rate is the provider’s current market
rate. FundingRate contains historical market-rate
observations, while FundingPayment contains
amounts actually charged or credited to an account.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mid_price: Option<Decimal>The provider’s mid price, or None when unavailable.
mark_price: Option<Decimal>The provider’s mark price.
oracle_price: Option<Decimal>The provider’s oracle price. Perpetual markets only.
funding_rate: Option<Decimal>The current funding rate as a signed ratio.
Perpetual markets only; None on spot, which pays no funding.
open_interest: Option<Decimal>Open interest in the base asset. Perpetual markets only.
size_decimals: u32Maximum decimal places accepted for order size.
Finer sizes are rejected locally before signing.
price_decimals: u32Maximum decimal places accepted for a fractional order price.
This is 6 - size_decimals for perpetuals and 8 - size_decimals for
spot. Fractional prices are also limited to five significant digits;
integer prices are exempt from the significant-digit limit.
Trait Implementations§
§impl Clone for HyperliquidAssetContext
impl Clone for HyperliquidAssetContext
§fn clone(&self) -> HyperliquidAssetContext
fn clone(&self) -> HyperliquidAssetContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for HyperliquidAssetContext
impl Debug for HyperliquidAssetContext
impl Eq for HyperliquidAssetContext
§impl PartialEq for HyperliquidAssetContext
impl PartialEq for HyperliquidAssetContext
impl StructuralPartialEq for HyperliquidAssetContext
Auto Trait Implementations§
impl Freeze for HyperliquidAssetContext
impl RefUnwindSafe for HyperliquidAssetContext
impl Send for HyperliquidAssetContext
impl Sync for HyperliquidAssetContext
impl Unpin for HyperliquidAssetContext
impl UnsafeUnpin for HyperliquidAssetContext
impl UnwindSafe for HyperliquidAssetContext
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.