binance_client/http_api_v3/data/open_orders/get/
response.rs

1//!
2//! The open orders GET response.
3//!
4
5use rust_decimal::Decimal;
6use serde::Deserialize;
7
8use crate::http_api_v3::data::order_side::OrderSide;
9use crate::http_api_v3::data::order_status::OrderStatus;
10use crate::http_api_v3::data::order_time_in_force::OrderTimeInForce;
11use crate::http_api_v3::data::order_type::OrderType;
12
13///
14/// The `https://www.binance.com/api/v3/openOrders` GET response.
15///
16pub type Response = Vec<OpenOrder>;
17
18///
19/// A single open order element.
20///
21#[derive(Debug, Deserialize, Clone)]
22#[serde(rename_all = "camelCase")]
23pub struct OpenOrder {
24    /// The symbol name.
25    pub symbol: String,
26    /// The server-side order ID.
27    pub order_id: i64,
28    /// The server-side order list ID.
29    pub order_list_id: i64,
30    /// The client-side order ID.
31    pub client_order_id: String,
32    /// The order price.
33    pub price: Decimal,
34    /// The initial order quantity.
35    pub orig_qty: Decimal,
36    /// The order quantity executed so far.
37    pub executed_qty: Decimal,
38    /// Usually the same as `executed_qty`.
39    pub cummulative_quote_qty: Decimal,
40    /// The order status.
41    pub status: OrderStatus,
42    /// The order time-in-force.
43    pub time_in_force: OrderTimeInForce,
44    /// The order type.
45    pub r#type: OrderType,
46    /// The order side.
47    pub side: OrderSide,
48    /// Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders.
49    pub stop_price: Decimal,
50    /// The iceberg order quantity.
51    pub iceberg_qty: Decimal,
52    /// The order time in milliseconds.
53    pub time: i64,
54    /// Usually the same as `time`.
55    pub update_time: i64,
56    /// Unknown value.
57    pub is_working: bool,
58    /// Usually the same as `orig_qty`.
59    pub orig_quote_order_qty: Decimal,
60}