pub struct MarketDataEndpoints { /* private fields */ }Expand description
Endpoints for market data operations.
Implementations§
Source§impl MarketDataEndpoints
impl MarketDataEndpoints
Sourcepub fn new(
client: Client,
base_url: String,
auth_manager: Arc<AuthManager>,
) -> Self
pub fn new( client: Client, base_url: String, auth_manager: Arc<AuthManager>, ) -> Self
Create new market data endpoints.
Sourcepub async fn get_quote(&self, symbol: &str) -> WebullResult<Quote>
pub async fn get_quote(&self, symbol: &str) -> WebullResult<Quote>
Get a real-time quote for a symbol.
Sourcepub async fn get_quotes(&self, symbols: &[&str]) -> WebullResult<Vec<Quote>>
pub async fn get_quotes(&self, symbols: &[&str]) -> WebullResult<Vec<Quote>>
Get real-time quotes for multiple symbols.
Sourcepub async fn get_snapshot(
&self,
params: &SnapshotParams,
) -> WebullResult<Vec<Quote>>
pub async fn get_snapshot( &self, params: &SnapshotParams, ) -> WebullResult<Vec<Quote>>
Get snapshot data for symbols.
Sourcepub async fn get_stock_snapshot(&self, symbol: &str) -> WebullResult<Vec<Quote>>
pub async fn get_stock_snapshot(&self, symbol: &str) -> WebullResult<Vec<Quote>>
Helper method to get snapshot for a single stock symbol.
Sourcepub async fn get_stock_snapshots(
&self,
symbols: &[&str],
) -> WebullResult<Vec<Quote>>
pub async fn get_stock_snapshots( &self, symbols: &[&str], ) -> WebullResult<Vec<Quote>>
Helper method to get snapshot for multiple stock symbols.
Sourcepub async fn get_history_bar(
&self,
params: &BarQueryParams,
) -> WebullResult<Vec<Bar>>
pub async fn get_history_bar( &self, params: &BarQueryParams, ) -> WebullResult<Vec<Bar>>
Get historical bar data for a symbol.
Sourcepub async fn get_option_chain(
&self,
params: &OptionChainQueryParams,
) -> WebullResult<OptionChain>
pub async fn get_option_chain( &self, params: &OptionChainQueryParams, ) -> WebullResult<OptionChain>
Get option chain for a symbol.
Sourcepub async fn get_news(
&self,
params: &NewsQueryParams,
) -> WebullResult<Vec<NewsArticle>>
pub async fn get_news( &self, params: &NewsQueryParams, ) -> WebullResult<Vec<NewsArticle>>
Get market news.
Sourcepub async fn get_market_calendar(&self) -> WebullResult<Vec<String>>
pub async fn get_market_calendar(&self) -> WebullResult<Vec<String>>
Get market calendar.
Sourcepub async fn get_instrument(
&self,
params: &InstrumentParams,
) -> WebullResult<Vec<Instrument>>
pub async fn get_instrument( &self, params: &InstrumentParams, ) -> WebullResult<Vec<Instrument>>
Get instrument information.
Sourcepub async fn get_stock_instrument(
&self,
symbol: &str,
) -> WebullResult<Vec<Instrument>>
pub async fn get_stock_instrument( &self, symbol: &str, ) -> WebullResult<Vec<Instrument>>
Helper method to get instrument information for a single stock symbol.
Sourcepub async fn get_stock_instruments(
&self,
symbols: &[&str],
) -> WebullResult<Vec<Instrument>>
pub async fn get_stock_instruments( &self, symbols: &[&str], ) -> WebullResult<Vec<Instrument>>
Helper method to get instrument information for multiple stock symbols.
Sourcepub async fn get_eod_bar(
&self,
params: &EodBarsParams,
) -> WebullResult<Vec<Bar>>
pub async fn get_eod_bar( &self, params: &EodBarsParams, ) -> WebullResult<Vec<Bar>>
Get end-of-day bars for instruments. Only available for Webull JP.
Sourcepub async fn get_instrument_eod_bars(
&self,
instrument_id: &str,
count: u32,
) -> WebullResult<Vec<Bar>>
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.
Sourcepub async fn get_instrument_eod_bars_with_date(
&self,
instrument_id: &str,
date: &str,
count: u32,
) -> WebullResult<Vec<Bar>>
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.
Sourcepub async fn get_corp_action(
&self,
params: &CorpActionParams,
) -> WebullResult<Vec<Instrument>>
pub async fn get_corp_action( &self, params: &CorpActionParams, ) -> WebullResult<Vec<Instrument>>
Get corporate actions for instruments. Only available for Webull JP.
Sourcepub async fn get_stock_splits(
&self,
instrument_id: &str,
) -> WebullResult<Vec<Instrument>>
pub async fn get_stock_splits( &self, instrument_id: &str, ) -> WebullResult<Vec<Instrument>>
Helper method to get stock split corporate actions for an instrument.
Sourcepub async fn get_reverse_stock_splits(
&self,
instrument_id: &str,
) -> WebullResult<Vec<Instrument>>
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.
Sourcepub async fn get_all_corp_actions(
&self,
instrument_id: &str,
) -> WebullResult<Vec<Instrument>>
pub async fn get_all_corp_actions( &self, instrument_id: &str, ) -> WebullResult<Vec<Instrument>>
Helper method to get all corporate actions for an instrument.
Sourcepub async fn get_daily_bars(
&self,
symbol: &str,
count: Option<u32>,
) -> WebullResult<Vec<Bar>>
pub async fn get_daily_bars( &self, symbol: &str, count: Option<u32>, ) -> WebullResult<Vec<Bar>>
Helper method to get daily bars for a symbol.
Sourcepub async fn get_intraday_bars(
&self,
symbol: &str,
time_frame: TimeFrame,
count: Option<u32>,
) -> WebullResult<Vec<Bar>>
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.