Skip to main content

binance_sdk/spot/rest_api/models/
delete_order_response.rs

1/*
2 * Spot REST API
3 *
4 * Access market data, manage accounts, and trade on Binance Spot.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 *
8 *
9 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10 * https://openapi-generator.tech
11 * Do not edit the class manually.
12 */
13
14#![allow(unused_imports)]
15use crate::spot::rest_api::models;
16use serde::{Deserialize, Serialize};
17
18#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19pub struct DeleteOrderResponse {
20    #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")]
21    pub symbol: Option<String>,
22    #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")]
23    pub order_id: Option<i64>,
24    /// Unless it's part of an order list, value will be -1
25    #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")]
26    pub order_list_id: Option<i64>,
27    #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")]
28    pub orig_client_order_id: Option<String>,
29    #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")]
30    pub client_order_id: Option<String>,
31    #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")]
32    pub transact_time: Option<i64>,
33    #[serde(rename = "price", skip_serializing_if = "Option::is_none")]
34    pub price: Option<String>,
35    #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")]
36    pub orig_qty: Option<String>,
37    #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")]
38    pub executed_qty: Option<String>,
39    #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")]
40    pub orig_quote_order_qty: Option<String>,
41    #[serde(
42        rename = "cummulativeQuoteQty",
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub cummulative_quote_qty: Option<String>,
46    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
47    pub status: Option<String>,
48    #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")]
49    pub time_in_force: Option<String>,
50    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
51    pub r#type: Option<String>,
52    #[serde(rename = "side", skip_serializing_if = "Option::is_none")]
53    pub side: Option<String>,
54    #[serde(
55        rename = "selfTradePreventionMode",
56        skip_serializing_if = "Option::is_none"
57    )]
58    pub self_trade_prevention_mode: Option<String>,
59    /// Quantity for the iceberg order. Appears only if the parameter `icebergQty` was sent in the request.
60    #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")]
61    pub iceberg_qty: Option<String>,
62    /// When used together with `symbol`, can be used to query a prevented match. Appears only if the order expired due to STP.
63    #[serde(rename = "preventedMatchId", skip_serializing_if = "Option::is_none")]
64    pub prevented_match_id: Option<i64>,
65    /// Order quantity that expired due to STP. Appears only if the order expired due to STP.
66    #[serde(rename = "preventedQuantity", skip_serializing_if = "Option::is_none")]
67    pub prevented_quantity: Option<String>,
68    /// Price when the algorithmic order will be triggered. Appears for `STOP_LOSS`, `TAKE_PROFIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` orders.
69    #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")]
70    pub stop_price: Option<String>,
71    /// Can be used to label an order that's part of an order strategy. Appears if the parameter was populated in the request.
72    #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")]
73    pub strategy_id: Option<i64>,
74    /// Can be used to label an order that is using an order strategy. Appears if the parameter was populated in the request.
75    #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")]
76    pub strategy_type: Option<i64>,
77    /// Delta price change required before order activation. Appears for trailing stop orders.
78    #[serde(rename = "trailingDelta", skip_serializing_if = "Option::is_none")]
79    pub trailing_delta: Option<i64>,
80    /// Time when the trailing order becomes active and starts tracking price changes. Appears only for trailing stop orders.
81    #[serde(rename = "trailingTime", skip_serializing_if = "Option::is_none")]
82    pub trailing_time: Option<i64>,
83    /// Indicates whether the order used SOR. Appears when placing orders using SOR.
84    #[serde(rename = "usedSor", skip_serializing_if = "Option::is_none")]
85    pub used_sor: Option<bool>,
86    /// Indicates whether the order is being filled by SOR or by the order book to which it was submitted. Appears when placing orders using SOR.
87    #[serde(rename = "workingFloor", skip_serializing_if = "Option::is_none")]
88    pub working_floor: Option<String>,
89    /// Price peg type. Only for pegged orders.
90    #[serde(rename = "pegPriceType", skip_serializing_if = "Option::is_none")]
91    pub peg_price_type: Option<String>,
92    /// Price peg offset type. Only for pegged orders, if requested.
93    #[serde(rename = "pegOffsetType", skip_serializing_if = "Option::is_none")]
94    pub peg_offset_type: Option<String>,
95    /// Price peg offset value. Only for pegged orders, if requested.
96    #[serde(rename = "pegOffsetValue", skip_serializing_if = "Option::is_none")]
97    pub peg_offset_value: Option<i64>,
98    /// Current price the order is pegged at. Only for pegged orders, once determined.
99    #[serde(rename = "peggedPrice", skip_serializing_if = "Option::is_none")]
100    pub pegged_price: Option<String>,
101    /// Cause of the order's expiration. Returned when an order has expired.
102    #[serde(rename = "expiryReason", skip_serializing_if = "Option::is_none")]
103    pub expiry_reason: Option<String>,
104}
105
106impl DeleteOrderResponse {
107    #[must_use]
108    pub fn new() -> DeleteOrderResponse {
109        DeleteOrderResponse {
110            symbol: None,
111            order_id: None,
112            order_list_id: None,
113            orig_client_order_id: None,
114            client_order_id: None,
115            transact_time: None,
116            price: None,
117            orig_qty: None,
118            executed_qty: None,
119            orig_quote_order_qty: None,
120            cummulative_quote_qty: None,
121            status: None,
122            time_in_force: None,
123            r#type: None,
124            side: None,
125            self_trade_prevention_mode: None,
126            iceberg_qty: None,
127            prevented_match_id: None,
128            prevented_quantity: None,
129            stop_price: None,
130            strategy_id: None,
131            strategy_type: None,
132            trailing_delta: None,
133            trailing_time: None,
134            used_sor: None,
135            working_floor: None,
136            peg_price_type: None,
137            peg_offset_type: None,
138            peg_offset_value: None,
139            pegged_price: None,
140            expiry_reason: None,
141        }
142    }
143}