pub struct OrderEndpoints { /* private fields */ }Expand description
Endpoints for order operations.
Implementations§
Source§impl OrderEndpoints
impl OrderEndpoints
Sourcepub fn new(
client: Client,
base_url: String,
auth_manager: Arc<AuthManager>,
) -> Self
pub fn new( client: Client, base_url: String, auth_manager: Arc<AuthManager>, ) -> Self
Create new order endpoints.
Sourcepub async fn place_order(
&self,
order: &OrderRequest,
) -> WebullResult<OrderResponse>
pub async fn place_order( &self, order: &OrderRequest, ) -> WebullResult<OrderResponse>
Place an order.
Sourcepub async fn cancel_order(&self, order_id: &str) -> WebullResult<()>
pub async fn cancel_order(&self, order_id: &str) -> WebullResult<()>
Cancel an order.
Sourcepub async fn get_order(&self, order_id: &str) -> WebullResult<Order>
pub async fn get_order(&self, order_id: &str) -> WebullResult<Order>
Get an order by ID.
Sourcepub async fn get_orders(
&self,
params: &OrderQueryParams,
) -> WebullResult<Vec<Order>>
pub async fn get_orders( &self, params: &OrderQueryParams, ) -> WebullResult<Vec<Order>>
Get orders based on query parameters.
Sourcepub async fn get_active_orders(&self) -> WebullResult<Vec<Order>>
pub async fn get_active_orders(&self) -> WebullResult<Vec<Order>>
Get active orders.
Sourcepub async fn get_filled_orders(&self) -> WebullResult<Vec<Order>>
pub async fn get_filled_orders(&self) -> WebullResult<Vec<Order>>
Get filled orders.
Sourcepub async fn modify_order(
&self,
order_id: &str,
order: &OrderRequest,
) -> WebullResult<OrderResponse>
pub async fn modify_order( &self, order_id: &str, order: &OrderRequest, ) -> WebullResult<OrderResponse>
Modify an existing order.
Auto Trait Implementations§
impl Freeze for OrderEndpoints
impl !RefUnwindSafe for OrderEndpoints
impl Send for OrderEndpoints
impl Sync for OrderEndpoints
impl Unpin for OrderEndpoints
impl !UnwindSafe for OrderEndpoints
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