pub struct OrderClient { /* private fields */ }Implementations§
Source§impl OrderClient
impl OrderClient
pub fn new(client: RestClient) -> Self
Sourcepub async fn place_order(
&self,
order: PlaceOrderRequest,
) -> Result<ServerResponse<PlaceOrderResponse>>
pub async fn place_order( &self, order: PlaceOrderRequest, ) -> Result<ServerResponse<PlaceOrderResponse>>
Place an order
API: POST /v5/order/create https://bybit-exchange.github.io/docs/v5/order/create-order
Sourcepub async fn batch_place_orders(
&self,
category: Category,
orders: Vec<PlaceOrderRequest>,
) -> Result<ServerResponse<BatchPlaceOrderResponse>>
pub async fn batch_place_orders( &self, category: Category, orders: Vec<PlaceOrderRequest>, ) -> Result<ServerResponse<BatchPlaceOrderResponse>>
Batch place orders (Option only)
API: POST /v5/order/create-batch https://bybit-exchange.github.io/docs/v5/order/batch-place
Sourcepub async fn amend_order(
&self,
amend_request: AmendOrderRequest,
) -> Result<ServerResponse<AmendOrderResponse>>
pub async fn amend_order( &self, amend_request: AmendOrderRequest, ) -> Result<ServerResponse<AmendOrderResponse>>
Amend order
API: POST /v5/order/amend https://bybit-exchange.github.io/docs/v5/order/amend-order
Sourcepub async fn batch_amend_orders(
&self,
category: Category,
amendments: Vec<AmendOrderRequest>,
) -> Result<ServerResponse<BatchAmendOrderResponse>>
pub async fn batch_amend_orders( &self, category: Category, amendments: Vec<AmendOrderRequest>, ) -> Result<ServerResponse<BatchAmendOrderResponse>>
Batch amend orders (Option only)
API: POST /v5/order/amend-batch https://bybit-exchange.github.io/docs/v5/order/batch-amend
Sourcepub async fn cancel_order(
&self,
cancel_request: CancelOrderRequest,
) -> Result<ServerResponse<CancelOrderResponse>>
pub async fn cancel_order( &self, cancel_request: CancelOrderRequest, ) -> Result<ServerResponse<CancelOrderResponse>>
Cancel order
API: POST /v5/order/cancel https://bybit-exchange.github.io/docs/v5/order/cancel-order
Sourcepub async fn batch_cancel_orders(
&self,
category: Category,
cancellations: Vec<CancelOrderRequest>,
) -> Result<ServerResponse<BatchCancelOrderResponse>>
pub async fn batch_cancel_orders( &self, category: Category, cancellations: Vec<CancelOrderRequest>, ) -> Result<ServerResponse<BatchCancelOrderResponse>>
Batch cancel orders (Option only)
API: POST /v5/order/cancel-batch https://bybit-exchange.github.io/docs/v5/order/batch-cancel
Sourcepub async fn cancel_all_orders(
&self,
category: Category,
symbol: Option<&str>,
base_coin: Option<&str>,
settle_coin: Option<&str>,
order_filter: Option<&str>,
) -> Result<ServerResponse<CancelAllOrdersResponse>>
pub async fn cancel_all_orders( &self, category: Category, symbol: Option<&str>, base_coin: Option<&str>, settle_coin: Option<&str>, order_filter: Option<&str>, ) -> Result<ServerResponse<CancelAllOrdersResponse>>
Cancel all orders
API: POST /v5/order/cancel-all https://bybit-exchange.github.io/docs/v5/order/cancel-all
Sourcepub async fn get_open_orders(
&self,
category: Category,
symbol: Option<&str>,
base_coin: Option<&str>,
settle_coin: Option<&str>,
order_id: Option<&str>,
order_link_id: Option<&str>,
open_only: Option<i32>,
order_filter: Option<&str>,
limit: Option<i32>,
cursor: Option<&str>,
) -> Result<ServerResponse<GetOrdersResponse>>
pub async fn get_open_orders( &self, category: Category, symbol: Option<&str>, base_coin: Option<&str>, settle_coin: Option<&str>, order_id: Option<&str>, order_link_id: Option<&str>, open_only: Option<i32>, order_filter: Option<&str>, limit: Option<i32>, cursor: Option<&str>, ) -> Result<ServerResponse<GetOrdersResponse>>
Get open orders
API: GET /v5/order/realtime https://bybit-exchange.github.io/docs/v5/order/open-order
Sourcepub async fn get_order_history(
&self,
category: Category,
symbol: Option<&str>,
base_coin: Option<&str>,
settle_coin: Option<&str>,
order_id: Option<&str>,
order_link_id: Option<&str>,
order_filter: Option<&str>,
order_status: Option<&str>,
start_time: Option<i64>,
end_time: Option<i64>,
limit: Option<i32>,
cursor: Option<&str>,
) -> Result<ServerResponse<GetOrdersResponse>>
pub async fn get_order_history( &self, category: Category, symbol: Option<&str>, base_coin: Option<&str>, settle_coin: Option<&str>, order_id: Option<&str>, order_link_id: Option<&str>, order_filter: Option<&str>, order_status: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i32>, cursor: Option<&str>, ) -> Result<ServerResponse<GetOrdersResponse>>
Get order history
API: GET /v5/order/history https://bybit-exchange.github.io/docs/v5/order/order-list
Sourcepub async fn get_trade_history(
&self,
category: Category,
symbol: Option<&str>,
order_id: Option<&str>,
order_link_id: Option<&str>,
base_coin: Option<&str>,
start_time: Option<i64>,
end_time: Option<i64>,
exec_type: Option<&str>,
limit: Option<i32>,
cursor: Option<&str>,
) -> Result<ServerResponse<GetTradeHistoryResponse>>
pub async fn get_trade_history( &self, category: Category, symbol: Option<&str>, order_id: Option<&str>, order_link_id: Option<&str>, base_coin: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, exec_type: Option<&str>, limit: Option<i32>, cursor: Option<&str>, ) -> Result<ServerResponse<GetTradeHistoryResponse>>
Get trade history
API: GET /v5/execution/list https://bybit-exchange.github.io/docs/v5/order/execution
Sourcepub async fn spot_borrow_check(
&self,
category: &str,
symbol: &str,
side: &str,
) -> Result<ServerResponse<Value>>
pub async fn spot_borrow_check( &self, category: &str, symbol: &str, side: &str, ) -> Result<ServerResponse<Value>>
Check spot borrow quota
API: GET /v5/order/spot-borrow-check https://bybit-exchange.github.io/docs/v5/order/spot-borrow-quota