Skip to main content

oanda_v20_openapi/models/
close_trade_request.rs

1/*
2 * OANDA v20 API
3 *
4 * The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
5 *
6 * The version of the OpenAPI document: 0.2.1
7 * Contact: jmicoud02@gmail.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CloseTradeRequest {
16    /// Either \"ALL\", or a positive DecimalNumber reflection a partial unit
17    #[serde(rename = "units", skip_serializing_if = "Option::is_none")]
18    pub units: Option<String>,
19}
20
21impl CloseTradeRequest {
22    pub fn new() -> CloseTradeRequest {
23        CloseTradeRequest {
24            units: None,
25        }
26    }
27}
28