longport/trade/requests/
get_today_executions.rs
1use serde::Serialize;
2
3#[derive(Debug, Default, Serialize, Clone)]
5pub struct GetTodayExecutionsOptions {
6 #[serde(skip_serializing_if = "Option::is_none")]
7 symbol: Option<String>,
8 #[serde(skip_serializing_if = "Option::is_none")]
9 order_id: Option<String>,
10}
11
12impl GetTodayExecutionsOptions {
13 #[inline]
15 pub fn new() -> Self {
16 Default::default()
17 }
18
19 #[inline]
21 #[must_use]
22 pub fn symbol(self, symbol: impl Into<String>) -> Self {
23 Self {
24 symbol: Some(symbol.into()),
25 ..self
26 }
27 }
28
29 #[inline]
31 #[must_use]
32 pub fn order_id(self, order_id: impl Into<String>) -> Self {
33 Self {
34 order_id: Some(order_id.into()),
35 ..self
36 }
37 }
38}