bybit/models/order_status.rs
1use crate::prelude::*;
2
3/// Represents the status of an order, including its identifiers.
4///
5/// This struct provides the `order_id` and `order_link_id` for an order, used in
6/// responses for order placement, amendment, or cancellation. In perpetual futures,
7/// bots use this to track orders and correlate API responses with internal state.
8#[derive(Serialize, Deserialize, Clone, Debug)]
9#[serde(rename_all = "camelCase")]
10pub struct OrderStatus {
11 /// The unique identifier of the order provided by Bybit.
12 ///
13 /// Used to reference the order in API requests and responses. Bots must store
14 /// this to manage orders effectively in perpetual futures trading.
15 pub order_id: String,
16
17 /// The user-defined identifier of the order.
18 ///
19 /// Allows bots to track orders using custom IDs. Essential for complex strategies
20 /// in perpetual futures where multiple orders are active.
21 pub order_link_id: String,
22}