deriv_api_schema/
economic_calendar_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/economic_calendar/send.json
4
5// Use direct crate names for imports
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9
10
11// Import required types from the *same* crate
12
13/// Specify a currency to receive a list of events related to that specific currency. For example, specifying USD will return a list of USD-related events. If the currency is omitted, you will receive a list for all currencies.
14#[derive(Debug, Clone, Serialize, Deserialize)]
15#[serde(rename_all = "snake_case")]
16pub struct EconomicCalendarRequest {
17    /// [Optional] Currency symbol.\n
18    // Correct serde attribute construction - Use helper
19    #[serde(skip_serializing_if = "Option::is_none")] 
20    pub currency: Option<String>,
21    /// Must be `1`\n
22    // Correct serde attribute construction - Use helper
23    
24    pub economic_calendar: i64,
25    /// [Optional] End date.\n
26    // Correct serde attribute construction - Use helper
27    #[serde(skip_serializing_if = "Option::is_none")] 
28    pub end_date: Option<i64>,
29    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
30    // Correct serde attribute construction - Use helper
31    #[serde(skip_serializing_if = "Option::is_none")] 
32    pub passthrough: Option<Value>,
33    /// [Optional] Used to map request to response.\n
34    // Correct serde attribute construction - Use helper
35    #[serde(skip_serializing_if = "Option::is_none")] 
36    pub req_id: Option<i64>,
37    /// [Optional] Start date.\n
38    // Correct serde attribute construction - Use helper
39    #[serde(skip_serializing_if = "Option::is_none")] 
40    pub start_date: Option<i64>,
41}
42