pub struct SyncConfig {
pub from: i32,
pub to: i32,
pub include_fundamentals: bool,
pub include_industry: bool,
pub include_snapshot_factors: bool,
pub skip_non_stocks: bool,
pub min_market_cap: f64,
pub rate_limit_per_min: u32,
pub max_retries: u32,
pub backoff_base: Duration,
pub mode: WriteMode,
}Expand description
Knobs for one [sync] run.
Fields§
§from: i32Inclusive date bounds, packed YYYYMMDD (as everywhere else in the engine).
to: i32§include_fundamentals: boolAlso fetch annual fundamentals → fundamentals/{SYM}.csv.gz.
include_industry: boolAlso fetch company sector → tracked/universe.csv.gz.
include_snapshot_factors: boolAlso compute the six snapshot-factor panels (piotroski_score,
altman_z, fcf_yield, pe_industry_pctile, analyst_upside_pct,
consensus_rating) → panels/{name}.csv.gz. Current-snapshot factors
for universe screening (see [super::snapshot]); pe_industry_pctile
ranks P/E within an industry cohort drawn from this run’s symbols.
skip_non_stocks: boolSkip ETFs / mutual & closed-end funds (default on) — keep only individual
stocks. Classified from the profile endpoint’s isEtf / isFund.
min_market_cap: f64Skip symbols whose company market cap is below this, in USD
(0.0 = off). Read from the profile endpoint’s marketCap. The CLI
accepts unit suffixes (1b, 500m) via [parse_market_cap].
rate_limit_per_min: u32Max requests per minute (0 = no throttle). FMP imposes a per-plan rate
limit; set this to your plan’s ceiling. Starter-class keys are commonly
~300/min — verify against your own plan.
max_retries: u32Retries per request on a retryable error before giving up on the symbol.
backoff_base: DurationBase backoff duration; the Nth retry waits base * 2^(N-1) — e.g. a
2-second base gives 2s, 4s, 8s, 16s. Duration::ZERO disables the sleep
(used by tests).
mode: WriteModeHow to treat an already-present tree.
Trait Implementations§
Source§impl Default for SyncConfig
impl Default for SyncConfig
Source§impl RetrySettings for SyncConfig
impl RetrySettings for SyncConfig
Source§fn rate_limit_per_min(&self) -> u32
fn rate_limit_per_min(&self) -> u32
0 = no throttle).Source§fn max_retries(&self) -> u32
fn max_retries(&self) -> u32
Source§fn backoff_base(&self) -> Duration
fn backoff_base(&self) -> Duration
base * 2^(N-1).Auto Trait Implementations§
impl Freeze for SyncConfig
impl RefUnwindSafe for SyncConfig
impl Send for SyncConfig
impl Sync for SyncConfig
impl Unpin for SyncConfig
impl UnsafeUnpin for SyncConfig
impl UnwindSafe for SyncConfig
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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