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.
Sourcepub async fn get_open_orders(
&self,
account_id: &str,
) -> WebullResult<Vec<Order>>
pub async fn get_open_orders( &self, account_id: &str, ) -> WebullResult<Vec<Order>>
Get open orders for an account.
Sourcepub async fn get_open_orders_paged(
&self,
account_id: &str,
page_size: u32,
last_order_id: Option<&str>,
) -> WebullResult<Vec<Order>>
pub async fn get_open_orders_paged( &self, account_id: &str, page_size: u32, last_order_id: Option<&str>, ) -> WebullResult<Vec<Order>>
Get open orders for an account with pagination.
Sourcepub async fn get_today_orders(
&self,
account_id: &str,
) -> WebullResult<Vec<Order>>
pub async fn get_today_orders( &self, account_id: &str, ) -> WebullResult<Vec<Order>>
Get today’s orders for an account.
Sourcepub async fn get_today_orders_paged(
&self,
account_id: &str,
page_size: u32,
last_order_id: Option<&str>,
) -> WebullResult<Vec<Order>>
pub async fn get_today_orders_paged( &self, account_id: &str, page_size: u32, last_order_id: Option<&str>, ) -> WebullResult<Vec<Order>>
Get today’s orders for an account with pagination.
Sourcepub async fn preview_option_order(
&self,
preview_request: &OptionOrderPreviewRequest,
) -> WebullResult<OptionOrderPreviewResponse>
pub async fn preview_option_order( &self, preview_request: &OptionOrderPreviewRequest, ) -> WebullResult<OptionOrderPreviewResponse>
Preview an option order.
Sourcepub async fn place_option_order(
&self,
account_id: &str,
orders: &[OptionOrderRequest],
) -> WebullResult<Vec<OrderResponse>>
pub async fn place_option_order( &self, account_id: &str, orders: &[OptionOrderRequest], ) -> WebullResult<Vec<OrderResponse>>
Place an option order.
Sourcepub async fn replace_option_order(
&self,
account_id: &str,
orders: &[OptionOrderRequest],
) -> WebullResult<Vec<OrderResponse>>
pub async fn replace_option_order( &self, account_id: &str, orders: &[OptionOrderRequest], ) -> WebullResult<Vec<OrderResponse>>
Replace an option order.
Sourcepub async fn cancel_option_order(
&self,
account_id: &str,
client_order_id: &str,
) -> WebullResult<()>
pub async fn cancel_option_order( &self, account_id: &str, client_order_id: &str, ) -> WebullResult<()>
Cancel an option 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