PerpetualMarket

Struct PerpetualMarket 

Source
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: u32

Unique identifier for the CLOB pair.

§ticker: String

Market ticker (e.g., “BTC-USD”).

§status: DydxMarketStatus

Market 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: Decimal

Step size for order quantities (minimum increment).

§tick_size: Decimal

Tick size for order prices (minimum increment).

§index_price: Option<Decimal>

Index price for the market (optional, not always returned by API).

§oracle_price: Decimal

Oracle price for the market.

§price_change_24h: Decimal

Price change over 24 hours.

§next_funding_rate: Decimal

Next 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: Decimal

Initial margin fraction.

§maintenance_margin_fraction: Decimal

Maintenance 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: Decimal

Open interest in base currency.

§atomic_resolution: i32

Atomic resolution (power of 10 for quantum conversion).

§quantum_conversion_exponent: i32

Quantum conversion exponent (deprecated, use atomic_resolution).

§subticks_per_tick: u32

Subticks per tick.

§step_base_quantums: u64

Step base quantums.

§is_reduce_only: bool

Is the market in reduce-only mode.

Trait Implementations§

Source§

impl Clone for PerpetualMarket

Source§

fn clone(&self) -> PerpetualMarket

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PerpetualMarket

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PerpetualMarket

Source§

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 Serialize for PerpetualMarket

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for T
where T: Send,