deriv_api_schema/trading_servers_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/trading_servers/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
12use crate::environment::Environment;
13use crate::market_type::MarketType;
14use crate::account_type::AccountType;
15use crate::platform::Platform;
16
17/// Get the list of servers for a trading platform.
18#[derive(Debug, Clone, Serialize, Deserialize)]
19#[serde(rename_all = "snake_case")]
20pub struct TradingServersRequest {
21 /// [Optional] Trading account type.\n
22 // Correct serde attribute construction - Use helper
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub account_type: Option<AccountType>,
25 /// [Optional] Pass the environment (installation) instance. Currently, there are one demo and two real environments. Defaults to 'all'.\n
26 // Correct serde attribute construction - Use helper
27 #[serde(skip_serializing_if = "Option::is_none")]
28 pub environment: Option<Environment>,
29 /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
30 // Correct serde attribute construction - Use helper
31 #[serde(skip_serializing_if = "Option::is_none")]
32 pub loginid: Option<String>,
33 /// [Optional] Market type.\n
34 // Correct serde attribute construction - Use helper
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub market_type: Option<MarketType>,
37 /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
38 // Correct serde attribute construction - Use helper
39 #[serde(skip_serializing_if = "Option::is_none")]
40 pub passthrough: Option<Value>,
41 /// [Optional] Pass the trading platform name, default to mt5\n
42 // Correct serde attribute construction - Use helper
43 #[serde(skip_serializing_if = "Option::is_none")]
44 pub platform: Option<Platform>,
45 /// [Optional] Used to map request to response.\n
46 // Correct serde attribute construction - Use helper
47 #[serde(skip_serializing_if = "Option::is_none")]
48 pub req_id: Option<i64>,
49 /// Must be `1`\n
50 // Correct serde attribute construction - Use helper
51
52 pub trading_servers: i64,
53}
54