pub struct DeribitPosition {Show 24 fields
pub instrument_name: Ustr,
pub direction: String,
pub size: Decimal,
pub average_price: Decimal,
pub mark_price: Decimal,
pub index_price: Option<Decimal>,
pub maintenance_margin: Decimal,
pub initial_margin: Decimal,
pub leverage: Option<i64>,
pub floating_profit_loss: Decimal,
pub realized_profit_loss: Decimal,
pub total_profit_loss: Decimal,
pub kind: DeribitProductType,
pub size_currency: Option<Decimal>,
pub estimated_liquidation_price: Option<Decimal>,
pub delta: Option<Decimal>,
pub gamma: Option<Decimal>,
pub vega: Option<Decimal>,
pub theta: Option<Decimal>,
pub settlement_price: Option<Decimal>,
pub open_orders_margin: Option<Decimal>,
pub average_price_usd: Option<Decimal>,
pub realized_profit_loss_session: Option<Decimal>,
pub floating_profit_loss_usd: Option<Decimal>,
}Expand description
Position data from /private/get_positions endpoint.
Contains information about a single position in a specific instrument.
Fields§
§instrument_name: UstrUnique instrument identifier
direction: StringPosition direction: “buy” (long), “sell” (short), or “zero” (flat)
size: DecimalPosition size in contracts (positive = long, negative = short)
average_price: DecimalAverage entry price
mark_price: DecimalCurrent mark price
index_price: Option<Decimal>Current index price
maintenance_margin: DecimalMaintenance margin
initial_margin: DecimalInitial margin
leverage: Option<i64>Leverage used for the position
floating_profit_loss: DecimalCurrent unrealized profit/loss
realized_profit_loss: DecimalRealized profit/loss for this position
total_profit_loss: DecimalTotal profit/loss (floating + realized)
kind: DeribitProductTypeProduct type: future, option, spot, etc.
size_currency: Option<Decimal>Position size in currency units (for currency-quoted positions)
estimated_liquidation_price: Option<Decimal>Estimated liquidation price
delta: Option<Decimal>Position delta (for options)
gamma: Option<Decimal>Position gamma (for options)
vega: Option<Decimal>Position vega (for options)
theta: Option<Decimal>Position theta (for options)
settlement_price: Option<Decimal>Settlement price (if settled)
open_orders_margin: Option<Decimal>Open orders margin for this position
average_price_usd: Option<Decimal>Average price in USD (for currency-margined contracts)
realized_profit_loss_session: Option<Decimal>Realized profit loss (session)
floating_profit_loss_usd: Option<Decimal>Floating profit loss in USD
Trait Implementations§
Source§impl Clone for DeribitPosition
impl Clone for DeribitPosition
Source§fn clone(&self) -> DeribitPosition
fn clone(&self) -> DeribitPosition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeribitPosition
impl Debug for DeribitPosition
Source§impl<'de> Deserialize<'de> for DeribitPosition
impl<'de> Deserialize<'de> for DeribitPosition
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 DeribitPosition
impl RefUnwindSafe for DeribitPosition
impl Send for DeribitPosition
impl Sync for DeribitPosition
impl Unpin for DeribitPosition
impl UnsafeUnpin for DeribitPosition
impl UnwindSafe for DeribitPosition
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