pub struct Position<'a> {Show 27 fields
pub category: Option<&'a str>,
pub symbol: &'a str,
pub side: &'a str,
pub size: &'a str,
pub position_idx: u8,
pub trade_mode: u8,
pub position_value: &'a str,
pub risk_id: u16,
pub risk_limit_value: &'a str,
pub entry_price: &'a str,
pub mark_price: &'a str,
pub leverage: &'a str,
pub position_balance: Option<&'a str>,
pub auto_add_margin: Option<u8>,
pub position_mm: &'a str,
pub position_im: &'a str,
pub liq_price: &'a str,
pub bust_price: &'a str,
pub tpsl_mode: &'a str,
pub take_profit: &'a str,
pub stop_loss: &'a str,
pub trailing_stop: &'a str,
pub unrealised_pnl: &'a str,
pub cum_realised_pnl: &'a str,
pub position_status: &'a str,
pub created_time: &'a str,
pub updated_time: &'a str,
}Expand description
The position data.
Fields§
§category: Option<&'a str>Product type.
- Unified account: does not have this field.
- Normal account:
linear,inverse.
symbol: &'a strSymbol name.
side: &'a strPosition side: Buy, Sell.
size: &'a strPosition size.
position_idx: u8Used to identify positions in different position modes.
- 0 one-way mode position.
- 1 Buy side of hedge-mode position.
- 2 Sell side of hedge-mode position.
trade_mode: u8Trade mode. 0: cross margin, 1: isolated margin. Always 0 under unified margin account.
position_value: &'a strPosition value.
risk_id: u16Risk limit ID. Note: for portfolio margin mode, it returns 0, which the risk limit value is invalid.
risk_limit_value: &'a strRisk limit value corresponding to riskId. Note: for portfolio margin mode, it returns “”, which the risk limit value is invalid.
entry_price: &'a strEntry price.
mark_price: &'a strMark price
leverage: &'a strLeverage. Note: for portfolio margin mode, it returns “”, which the leverage value is invalid.
position_balance: Option<&'a str>Position margin. Unified account does not have this field.
auto_add_margin: Option<u8>Whether to add margin automatically. 0: false, 1: true. Unified account does not have this field.
position_mm: &'a strPosition maintenance margin. Note: for portfolio margin mode, it returns “”.
position_im: &'a strPosition initial margin. Note: for portfolio margin mode, it returns “”.
liq_price: &'a strEst.liquidation price. “” for Unified trade(spot/linear/options).
bust_price: &'a strEst.bankruptcy price. “” for Unified trade(spot/linear/options).
tpsl_mode: &'a strTp/Sl mode: Full, Partial.
take_profit: &'a strTake profit price.
stop_loss: &'a strStop loss price.
trailing_stop: &'a strTrailing stop.
unrealised_pnl: &'a strUnrealised profit and loss.
cum_realised_pnl: &'a strCumulative realised PnL.
position_status: &'a strPosition status.
-Normal.
Liq: in the liquidation progress.Adl: in the auto-deleverage progress.
created_time: &'a strPosition created timestamp (ms).
updated_time: &'a strPosition data updated timestamp (ms).