Skip to main content

PortfolioState

Struct PortfolioState 

pub struct PortfolioState {
Show 31 fields pub positions: BTreeMap<PositionKey, Position>, pub open_orders: BTreeMap<OrderId, Order>, pub balances: BTreeMap<BalanceKey, Decimal>, pub risk_state: RiskStopState, pub risk_state_trigger: Option<String>, pub daily_pnl: Decimal, pub monthly_pnl: Decimal, pub total_pnl: Decimal, pub hwm: Decimal, pub seen_fill_ids: BTreeSet<(OrderId, String)>, pub pending_intents: BTreeMap<ClientIntentId, PendingIntent>, pub command_to_intent: BTreeMap<CommandId, ClientIntentId>, pub command_seqs: BTreeMap<CommandId, u64>, pub retiring_order_targets_by_command: BTreeMap<CommandId, BTreeSet<OrderId>>, pub direct_retiring_order_ids: BTreeSet<OrderId>, pub terminal_order_attribution: BTreeMap<OrderId, TerminalOrderAttribution>, pub seen_intent_ids: BTreeSet<ClientIntentId>, pub seen_command_ids: BTreeSet<CommandId>, pub seen_ack_command_ids: BTreeSet<CommandId>, pub last_prices: BTreeMap<PositionKey, Decimal>, pub pre_ack_fills: BTreeMap<OrderId, Decimal>, pub tombstoned_orders: BTreeSet<OrderId>, pub tombstoned_order_seqs: BTreeMap<OrderId, u64>, pub closed_order_ids: BTreeSet<OrderId>, pub reconcile: ReconcileTracking, pub strategy_pnl: BTreeMap<String, StrategyPnl>, pub pair_daily_pnl: BTreeMap<PositionKey, Decimal>, pub velocity_pnl_window: Vec<PnlSnapshot>, pub velocity_gate: VelocityGateLevel, pub last_pnl_reset_date: Option<(i32, u32)>, pub last_pnl_reset_month: Option<(i32, u32)>,
}

Fields§

§positions: BTreeMap<PositionKey, Position>§open_orders: BTreeMap<OrderId, Order>§balances: BTreeMap<BalanceKey, Decimal>§risk_state: RiskStopState§risk_state_trigger: Option<String>§daily_pnl: Decimal§monthly_pnl: Decimal§total_pnl: Decimal§hwm: Decimal§seen_fill_ids: BTreeSet<(OrderId, String)>§pending_intents: BTreeMap<ClientIntentId, PendingIntent>§command_to_intent: BTreeMap<CommandId, ClientIntentId>§command_seqs: BTreeMap<CommandId, u64>§retiring_order_targets_by_command: BTreeMap<CommandId, BTreeSet<OrderId>>§direct_retiring_order_ids: BTreeSet<OrderId>§terminal_order_attribution: BTreeMap<OrderId, TerminalOrderAttribution>§seen_intent_ids: BTreeSet<ClientIntentId>§seen_command_ids: BTreeSet<CommandId>§seen_ack_command_ids: BTreeSet<CommandId>§last_prices: BTreeMap<PositionKey, Decimal>§pre_ack_fills: BTreeMap<OrderId, Decimal>§tombstoned_orders: BTreeSet<OrderId>§tombstoned_order_seqs: BTreeMap<OrderId, u64>§closed_order_ids: BTreeSet<OrderId>§reconcile: ReconcileTracking§strategy_pnl: BTreeMap<String, StrategyPnl>§pair_daily_pnl: BTreeMap<PositionKey, Decimal>§velocity_pnl_window: Vec<PnlSnapshot>§velocity_gate: VelocityGateLevel§last_pnl_reset_date: Option<(i32, u32)>§last_pnl_reset_month: Option<(i32, u32)>

Trait Implementations§

§

impl Clone for PortfolioState

§

fn clone(&self) -> PortfolioState

1.0.0 (const: )§

fn clone_from(&mut self, source: &Self)

§

impl Debug for PortfolioState

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

§

impl Default for PortfolioState

§

impl<'de> Deserialize<'de> for PortfolioState

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<PortfolioState, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

§

impl PartialEq for PortfolioState

§

fn eq(&self, other: &PortfolioState) -> bool

1.0.0 (const: )§

fn ne(&self, other: &Rhs) -> bool

§

impl Serialize for PortfolioState

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

§

impl Eq for PortfolioState

§

impl StructuralPartialEq for PortfolioState

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
§

impl<T> From<T> for T

§

fn from(t: T) -> T

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

§

fn in_current_span(self) -> Instrumented<Self>

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

§

fn to_owned(&self) -> T

§

fn clone_into(&self, target: &mut T)

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

§

fn with_current_subscriber(self) -> WithDispatch<Self>

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,