pub struct OrdersApi<'a> { /* private fields */ }Implementations§
Source§impl<'a> OrdersApi<'a>
impl<'a> OrdersApi<'a>
pub fn new(client: &'a SchwabClient) -> Self
Sourcepub async fn list_for_account(
&self,
account_number: &str,
from_entered_time: Option<&str>,
to_entered_time: Option<&str>,
status: Option<&str>,
max_results: Option<&str>,
) -> Result<Vec<Order>>
pub async fn list_for_account( &self, account_number: &str, from_entered_time: Option<&str>, to_entered_time: Option<&str>, status: Option<&str>, max_results: Option<&str>, ) -> Result<Vec<Order>>
GET /accounts/{accountNumber}/orders
Sourcepub async fn list_all(
&self,
from_entered_time: Option<&str>,
to_entered_time: Option<&str>,
status: Option<&str>,
max_results: Option<&str>,
) -> Result<Vec<Order>>
pub async fn list_all( &self, from_entered_time: Option<&str>, to_entered_time: Option<&str>, status: Option<&str>, max_results: Option<&str>, ) -> Result<Vec<Order>>
GET /orders — all accounts (from date must be within 60 days).
Sourcepub async fn get(&self, account_number: &str, order_id: &str) -> Result<Order>
pub async fn get(&self, account_number: &str, order_id: &str) -> Result<Order>
GET /accounts/{accountNumber}/orders/{orderId}
Sourcepub async fn place(
&self,
account_number: &str,
order: &OrderRequest,
) -> Result<MutationResponse>
pub async fn place( &self, account_number: &str, order: &OrderRequest, ) -> Result<MutationResponse>
POST /accounts/{accountNumber}/orders — 201 empty body + Location header.
Sourcepub async fn preview(
&self,
account_number: &str,
order: &OrderRequest,
) -> Result<PreviewOrder>
pub async fn preview( &self, account_number: &str, order: &OrderRequest, ) -> Result<PreviewOrder>
POST /accounts/{accountNumber}/previewOrder
Sourcepub async fn cancel(
&self,
account_number: &str,
order_id: &str,
) -> Result<MutationResponse>
pub async fn cancel( &self, account_number: &str, order_id: &str, ) -> Result<MutationResponse>
DELETE /accounts/{accountNumber}/orders/{orderId}
Sourcepub async fn replace(
&self,
account_number: &str,
order_id: &str,
order: &OrderRequest,
) -> Result<MutationResponse>
pub async fn replace( &self, account_number: &str, order_id: &str, order: &OrderRequest, ) -> Result<MutationResponse>
PUT /accounts/{accountNumber}/orders/{orderId}
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for OrdersApi<'a>
impl<'a> !UnwindSafe for OrdersApi<'a>
impl<'a> Freeze for OrdersApi<'a>
impl<'a> Send for OrdersApi<'a>
impl<'a> Sync for OrdersApi<'a>
impl<'a> Unpin for OrdersApi<'a>
impl<'a> UnsafeUnpin for OrdersApi<'a>
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