Skip to main content

Operation

Enum Operation 

Source
#[non_exhaustive]
pub enum Operation {
Show 72 variants Quote, Chart, ChartRange, Financials, News, Recommendations, Options, Events, QuotesBatch, Spark, CryptoQuote, CryptoNews, EconomicSeries, ForexQuote, ForexNews, IndicesQuote, FuturesQuote, CommoditiesQuote, Filings, SymbolSearch, SymbolDetails, Exchanges, Screener, EarningsCalendar, IpoCalendar, DividendCalendar, SplitCalendar, EconomicCalendar, SectorPerformance, MarketMovers, SectorPerformanceHistory, HolidayCalendar, MarketStatus, IndexConstituents, IndexConstituentChanges, ShortInterest, ShortVolume, ShareFloat, FilingSections, RiskFactors, PressReleases, EarningsTranscript, ProtocolTvl, ProtocolTvlHistory, CommitmentsOfTraders, PriceTargetConsensus, PriceTargetSummary, RatingConsensus, KeyMetricsTtm, RatiosTtm, ExecutiveCompensation, EmployeeCount, CompanyProfile, UnifiedSnapshot, FilingSearch, InsiderTrades, InstitutionalHoldings, CongressionalTrades, FailsToDeliver, EconomicSeriesAsOf, EconomicSearch, EconomicCategories, EconomicReleases, EtfProfile, EarningsSurprises, GradingHistory, ListingStatus, GroupedDaily, CryptoGroupedDaily, ForexGroupedDaily, CryptoTrending, CryptoGlobal,
}
Expand description

A single provider-adapter operation — finer-grained than Capability (e.g. Chart, ChartRange, and Spark all fall under Capability::CHART).

Used in crate::FinanceError::NotSupported to say exactly which method a provider doesn’t implement; Operation::capability recovers the coarser bit for computing which other providers could satisfy it.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Quote

Single-symbol quote.

§

Chart

Historical OHLCV chart over an interval/range.

§

ChartRange

Historical OHLCV chart over a custom timestamp range.

§

Financials

Financial statements (income/balance/cash flow).

§

News

Symbol news.

§

Recommendations

Similar-symbol recommendations.

§

Options

Options chain.

§

Events

Corporate calendar events (earnings, dividends, splits).

§

QuotesBatch

Batch quotes for multiple symbols in one request.

§

Spark

Lightweight sparkline data for multiple symbols in one request.

§

CryptoQuote

Cryptocurrency quote.

§

CryptoNews

Market-wide crypto news.

§

EconomicSeries

Macro-economic data series.

§

ForexQuote

Foreign exchange currency pair quote.

§

ForexNews

Market-wide forex news.

§

IndicesQuote

Stock market index quote.

§

FuturesQuote

Futures contract quote.

§

CommoditiesQuote

Commodity price quote.

§

Filings

SEC EDGAR filing data.

§

SymbolSearch

Symbol search by free-text query.

§

SymbolDetails

Detailed reference data for one symbol.

§

Exchanges

Tradable exchange listing.

§

Screener

Screener query over the provider’s universe.

§

EarningsCalendar

Market-wide earnings calendar.

§

IpoCalendar

Market-wide IPO calendar.

§

DividendCalendar

Market-wide dividend calendar.

§

SplitCalendar

Market-wide stock split calendar.

§

EconomicCalendar

Market-wide economic event calendar.

§

SectorPerformance

Sector and industry performance statistics.

§

MarketMovers

Market movers — gainers, losers, most active.

§

SectorPerformanceHistory

Historical sector performance.

§

HolidayCalendar

Market-wide holiday calendar.

§

MarketStatus

Live exchange open/closed status.

§

IndexConstituents

Current constituents of a major index.

§

IndexConstituentChanges

Historical constituent changes of a major index.

§

ShortInterest

Short interest (settlement-date positions).

§

ShortVolume

Daily short volume.

§

ShareFloat

Share float and shares outstanding.

§

FilingSections

Sectioned text of an SEC filing.

§

RiskFactors

Risk factors extracted from SEC filings.

§

PressReleases

Company press releases.

§

EarningsTranscript

Earnings call transcript, provider-neutral shape.

§

ProtocolTvl

Total value locked in a DeFi protocol.

§

ProtocolTvlHistory

Historical total value locked in a DeFi protocol.

§

CommitmentsOfTraders

Weekly CFTC Commitments of Traders futures positioning.

§

PriceTargetConsensus

Aggregated analyst price-target consensus.

§

PriceTargetSummary

Price-target publication activity over trailing windows.

§

RatingConsensus

Aggregated analyst rating consensus.

§

KeyMetricsTtm

Trailing-twelve-month key-metrics snapshot.

§

RatiosTtm

Trailing-twelve-month ratios snapshot.

§

ExecutiveCompensation

Reported executive compensation.

§

EmployeeCount

Reported employee headcount.

§

CompanyProfile

Company identity/classification profile.

§

UnifiedSnapshot

Cross-market snapshot for symbols spanning several asset classes.

§

FilingSearch

Full-text search over filing content.

§

InsiderTrades

Insider transactions reported on Forms 3/4/5.

§

InstitutionalHoldings

Institutional holdings reported on Form 13F-HR.

§

CongressionalTrades

Congressional (senate) stock-trade disclosures.

§

FailsToDeliver

SEC fails-to-deliver data.

§

EconomicSeriesAsOf

A macro series as it stood on a past date (vintage/ALFRED view).

§

EconomicSearch

Free-text search over the macro series catalog.

§

EconomicCategories

Macro series category browsing.

§

EconomicReleases

Scheduled macro data releases.

§

EtfProfile

ETF profile and portfolio holdings.

§

EarningsSurprises

Earnings-surprise history.

§

GradingHistory

Raw per-analyst grade-action history.

§

ListingStatus

The provider’s whole listed-security universe.

§

GroupedDaily

Grouped daily OHLCV bars for every stock ticker on one date.

§

CryptoGroupedDaily

Grouped daily OHLCV bars for every crypto ticker on one date.

§

ForexGroupedDaily

Grouped daily OHLCV bars for every forex ticker on one date.

§

CryptoTrending

Coins/nfts/categories trending in the last 24h.

§

CryptoGlobal

Aggregate global cryptocurrency market statistics.

Implementations§

Source§

impl Operation

Source

pub fn as_str(self) -> &'static str

Short lowercase identifier (e.g. "chart_range", "crypto_quote").

Source

pub fn capability(self) -> Capability

The coarser Capability bit this operation falls under.

Trait Implementations§

Source§

impl Clone for Operation

Source§

fn clone(&self) -> Operation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Operation

Source§

impl Debug for Operation

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for Operation

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for Operation

Source§

impl Hash for Operation

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Operation

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Operation

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

Source§

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

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

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

Source§

fn align() -> usize

The alignment necessary for the key. Must return a power of two.
Source§

fn size(&self) -> usize

The size of the key in bytes.
Source§

unsafe fn init(&self, ptr: *mut u8)

Initialize the key in the given memory location. Read more
Source§

unsafe fn get<'a>(ptr: *const u8) -> &'a T

Get a reference to the key from the given memory location. Read more
Source§

unsafe fn drop_in_place(ptr: *mut u8)

Drop the key in place. Read more
Source§

impl<T> PlanCallbackArgs for T

Source§

impl<T> PlanCallbackOut for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

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

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more