Skip to main content

bybit/models/
batched_order.rs

1use crate::prelude::*;
2
3/// Represents a single batched order result.
4///
5/// Details the outcome of an individual order in a batch placement request. Bots use this to track specific order creations and correlate with their trading strategy.
6#[derive(Serialize, Deserialize, Clone, Debug)]
7#[serde(rename_all = "camelCase")]
8pub struct BatchedOrder {
9    /// The product category (e.g., "linear").
10    ///
11    /// Indicates the instrument type of the order. Bots should verify this matches the requested category.
12    pub category: String,
13
14    /// The trading pair symbol (e.g., "BTCUSDT").
15    ///
16    /// Identifies the perpetual futures contract for the order. Bots should confirm this matches the requested symbol.
17    pub symbol: String,
18
19    /// The unique order ID.
20    ///
21    /// Identifies the placed order on Bybit’s exchange. Bots use this to track the order’s status and executions.
22    pub order_id: String,
23
24    /// The user-defined order link ID.
25    ///
26    /// A custom identifier for the order. Bots can use this to correlate the order with specific strategies or client requests.
27    pub order_link_id: String,
28
29    /// The timestamp of order creation.
30    ///
31    /// Indicates when the order was created. Bots use this to align order data with other time-series data.
32    #[serde(with = "string_to_u64")]
33    pub create_at: u64,
34}