pub struct Position {
pub symbol: String,
pub side: String,
pub size: f64,
pub entry: f64,
pub mark: Option<f64>,
pub unrealized_pnl: Option<f64>,
pub unrealized_r: Option<f64>,
pub stop: Option<f64>,
pub target: Option<f64>,
pub lens_id: Option<String>,
pub age_s: Option<f64>,
pub extra: BTreeMap<String, Value>,
}Expand description
A single open position.
Fields§
§symbol: StringEngine emits coin (TRX, BTC, …); the spec + REST
variants call this symbol. Alias covers the WS shape
and the raw positions.json bus file.
side: String"long" | "short". Engine _bus_poller emits
direction: "LONG" | "SHORT"; alias covers it.
size: f64Engine’s raw positions.json uses size_coins for the
coin-quantity field; REST surfaces size directly.
entry: f64§mark: Option<f64>§unrealized_pnl: Option<f64>§unrealized_r: Option<f64>§stop: Option<f64>§target: Option<f64>§lens_id: Option<String>§age_s: Option<f64>§extra: BTreeMap<String, Value>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 UnsafeUnpin 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