-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommissionAndFeesReport.cs
More file actions
84 lines (73 loc) · 2.42 KB
/
Copy pathCommissionAndFeesReport.cs
File metadata and controls
84 lines (73 loc) · 2.42 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* Copyright (C) 2024 Interactive Brokers LLC. All rights reserved. This code is subject to the terms
* and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable. */
using System.Collections.Generic;
namespace IBApi
{
/**
* @class CommissionAndFeesReport
* @brief class representing the commission and fees generated by an execution.
* @sa Execution
*/
public class CommissionAndFeesReport
{
/**
* @brief the execution's id this commission and fees belongs to.
*/
public string ExecId { get; set; }
/**
* @brief the commission and fees cost.
*/
public double CommissionAndFees { get; set; }
/**
* @brief the reporting currency.
*/
public string Currency { get; set; }
/**
* @brief the realized profit and loss
*/
public double RealizedPNL { get; set; }
/**
* @brief The income return.
*/
public double Yield { get; set; }
/**
* @brief date expressed in yyyymmdd format.
*/
public int YieldRedemptionDate { get; set; }
public CommissionAndFeesReport()
{
CommissionAndFees = 0;
RealizedPNL = 0;
Yield = 0;
YieldRedemptionDate = 0;
}
public override bool Equals(object p_other)
{
bool l_bRetVal;
if (!(p_other is CommissionAndFeesReport l_theOther))
{
l_bRetVal = false;
}
else if (this == p_other)
{
l_bRetVal = true;
}
else
{
l_bRetVal = ExecId.Equals(l_theOther.ExecId, System.StringComparison.Ordinal);
}
return l_bRetVal;
}
public override int GetHashCode()
{
var hashCode = 662669467;
hashCode *= -1521134295 + EqualityComparer<string>.Default.GetHashCode(ExecId);
hashCode *= -1521134295 + CommissionAndFees.GetHashCode();
hashCode *= -1521134295 + EqualityComparer<string>.Default.GetHashCode(Currency);
hashCode *= -1521134295 + RealizedPNL.GetHashCode();
hashCode *= -1521134295 + Yield.GetHashCode();
hashCode *= -1521134295 + YieldRedemptionDate.GetHashCode();
return hashCode;
}
}
}