Skip to main content

bybit_rust_api/ws/private/
dcp.rs

1//! DCP (Disconnected Cancel All Protection) stream.
2//!
3//! # Topic
4//! `dcp` or `dcp.{category}`
5
6use serde::Deserialize;
7
8#[derive(Debug, Clone, Deserialize)]
9pub struct DcpData {
10    #[serde(rename = "category")]
11    #[serde(default)]
12    pub category: Option<String>,
13    /// Whether DCP is triggered (connection lost)
14    #[serde(rename = "dcpStatus")]
15    #[serde(default)]
16    pub dcp_status: Option<String>,
17    /// Time window in ms before DCP triggers
18    #[serde(rename = "timeWindow")]
19    #[serde(default)]
20    pub time_window: Option<i64>,
21    #[serde(rename = "updatedTime")]
22    #[serde(default)]
23    pub updated_time: Option<i64>,
24}