pub struct Client {
pub api_key: String,
}Expand description
Finnhub API Client object.
Fields§
§api_key: StringAPI key from the Finnhub dashboard.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn symbol_lookup(
self,
query: String,
) -> Result<SymbolLookup, ExitFailure>
pub async fn symbol_lookup( self, query: String, ) -> Result<SymbolLookup, ExitFailure>
Lookups a symbol in the Finnhub API
Sourcepub async fn stock_symbol(
self,
exchange: String,
) -> Result<Vec<StockSymbol>, ExitFailure>
pub async fn stock_symbol( self, exchange: String, ) -> Result<Vec<StockSymbol>, ExitFailure>
Returns a list of supported stocks given the exchange.
Sourcepub async fn company_profile2(
self,
symbol: String,
) -> Result<CompanyProfile, ExitFailure>
pub async fn company_profile2( self, symbol: String, ) -> Result<CompanyProfile, ExitFailure>
Returns the profile of the company specified.
Sourcepub async fn market_news(
self,
category: String,
) -> Result<Vec<MarketNews>, ExitFailure>
pub async fn market_news( self, category: String, ) -> Result<Vec<MarketNews>, ExitFailure>
Returns the latest market news in the given category.
Sourcepub async fn company_news(
self,
symbol: String,
from: String,
to: String,
) -> Result<Vec<CompanyNews>, ExitFailure>
pub async fn company_news( self, symbol: String, from: String, to: String, ) -> Result<Vec<CompanyNews>, ExitFailure>
Returns the company news from the company specified in the given time period.
Sourcepub async fn peers(self, symbol: String) -> Result<Vec<String>, ExitFailure>
pub async fn peers(self, symbol: String) -> Result<Vec<String>, ExitFailure>
Returns the specified companies peers.
Sourcepub async fn quote(self, symbol: String) -> Result<CompanyQuote, ExitFailure>
pub async fn quote(self, symbol: String) -> Result<CompanyQuote, ExitFailure>
Returns the specified company’s current stock quote.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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