use crate::error::OkxResult;
use crate::rest::RestClient;
impl RestClient {
pub async fn place_grid_algo_order(
&self,
params: &serde_json::Value,
) -> OkxResult<Vec<serde_json::Value>> {
self.post_signed("/api/v5/tradingBot/grid/order-algo", params)
.await
}
pub async fn amend_grid_algo_order(
&self,
params: &serde_json::Value,
) -> OkxResult<Vec<serde_json::Value>> {
self.post_signed("/api/v5/tradingBot/grid/amend-order-algo", params)
.await
}
pub async fn stop_grid_algo_order(
&self,
params: &serde_json::Value,
) -> OkxResult<Vec<serde_json::Value>> {
self.post_signed("/api/v5/tradingBot/grid/stop-order-algo", params)
.await
}
pub async fn get_grid_algo_order_list(
&self,
params: &serde_json::Value,
) -> OkxResult<Vec<serde_json::Value>> {
self.get_signed("/api/v5/tradingBot/grid/orders-algo-pending", Some(params))
.await
}
pub async fn get_grid_algo_order_history(
&self,
params: &serde_json::Value,
) -> OkxResult<Vec<serde_json::Value>> {
self.get_signed("/api/v5/tradingBot/grid/orders-algo-history", Some(params))
.await
}
pub async fn get_grid_algo_order_details(
&self,
params: &serde_json::Value,
) -> OkxResult<Vec<serde_json::Value>> {
self.get_signed("/api/v5/tradingBot/grid/orders-algo-details", Some(params))
.await
}
pub async fn get_grid_sub_orders(
&self,
params: &serde_json::Value,
) -> OkxResult<Vec<serde_json::Value>> {
self.get_signed("/api/v5/tradingBot/grid/sub-orders", Some(params))
.await
}
pub async fn get_grid_positions(
&self,
params: &serde_json::Value,
) -> OkxResult<Vec<serde_json::Value>> {
self.get_signed("/api/v5/tradingBot/grid/positions", Some(params))
.await
}
}