struct PositionOut {Show 16 fields
position_id: u64,
code: String,
name: String,
qty: f64,
can_sell_qty: f64,
price: f64,
cost_price: f64,
val: f64,
pl_val: f64,
pl_ratio: f64,
diluted_cost_price: Option<f64>,
average_cost_price: Option<f64>,
average_pl_ratio: Option<f64>,
currency: Option<i32>,
trd_market: Option<i32>,
cost_basis_method_hint: &'static str,
}Fields§
§position_id: u64§code: String§name: String§qty: f64§can_sell_qty: f64§price: f64§cost_price: f64deprecated — use diluted_cost_price / average_cost_price (v1.4.94 Tier M2)
val: f64§pl_val: f64§pl_ratio: f64§diluted_cost_price: Option<f64>§average_cost_price: Option<f64>§average_pl_ratio: Option<f64>§currency: Option<i32>§trd_market: Option<i32>§cost_basis_method_hint: &'static strv1.4.94 Tier M2: 推荐使用的成本价口径 (mobile NN aas_cmn.proto
CostProfitCalcMethod 派生). 客户端可用 hint 决定显示哪个 cost field.
- “diluted”: 推荐 dilute_cost_price (HK / US / CN 默认)
- “average”: 推荐 average_cost_price (JP 信用 / 加权平均场景)
- “open_price”: 推荐 cost_price (旧字段, 部分 US 市场显示开仓价)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PositionOut
impl RefUnwindSafe for PositionOut
impl Send for PositionOut
impl Sync for PositionOut
impl Unpin for PositionOut
impl UnsafeUnpin for PositionOut
impl UnwindSafe for PositionOut
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
§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>
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 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>
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