Skip to main content

oanda_v20_openapi/models/
open_trade_response.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 OpenTradeResponse {
16    /// The Account's list of open Trades
17    #[serde(rename = "trades", skip_serializing_if = "Option::is_none")]
18    pub trades: Option<Vec<models::Trade>>,
19    /// The ID of the most recent Transaction created for the Account
20    #[serde(rename = "lastTransactionID", skip_serializing_if = "Option::is_none")]
21    pub last_transaction_id: Option<String>,
22}
23
24impl OpenTradeResponse {
25    pub fn new() -> OpenTradeResponse {
26        OpenTradeResponse {
27            trades: None,
28            last_transaction_id: None,
29        }
30    }
31}
32