pub struct Position {Show 26 fields
pub average_price: f64,
pub average_price_usd: Option<f64>,
pub delta: Option<f64>,
pub direction: Direction,
pub estimated_liquidation_price: Option<f64>,
pub floating_profit_loss: Option<f64>,
pub floating_profit_loss_usd: Option<f64>,
pub gamma: Option<f64>,
pub index_price: Option<f64>,
pub initial_margin: Option<f64>,
pub instrument_name: String,
pub interest_value: Option<f64>,
pub kind: Option<String>,
pub leverage: Option<i32>,
pub maintenance_margin: Option<f64>,
pub mark_price: Option<f64>,
pub open_orders_margin: Option<f64>,
pub realized_funding: Option<f64>,
pub realized_profit_loss: Option<f64>,
pub settlement_price: Option<f64>,
pub size: f64,
pub size_currency: Option<f64>,
pub theta: Option<f64>,
pub total_profit_loss: Option<f64>,
pub vega: Option<f64>,
pub unrealized_profit_loss: Option<f64>,
}Expand description
Position structure
Fields§
§average_price: f64Average price of the position
average_price_usd: Option<f64>Average price in USD
delta: Option<f64>Delta (price sensitivity) of the position
direction: DirectionDirection of the position (buy/sell)
estimated_liquidation_price: Option<f64>Estimated liquidation price
floating_profit_loss: Option<f64>Floating profit/loss
floating_profit_loss_usd: Option<f64>Floating profit/loss in USD
gamma: Option<f64>Gamma (delta sensitivity) of the position
index_price: Option<f64>Current index price
initial_margin: Option<f64>Initial margin requirement
instrument_name: StringName of the instrument
interest_value: Option<f64>Interest value
kind: Option<String>Instrument kind (future, option, etc.)
leverage: Option<i32>Leverage used for the position
maintenance_margin: Option<f64>Maintenance margin requirement
mark_price: Option<f64>Current mark price
open_orders_margin: Option<f64>Margin used by open orders
realized_funding: Option<f64>Realized funding payments
realized_profit_loss: Option<f64>Realized profit/loss
settlement_price: Option<f64>Settlement price
size: f64Position size
size_currency: Option<f64>Position size in currency units
theta: Option<f64>Theta (time decay) of the position
total_profit_loss: Option<f64>Total profit/loss
vega: Option<f64>Vega (volatility sensitivity) of the position
unrealized_profit_loss: Option<f64>Unrealized profit/loss
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Position
impl<'de> Deserialize<'de> for Position
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
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
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