Skip to main content

bybit/models/
system_status.rs

1use crate::prelude::*;
2
3/// Represents a single system status/maintenance record
4#[derive(Serialize, Deserialize, Clone, Debug)]
5#[serde(rename_all = "camelCase")]
6pub struct SystemStatusItem {
7    /// Unique identifier for the system status record
8    pub id: String,
9
10    /// Title of the system maintenance
11    pub title: String,
12
13    /// System state (e.g., "completed", "in_progress", "scheduled")
14    pub state: String,
15
16    /// Start time of system maintenance, timestamp in milliseconds
17    #[serde(with = "string_to_u64")]
18    pub begin: u64,
19
20    /// End time of system maintenance, timestamp in milliseconds.
21    /// Before maintenance is completed, it is the expected end time;
22    /// After maintenance is completed, it will be changed to the actual end time.
23    #[serde(with = "string_to_u64")]
24    pub end: u64,
25
26    /// Hyperlink to system maintenance details. Default value is empty string
27    pub href: String,
28
29    /// Service types affected by the maintenance
30    pub service_types: Vec<u32>,
31
32    /// Products affected by the maintenance
33    pub product: Vec<u32>,
34
35    /// Affected UID tail numbers
36    pub uid_suffix: Vec<u32>,
37
38    /// Maintenance type
39    #[serde(with = "string_to_u32")]
40    pub maintain_type: u32,
41
42    /// Environment
43    #[serde(with = "string_to_u32")]
44    pub env: u32,
45}
46
47/// Represents the response from the system status endpoint
48#[derive(Serialize, Deserialize, Clone, Debug)]
49#[serde(rename_all = "camelCase")]
50pub struct SystemStatusResult {
51    /// List of system status/maintenance records
52    pub list: Vec<SystemStatusItem>,
53}