pub struct ScreenerContext(/* private fields */);Expand description
Screener context — stock screener strategies, search, and indicators.
Implementations§
Source§impl ScreenerContext
impl ScreenerContext
Sourcepub fn new(config: Arc<Config>) -> Self
pub fn new(config: Arc<Config>) -> Self
Create a ScreenerContext
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 screener_recommend_strategies(
&self,
market: impl Into<String>,
) -> Result<ScreenerRecommendStrategiesResponse>
pub async fn screener_recommend_strategies( &self, market: impl Into<String>, ) -> Result<ScreenerRecommendStrategiesResponse>
Get preset built-in screener strategies.
Path: GET /v1/quote/ai/screener/strategies/recommend
Sourcepub async fn screener_user_strategies(
&self,
market: impl Into<String>,
) -> Result<ScreenerUserStrategiesResponse>
pub async fn screener_user_strategies( &self, market: impl Into<String>, ) -> Result<ScreenerUserStrategiesResponse>
Get the current user’s saved screener strategies.
Path: GET /v1/quote/ai/screener/strategies/mine
Sourcepub async fn screener_strategy(
&self,
id: i64,
) -> Result<ScreenerStrategyResponse>
pub async fn screener_strategy( &self, id: i64, ) -> Result<ScreenerStrategyResponse>
Get detail for one screener strategy by ID.
Path: GET /v1/quote/ai/screener/strategy/{id}
The filter_ prefix is stripped from every filters[].key before
returning so callers see clean keys like pettm instead of
filter_pettm.
Sourcepub async fn screener_search(
&self,
market: impl Into<String>,
strategy_id: Option<i64>,
conditions: Vec<ScreenerCondition>,
show: Vec<String>,
page: u32,
size: u32,
) -> Result<ScreenerSearchResponse>
pub async fn screener_search( &self, market: impl Into<String>, strategy_id: Option<i64>, conditions: Vec<ScreenerCondition>, show: Vec<String>, page: u32, size: u32, ) -> Result<ScreenerSearchResponse>
Search / screen securities using a strategy or custom conditions.
Path: POST /v1/quote/ai/screener/search
§Mode A — strategy ID given
When strategy_id is Some, the strategy is fetched from
GET /v1/quote/ai/screener/strategy/{id} and its filter.filters[]
are forwarded to the search endpoint together with
[DEFAULT_RETURNS]. The market is taken from the strategy
response (falls back to "US" if absent or "-").
§Mode B — custom conditions
When strategy_id is None and conditions is non-empty each
element is either a "KEY:MIN:MAX" string or a JSON object with
key, min, max, and optional tech_values fields. The
supplied market is used directly. DEFAULT_RETURNS plus every
condition key are added to the returns list.
The filter_ prefix is stripped from every items[].indicators[].key
in the response before it is returned to the caller.
page is 0-indexed.
Sourcepub async fn screener_indicators(&self) -> Result<ScreenerIndicatorsResponse>
pub async fn screener_indicators(&self) -> Result<ScreenerIndicatorsResponse>
Get all available screener indicator definitions.
Path: GET /v1/quote/ai/screener/indicators
Post-processing applied before returning:
filter_prefix is stripped from everygroups[].indicators[].keytech_valuesis built fromtech_indicators:{tech_key: [{value, label}]}
Trait Implementations§
Source§impl Clone for ScreenerContext
impl Clone for ScreenerContext
Source§fn clone(&self) -> ScreenerContext
fn clone(&self) -> ScreenerContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ScreenerContext
impl !RefUnwindSafe for ScreenerContext
impl Send for ScreenerContext
impl Sync for ScreenerContext
impl Unpin for ScreenerContext
impl UnsafeUnpin for ScreenerContext
impl !UnwindSafe for ScreenerContext
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
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>
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>
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