pub struct FuturesPosition {Show 15 fields
pub symbol: String,
pub side: BuySell,
pub size: Decimal,
pub entry_price: Decimal,
pub mark_price: Option<Decimal>,
pub liquidation_threshold: Option<Decimal>,
pub unrealized_pnl: Option<Decimal>,
pub unrealized_funding: Option<Decimal>,
pub initial_margin: Option<Decimal>,
pub maintenance_margin: Option<Decimal>,
pub effective_leverage: Option<Decimal>,
pub return_on_equity: Option<Decimal>,
pub pnl_currency: Option<String>,
pub max_fixed_leverage: Option<Decimal>,
pub fill_time: Option<String>,
}Expand description
A futures position.
Fields§
§symbol: StringThe futures symbol (e.g., “PI_XBTUSD”)
side: BuySellPosition side
size: DecimalPosition size (positive)
entry_price: DecimalAverage entry price
mark_price: Option<Decimal>Current mark price
liquidation_threshold: Option<Decimal>Liquidation price (None for cash accounts)
unrealized_pnl: Option<Decimal>Unrealized PnL
unrealized_funding: Option<Decimal>Unrealized funding (perpetuals only)
initial_margin: Option<Decimal>Initial margin requirement
maintenance_margin: Option<Decimal>Maintenance margin requirement
effective_leverage: Option<Decimal>Effective leverage
return_on_equity: Option<Decimal>Return on equity percentage
pnl_currency: Option<String>PnL currency for multi-collateral
max_fixed_leverage: Option<Decimal>Maximum fixed leverage for isolated positions
fill_time: Option<String>Fill time (deprecated but still returned)
Trait Implementations§
Source§impl Clone for FuturesPosition
impl Clone for FuturesPosition
Source§fn clone(&self) -> FuturesPosition
fn clone(&self) -> FuturesPosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FuturesPosition
impl Debug for FuturesPosition
Source§impl<'de> Deserialize<'de> for FuturesPosition
impl<'de> Deserialize<'de> for FuturesPosition
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 FuturesPosition
impl RefUnwindSafe for FuturesPosition
impl Send for FuturesPosition
impl Sync for FuturesPosition
impl Unpin for FuturesPosition
impl UnwindSafe for FuturesPosition
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