Skip to main content

bybit/models/
order_confirmation.rs

1use crate::prelude::*;
2
3/// Represents the confirmation status of a single order in a batch.
4///
5/// Details the success or failure of an individual order in a batch request. Bots use this to diagnose issues with specific orders and implement retry logic if needed.
6#[derive(Serialize, Deserialize, Clone, Debug)]
7#[serde(rename_all = "camelCase")]
8pub struct OrderConfirmation {
9    /// The confirmation code for the order.
10    ///
11    /// A `0` indicates success, while non-zero values indicate errors (e.g., `10001` for invalid parameters). Bots should check this to identify failed orders.
12    pub code: i32,
13
14    /// A human-readable message describing the confirmation result.
15    ///
16    /// Provides details about the order’s status, such as `"OK"` or an error description. Bots should log this for debugging and error handling.
17    pub msg: String,
18}