pub struct SignalContext(/* private fields */);Expand description
Signal context — strategy signals and the catalyst facts behind them.
Implementations§
Source§impl SignalContext
impl SignalContext
Sourcepub fn new(config: Arc<Config>) -> Self
pub fn new(config: Arc<Config>) -> Self
Create a SignalContext
Sourcepub fn log_subscriber(&self) -> Arc<dyn Subscriber + Send + Sync>
pub fn log_subscriber(&self) -> Arc<dyn Subscriber + Send + Sync>
Returns the log subscriber
Sourcepub async fn signals(&self, opts: SignalsOptions) -> Result<SignalsResponse>
pub async fn signals(&self, opts: SignalsOptions) -> Result<SignalsResponse>
Query signals, filtered by symbol, strategy, catalyst and time range.
Path: GET /v1/signals
Sourcepub async fn signal(&self, signal_id: impl Into<String>) -> Result<Signal>
pub async fn signal(&self, signal_id: impl Into<String>) -> Result<Signal>
Get one signal by ID, including the full analysis in
Signal::json_data.
Path: GET /v1/signals/{signal_id}
Sourcepub async fn security_facts(
&self,
opts: SecurityFactsOptions,
) -> Result<Vec<SecurityFact>>
pub async fn security_facts( &self, opts: SecurityFactsOptions, ) -> Result<Vec<SecurityFact>>
List the fact (catalyst) events for one security — anomaly detections, factor readings, data sources and natural-language summaries.
Facts are what strategies react to: a signal names the fact that
triggered it in Signal::key_fact_id.
Path: GET /v1/facts/security_facts
Trait Implementations§
Source§impl Clone for SignalContext
impl Clone for SignalContext
Source§fn clone(&self) -> SignalContext
fn clone(&self) -> SignalContext
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for SignalContext
impl !UnwindSafe for SignalContext
impl Freeze for SignalContext
impl Send for SignalContext
impl Sync for SignalContext
impl Unpin for SignalContext
impl UnsafeUnpin for SignalContext
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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