pub struct AgentState {Show 15 fields
pub agent_id: String,
pub last_tick: Option<DateTime<Utc>>,
pub trades_today: u32,
pub trades_day: Option<NaiveDate>,
pub open_positions: HashMap<String, TrackedPosition>,
pub last_actions: Vec<AgentAction>,
pub pending_order_ids: Vec<String>,
pub tick_count: u64,
pub last_llm_review_tick: Option<u64>,
pub llm_review_count: u64,
pub last_llm_summary: Option<Value>,
pub last_session: Option<String>,
pub regular_tick_count: u64,
pub last_overnight_digest_at: Option<DateTime<Utc>>,
pub open_playbook: Option<Value>,
}Fields§
§agent_id: String§last_tick: Option<DateTime<Utc>>§trades_today: u32§trades_day: Option<NaiveDate>§open_positions: HashMap<String, TrackedPosition>§last_actions: Vec<AgentAction>§pending_order_ids: Vec<String>§tick_count: u64§last_llm_review_tick: Option<u64>§llm_review_count: u64§last_llm_summary: Option<Value>§last_session: Option<String>§regular_tick_count: u64§last_overnight_digest_at: Option<DateTime<Utc>>§open_playbook: Option<Value>Implementations§
Source§impl AgentState
impl AgentState
pub fn reset_daily_if_needed(&mut self, today: NaiveDate)
pub fn record_action(&mut self, action: &str, detail: Value)
pub fn count_open_for_strategy( &self, account_hash: &str, strategy: StrategyKind, ) -> u32
Trait Implementations§
Source§impl Clone for AgentState
impl Clone for AgentState
Source§fn clone(&self) -> AgentState
fn clone(&self) -> AgentState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentState
impl Debug for AgentState
Source§impl Default for AgentState
impl Default for AgentState
Source§fn default() -> AgentState
fn default() -> AgentState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AgentState
impl<'de> Deserialize<'de> for AgentState
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 AgentState
impl RefUnwindSafe for AgentState
impl Send for AgentState
impl Sync for AgentState
impl Unpin for AgentState
impl UnsafeUnpin for AgentState
impl UnwindSafe for AgentState
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