dhan_rs/api/
super_order.rs1use crate::client::DhanClient;
4use crate::error::Result;
5use crate::types::orders::OrderResponse;
6use crate::types::super_order::*;
7
8impl DhanClient {
9 pub async fn place_super_order(&self, req: &PlaceSuperOrderRequest) -> Result<OrderResponse> {
13 self.post("/v2/super/orders", req).await
14 }
15
16 pub async fn modify_super_order(
20 &self,
21 order_id: &str,
22 req: &ModifySuperOrderRequest,
23 ) -> Result<OrderResponse> {
24 self.put(&format!("/v2/super/orders/{order_id}"), req).await
25 }
26
27 pub async fn cancel_super_order(&self, order_id: &str, leg: &str) -> Result<OrderResponse> {
33 self.delete(&format!("/v2/super/orders/{order_id}/{leg}"))
34 .await
35 }
36
37 pub async fn get_super_orders(&self) -> Result<Vec<SuperOrderDetail>> {
41 self.get("/v2/super/orders").await
42 }
43}