deriv_api_schema/active_symbol_item.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/active_symbols/receive.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize};
7
8
9
10
11// Import shared types from the *same* crate
12use crate::allow_forward_starting::AllowForwardStarting;
13use crate::is_trading_suspended::IsTradingSuspended;
14use crate::exchange_is_open::ExchangeIsOpen;
15
16// It's a struct
17/// The information about each symbol.
18#[derive(Debug, Clone, Serialize, Deserialize)]
19#[serde(rename_all = "snake_case")]
20pub struct ActiveSymbolItem {
21 /// `1` if the symbol is tradable in a forward starting contract, `0` if not.\n
22 // Correct serde attribute construction - Use helper
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub allow_forward_starting: Option<AllowForwardStarting>,
25 /// Amount the data feed is delayed (in minutes) due to Exchange licensing requirements. Only returned on `full` active symbols call.\n
26 // Correct serde attribute construction - Use helper
27 #[serde(skip_serializing_if = "Option::is_none")]
28 pub delay_amount: Option<i64>,
29 /// Display name.\n
30 // Correct serde attribute construction - Use helper
31
32 pub display_name: String,
33 /// Display order.\n
34 // Correct serde attribute construction - Use helper
35
36 pub display_order: i64,
37 /// `1` if market is currently open, `0` if closed.\n
38 // Correct serde attribute construction - Use helper
39
40 pub exchange_is_open: ExchangeIsOpen,
41 /// Exchange name (for underlyings listed on a Stock Exchange). Only returned on `full` active symbols call.\n
42 // Correct serde attribute construction - Use helper
43 #[serde(skip_serializing_if = "Option::is_none")]
44 pub exchange_name: Option<String>,
45 /// Intraday interval minutes. Only returned on `full` active symbols call.\n
46 // Correct serde attribute construction - Use helper
47 #[serde(skip_serializing_if = "Option::is_none")]
48 pub intraday_interval_minutes: Option<i64>,
49 /// `1` indicates that trading is currently suspended, `0` if not.\n
50 // Correct serde attribute construction - Use helper
51
52 pub is_trading_suspended: IsTradingSuspended,
53 /// Market category (forex, indices, etc).\n
54 // Correct serde attribute construction - Use helper
55
56 pub market: String,
57 /// Translated market name.\n
58 // Correct serde attribute construction - Use helper
59
60 pub market_display_name: String,
61 /// Pip size (i.e. minimum fluctuation amount).\n
62 // Correct serde attribute construction - Use helper
63
64 pub pip: String,
65 /// For stock indices, the underlying currency for that instrument. Only returned on `full` active symbols call.\n
66 // Correct serde attribute construction - Use helper
67 #[serde(skip_serializing_if = "Option::is_none")]
68 pub quoted_currency_symbol: Option<String>,
69 /// Latest spot price of the underlying. Only returned on `full` active symbols call.\n
70 // Correct serde attribute construction - Use helper
71 #[serde(skip_serializing_if = "Option::is_none")]
72 pub spot: Option<String>,
73 /// Number of seconds elapsed since the last spot price. Only returned on `full` active symbols call.\n
74 // Correct serde attribute construction - Use helper
75 #[serde(skip_serializing_if = "Option::is_none")]
76 pub spot_age: Option<String>,
77 /// Daily percentage for a symbol. Only returned on 'full' active symbols call.\n
78 // Correct serde attribute construction - Use helper
79 #[serde(skip_serializing_if = "Option::is_none")]
80 pub spot_percentage_change: Option<String>,
81 /// Latest spot epoch time. Only returned on `full` active symbols call.\n
82 // Correct serde attribute construction - Use helper
83 #[serde(skip_serializing_if = "Option::is_none")]
84 pub spot_time: Option<String>,
85 /// Subgroup name.\n
86 // Correct serde attribute construction - Use helper
87
88 pub subgroup: String,
89 /// Translated subgroup name.\n
90 // Correct serde attribute construction - Use helper
91
92 pub subgroup_display_name: String,
93 /// Submarket name.\n
94 // Correct serde attribute construction - Use helper
95
96 pub submarket: String,
97 /// Translated submarket name.\n
98 // Correct serde attribute construction - Use helper
99
100 pub submarket_display_name: String,
101 /// The symbol code for this underlying.\n
102 // Correct serde attribute construction - Use helper
103
104 pub symbol: String,
105 /// Symbol type (forex, commodities, etc).\n
106 // Correct serde attribute construction - Use helper
107
108 pub symbol_type: String,
109}
110