pub struct PerpetualMarket {Show 26 fields
pub clob_pair_id: u32,
pub ticker: String,
pub status: DydxMarketStatus,
pub base_asset: Option<String>,
pub quote_asset: Option<String>,
pub step_size: Decimal,
pub tick_size: Decimal,
pub index_price: Option<Decimal>,
pub oracle_price: Decimal,
pub price_change_24h: Decimal,
pub next_funding_rate: Decimal,
pub next_funding_at: Option<DateTime<Utc>>,
pub min_order_size: Option<Decimal>,
pub market_type: Option<DydxTickerType>,
pub initial_margin_fraction: Decimal,
pub maintenance_margin_fraction: Decimal,
pub base_position_notional: Option<Decimal>,
pub incremental_position_size: Option<Decimal>,
pub incremental_initial_margin_fraction: Option<Decimal>,
pub max_position_size: Option<Decimal>,
pub open_interest: Decimal,
pub atomic_resolution: i32,
pub quantum_conversion_exponent: i32,
pub subticks_per_tick: u32,
pub step_base_quantums: u64,
pub is_reduce_only: bool,
}Expand description
Perpetual market definition.
Fields§
§clob_pair_id: u32Unique identifier for the CLOB pair.
ticker: StringMarket ticker (e.g., “BTC-USD”).
status: DydxMarketStatusMarket status (ACTIVE, PAUSED, etc.).
base_asset: Option<String>Base asset symbol (optional, not always returned by API).
quote_asset: Option<String>Quote asset symbol (optional, not always returned by API).
step_size: DecimalStep size for order quantities (minimum increment).
tick_size: DecimalTick size for order prices (minimum increment).
index_price: Option<Decimal>Index price for the market (optional, not always returned by API).
oracle_price: DecimalOracle price for the market.
price_change_24h: DecimalPrice change over 24 hours.
next_funding_rate: DecimalNext funding rate.
next_funding_at: Option<DateTime<Utc>>Next funding time (ISO8601, optional).
min_order_size: Option<Decimal>Minimum order size in base currency (optional).
market_type: Option<DydxTickerType>Market type (always PERPETUAL for dYdX v4, optional).
initial_margin_fraction: DecimalInitial margin fraction.
maintenance_margin_fraction: DecimalMaintenance margin fraction.
base_position_notional: Option<Decimal>Base position notional value (optional).
incremental_position_size: Option<Decimal>Incremental position size for margin scaling (optional).
incremental_initial_margin_fraction: Option<Decimal>Incremental initial margin fraction (optional).
max_position_size: Option<Decimal>Maximum position size (optional).
open_interest: DecimalOpen interest in base currency.
atomic_resolution: i32Atomic resolution (power of 10 for quantum conversion).
quantum_conversion_exponent: i32Quantum conversion exponent (deprecated, use atomic_resolution).
subticks_per_tick: u32Subticks per tick.
step_base_quantums: u64Step base quantums.
is_reduce_only: boolIs the market in reduce-only mode.
Trait Implementations§
Source§impl Clone for PerpetualMarket
impl Clone for PerpetualMarket
Source§fn clone(&self) -> PerpetualMarket
fn clone(&self) -> PerpetualMarket
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PerpetualMarket
impl Debug for PerpetualMarket
Source§impl<'de> Deserialize<'de> for PerpetualMarket
impl<'de> Deserialize<'de> for PerpetualMarket
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>,
Auto Trait Implementations§
impl Freeze for PerpetualMarket
impl RefUnwindSafe for PerpetualMarket
impl Send for PerpetualMarket
impl Sync for PerpetualMarket
impl Unpin for PerpetualMarket
impl UnwindSafe for PerpetualMarket
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].