pub struct SchwabClient { /* private fields */ }Expand description
Authenticated HTTP client for Trader API v1.
Implementations§
Source§impl SchwabClient
impl SchwabClient
pub fn new(config: ClientConfig) -> Self
pub fn oauth(&self) -> &OAuthClient
pub fn config(&self) -> &ClientConfig
pub async fn get_json<T: DeserializeOwned>( &self, path: &str, query: &[(&str, &str)], ) -> Result<T>
Sourcepub async fn get_market_data_json<T: DeserializeOwned>(
&self,
path: &str,
query: &[(&str, &str)],
) -> Result<T>
pub async fn get_market_data_json<T: DeserializeOwned>( &self, path: &str, query: &[(&str, &str)], ) -> Result<T>
GET against Market Data Production (/marketdata/v1).
pub async fn post_json<T: DeserializeOwned>( &self, path: &str, body: &Value, ) -> Result<T>
pub async fn put_json<T: DeserializeOwned>( &self, path: &str, body: &Value, ) -> Result<T>
pub async fn post_mutate( &self, path: &str, body: &Value, ) -> Result<MutationResponse>
pub async fn put_mutate( &self, path: &str, body: &Value, ) -> Result<MutationResponse>
pub async fn delete_mutate(&self, path: &str) -> Result<MutationResponse>
Trait Implementations§
Source§impl Clone for SchwabClient
impl Clone for SchwabClient
Source§fn clone(&self) -> SchwabClient
fn clone(&self) -> SchwabClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SchwabClient
impl !UnwindSafe for SchwabClient
impl Freeze for SchwabClient
impl Send for SchwabClient
impl Sync for SchwabClient
impl Unpin for SchwabClient
impl UnsafeUnpin for SchwabClient
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