pub struct PolygonClient { /* private fields */ }Expand description
Polygon REST API client (for historical data)
Implementations§
Source§impl PolygonClient
impl PolygonClient
Trait Implementations§
Source§impl MarketDataProvider for PolygonClient
impl MarketDataProvider for PolygonClient
Source§fn get_quote<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Quote>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_quote<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Quote>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get current quote for symbol
Source§fn get_bars<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
start: DateTime<Utc>,
end: DateTime<Utc>,
timeframe: Timeframe,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bar>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_bars<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
start: DateTime<Utc>,
end: DateTime<Utc>,
timeframe: Timeframe,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bar>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get historical bars
Source§fn subscribe_quotes<'life0, 'async_trait>(
&'life0 self,
symbols: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<QuoteStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_quotes<'life0, 'async_trait>(
&'life0 self,
symbols: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<QuoteStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Subscribe to real-time quotes
Source§fn subscribe_trades<'life0, 'async_trait>(
&'life0 self,
symbols: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<TradeStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_trades<'life0, 'async_trait>(
&'life0 self,
symbols: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<TradeStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Subscribe to trades
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check
Auto Trait Implementations§
impl Freeze for PolygonClient
impl !RefUnwindSafe for PolygonClient
impl Send for PolygonClient
impl Sync for PolygonClient
impl Unpin for PolygonClient
impl !UnwindSafe for PolygonClient
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
Mutably borrows from an owned value. Read more