Skip to main content

longbridge/grid/requests/
get_grid_orders_by_ids.rs

1use serde::Serialize;
2
3/// Options for query grid trading orders by IDs request
4#[derive(Debug, Default, Serialize, Clone)]
5pub struct GetGridOrdersByIdsOptions {
6    order_ids: Vec<String>,
7}
8
9impl GetGridOrdersByIdsOptions {
10    /// Create a new `GetGridOrdersByIdsOptions`
11    #[inline]
12    pub fn new<I, T>(order_ids: I) -> Self
13    where
14        I: IntoIterator<Item = T>,
15        T: Into<String>,
16    {
17        Self {
18            order_ids: order_ids.into_iter().map(Into::into).collect(),
19        }
20    }
21}