oanda-v20-openapi 3.0.25

The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
Documentation
/*
 * OANDA v20 API
 *
 * The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
 *
 * The version of the OpenAPI document: 3.0.25
 * Contact: api@oanda.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// InstrumentComission : An InstrumentCommission represents an instrument-specific commission
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InstrumentComission {
    /// The commission amount (in the Account's home currency) charged per unitsTraded of the instrument
    #[serde(rename = "commission", skip_serializing_if = "Option::is_none")]
    pub commission: Option<f64>,
    /// The number of units traded that the commission amount is based on.
    #[serde(rename = "unitsTraded", skip_serializing_if = "Option::is_none")]
    pub units_traded: Option<f64>,
    /// The minimum commission amount (in the Account's home currency) that is charged when an Order is filled for this instrument.
    #[serde(rename = "minimumCommission", skip_serializing_if = "Option::is_none")]
    pub minimum_commission: Option<f64>,
}

impl InstrumentComission {
    /// An InstrumentCommission represents an instrument-specific commission
    pub fn new() -> InstrumentComission {
        InstrumentComission {
            commission: None,
            units_traded: None,
            minimum_commission: None,
        }
    }
}