MarketDataEndpoints

Struct MarketDataEndpoints 

Source
pub struct MarketDataEndpoints { /* private fields */ }
Expand description

Endpoints for market data operations.

Implementations§

Source§

impl MarketDataEndpoints

Source

pub fn new( client: Client, base_url: String, auth_manager: Arc<AuthManager>, ) -> Self

Create new market data endpoints.

Source

pub async fn get_quote(&self, symbol: &str) -> WebullResult<Quote>

Get a real-time quote for a symbol.

Source

pub async fn get_quotes(&self, symbols: &[&str]) -> WebullResult<Vec<Quote>>

Get real-time quotes for multiple symbols.

Source

pub async fn get_snapshot( &self, params: &SnapshotParams, ) -> WebullResult<Vec<Quote>>

Get snapshot data for symbols.

Source

pub async fn get_stock_snapshot(&self, symbol: &str) -> WebullResult<Vec<Quote>>

Helper method to get snapshot for a single stock symbol.

Source

pub async fn get_stock_snapshots( &self, symbols: &[&str], ) -> WebullResult<Vec<Quote>>

Helper method to get snapshot for multiple stock symbols.

Source

pub async fn get_history_bar( &self, params: &BarQueryParams, ) -> WebullResult<Vec<Bar>>

Get historical bar data for a symbol.

Source

pub async fn get_option_chain( &self, params: &OptionChainQueryParams, ) -> WebullResult<OptionChain>

Get option chain for a symbol.

Source

pub async fn get_news( &self, params: &NewsQueryParams, ) -> WebullResult<Vec<NewsArticle>>

Get market news.

Source

pub async fn get_market_calendar(&self) -> WebullResult<Vec<String>>

Get market calendar.

Source

pub async fn get_instrument( &self, params: &InstrumentParams, ) -> WebullResult<Vec<Instrument>>

Get instrument information.

Source

pub async fn get_stock_instrument( &self, symbol: &str, ) -> WebullResult<Vec<Instrument>>

Helper method to get instrument information for a single stock symbol.

Source

pub async fn get_stock_instruments( &self, symbols: &[&str], ) -> WebullResult<Vec<Instrument>>

Helper method to get instrument information for multiple stock symbols.

Source

pub async fn get_eod_bar( &self, params: &EodBarsParams, ) -> WebullResult<Vec<Bar>>

Get end-of-day bars for instruments. Only available for Webull JP.

Source

pub async fn get_instrument_eod_bars( &self, instrument_id: &str, count: u32, ) -> WebullResult<Vec<Bar>>

Helper method to get end-of-day bars for an instrument.

Source

pub async fn get_instrument_eod_bars_with_date( &self, instrument_id: &str, date: &str, count: u32, ) -> WebullResult<Vec<Bar>>

Helper method to get end-of-day bars for an instrument with a specific date.

Source

pub async fn get_corp_action( &self, params: &CorpActionParams, ) -> WebullResult<Vec<Instrument>>

Get corporate actions for instruments. Only available for Webull JP.

Source

pub async fn get_stock_splits( &self, instrument_id: &str, ) -> WebullResult<Vec<Instrument>>

Helper method to get stock split corporate actions for an instrument.

Source

pub async fn get_reverse_stock_splits( &self, instrument_id: &str, ) -> WebullResult<Vec<Instrument>>

Helper method to get reverse stock split corporate actions for an instrument.

Source

pub async fn get_all_corp_actions( &self, instrument_id: &str, ) -> WebullResult<Vec<Instrument>>

Helper method to get all corporate actions for an instrument.

Source

pub async fn get_daily_bars( &self, symbol: &str, count: Option<u32>, ) -> WebullResult<Vec<Bar>>

Helper method to get daily bars for a symbol.

Source

pub async fn get_intraday_bars( &self, symbol: &str, time_frame: TimeFrame, count: Option<u32>, ) -> WebullResult<Vec<Bar>>

Helper method to get intraday bars for a symbol.

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<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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T