pub struct Client { /* private fields */ }Expand description
Root async client for Alpaca Market Data HTTP APIs.
Build a client once, then obtain resource clients with Self::stocks,
Self::options, Self::crypto, Self::news, and
Self::corporate_actions.
§Examples
use alpaca_data::Client;
let client = Client::builder().build()?;Implementations§
Source§impl Client
impl Client
Sourcepub fn new() -> Self
pub fn new() -> Self
Builds a client with default runtime settings and no credentials.
This is useful for the currently implemented public crypto endpoints.
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Starts a ClientBuilder for explicit runtime configuration.
Sourcepub fn stocks(&self) -> StocksClient
pub fn stocks(&self) -> StocksClient
Returns the stocks resource client.
Sourcepub fn options(&self) -> OptionsClient
pub fn options(&self) -> OptionsClient
Returns the options resource client.
Sourcepub fn crypto(&self) -> CryptoClient
pub fn crypto(&self) -> CryptoClient
Returns the crypto resource client.
Sourcepub fn news(&self) -> NewsClient
pub fn news(&self) -> NewsClient
Returns the news resource client.
Sourcepub fn corporate_actions(&self) -> CorporateActionsClient
pub fn corporate_actions(&self) -> CorporateActionsClient
Returns the corporate actions resource client.
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 UnsafeUnpin 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