1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* 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,
}
}
}