Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with IB flex report 2021/10 state. #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 102 additions & 9 deletions IbFlexReader/IbFlexReader.Contracts/Enums/Currencies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,113 @@
{
public enum Currencies
{
EUR,
USD,
JPY,
CHF,
GBP,
NZD,
AFN,
ARS,
AWG,
AUD,
AZN,
BSD,
BBD,
BYN,
BZD,
BMD,
BOB,
BAM,
BWP,
BGN,
BRL,
BND,
KHR,
CAD,
SEK,
KYD,
CLP,
CNY,
COP,
CRC,
HRK,
CUP,
CZK,
DKK,
DOP,
XCD,
EGP,
SVC,
EUR,
FKP,
FJD,
GHS,
GIP,
GTQ,
GGP,
GYD,
HNL,
HKD,
HUF,
ISK,
INR,
IDR,
IRR,
IMP,
ILS,
JMD,
JPY,
JEP,
KZT,
KPW,
KRW,
KGS,
LAK,
LBP,
LRD,
MKD,
MYR,
MUR,
MXN,
RUB,
MNT,
MZN,
NAD,
NPR,
ANG,
NZD,
NIO,
NGN,
NOK,
OMR,
PKR,
PAB,
PYG,
PEN,
PHP,
PLN,
QAR,
RON,
RUB,
SHP,
SAR,
RSD,
SCR,
SGD,
SBD,
SOS,
ZAR,
SGD
LKR,
SEK,
CHF,
SRD,
SYP,
TWD,
THB,
TTD,
TRY,
TVD,
UAH,
GBP,
USD,
UYU,
UZS,
VEF,
VND,
YER,
ZWD,
}
}
1 change: 1 addition & 0 deletions IbFlexReader/IbFlexReader.Contracts/FlexQueryResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ public class FlexQueryResponse
public string Type { get; set; }

public List<ErrorMessage> Errors { get; set; }
public string MappingErrors { get; set; }
}
}
4 changes: 4 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/AccountInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,9 @@ public class AccountInformation
public string IbEntity { get; set; }

public string PrimaryEmail { get; set; }

public string AccountRepName { get; set; }

public string AccountRepPhone { get; set; }
}
}
7 changes: 7 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/CashTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,12 @@ public class CashTransaction

[Format(Constants.DateFormat)]
public string SettleDate { get; set; }

public string SerialNumber { get; set; }
public string DeliveryType { get; set; }
public string CommodityType { get; set; }
public string Fineness { get; set; }
public string Weight { get; set; }
public string LevelOfDetail { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,12 @@ public class ChangeInDividendAccrual
public string FromAcct { get; set; }

public string ToAcct { get; set; }

public string SerialNumber { get; set; }
public string DeliveryType { get; set; }
public string CommodityType { get; set; }
public string Fineness { get; set; }
public string Weight { get; set; }
public string LevelOfDetail { get; set; }
}
}
49 changes: 49 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/CorporateAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
namespace IbFlexReader.Contracts.Ib
{
using System.Collections.Generic;

public class CorporateAction
{
public string AccountId { get; set; }
public string AcctAlias { get; set; }
public string Model { get; set; }
public string Currency { get; set; }
public string FxRateToBase { get; set; }
public string AssetCategory { get; set; }
public string Symbol { get; set; }
public string Description { get; set; }
public string Conid { get; set; }
public string SecurityID { get; set; }
public string SecurityIDType { get; set; }
public string Cusip { get; set; }
public string Isin { get; set; }
public string ListingExchange { get; set; }
public string UnderlyingConid { get; set; }
public string UnderlyingSymbol { get; set; }
public string UnderlyingSecurityID { get; set; }
public string UnderlyingListingExchange { get; set; }
public string Issuer { get; set; }
public string Multiplier { get; set; }
public string Strike { get; set; }
public string Expiry { get; set; }
public string PutCall { get; set; }
public string PrincipalAdjustFactor { get; set; }
public string SerialNumber { get; set; }
public string DeliveryType { get; set; }
public string CommodityType { get; set; }
public string Fineness { get; set; }
public string Weight { get; set; }
public string ReportDate { get; set; }
public string DateTime { get; set; }
public string ActionDescription { get; set; }
public string Amount { get; set; }
public string Proceeds { get; set; }
public string Value { get; set; }
public string Quantity { get; set; }
public string FifoPnlRealized { get; set; }
public string MtmPnl { get; set; }
public string Type { get; set; }
public string TransactionID { get; set; }
public string LevelOfDetail { get; set; }
}
}
9 changes: 9 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/CorporateActions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace IbFlexReader.Contracts.Ib
{
using System.Collections.Generic;

public class CorporateActions
{
public List<CorporateAction> CorporateAction { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,13 @@ public class EquitySummaryByReportDateInBase
public double? TotalLong { get; set; }

public double? TotalShort { get; set; }

public string BrokerCashComponent { get; set; }
public string IpoSubscription { get; set; }
public string IpoSubscriptionLong { get; set; }
public string IpoSubscriptionShort { get; set; }
public string BrokerInterestAccrualsComponent { get; set; }
public string BondInterestAccrualsComponent { get; set; }
public string BrokerFeesAccrualsComponent { get; set; }
}
}
5 changes: 4 additions & 1 deletion IbFlexReader/IbFlexReader.Contracts/Ib/FlexStatement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class FlexStatement

public ConversionRates ConversionRates { get; set; }

public string CorporateActions { get; set; }
public CorporateActions CorporateActions { get; set; }

public EquitySummaryInBase EquitySummaryInBase { get; set; }

Expand Down Expand Up @@ -63,5 +63,8 @@ public class FlexStatement

[Format(Constants.DateTimeFormat)]
public DateTime? WhenGenerated { get; set; }

public FxPositions FxPositions { get; set; }
public FxTransactions FxTransactions { get; set; }
}
}
23 changes: 23 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/FxClosedLot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace IbFlexReader.Contracts.Ib
{
using System.Xml.Serialization;

public class FxClosedLot
{
public string AccountId { get; set; }
public string AcctAlias { get; set; }
public string Model { get; set; }
public string AssetCategory { get; set; }
public string ReportDate { get; set; }
public string FunctionalCurrency { get; set; }
public string FxCurrency { get; set; }
public string ActivityDescription { get; set; }
public string DateTime { get; set; }
public double? Quantity { get; set; }
public double? Proceeds { get; set; }
public double? Cost { get; set; }
public double? RealizedPL { get; set; }
public string Code { get; set; }
public string LevelOfDetail { get; set; }
}
}
10 changes: 10 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/FxClosedLots.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace IbFlexReader.Contracts.Ib
{
using System.Collections.Generic;
using System.Xml.Serialization;

public class FxClosedLots
{
public List<FxClosedLot> FxClosedLot { get; set; }
}
}
25 changes: 25 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/FxLot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace IbFlexReader.Contracts.Ib
{
using System.Xml.Serialization;

public class FxLot
{
public string AccountId { get; set; }
public string AcctAlias { get; set; }
public string Model { get; set; }
public string AssetCategory { get; set; }
public string ReportDate { get; set; }
public string FunctionalCurrency { get; set; }
public string FxCurrency { get; set; }
public double? Quantity { get; set; }
public double? CostPrice { get; set; }
public double? CostBasis { get; set; }
public double? ClosePrice { get; set; }
public double? Value { get; set; }
public double? UnrealizedPL { get; set; }
public string Code { get; set; }
public string LotDescription { get; set; }
public string LotOpenDateTime { get; set; }
public string LevelOfDetail { get; set; }
}
}
10 changes: 10 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/FxLots.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace IbFlexReader.Contracts.Ib
{
using System.Collections.Generic;
using System.Xml.Serialization;

public class FxLots
{
public List<FxLot> FxLot { get; set; }
}
}
25 changes: 25 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/FxPosition.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace IbFlexReader.Contracts.Ib
{
using System.Xml.Serialization;

public class FxPosition
{
public string AccountId { get; set; }
public string AcctAlias { get; set; }
public string Model { get; set; }
public string AssetCategory { get; set; }
public string ReportDate { get; set; }
public string FunctionalCurrency { get; set; }
public string FxCurrency { get; set; }
public double? Quantity { get; set; }
public double? CostPrice { get; set; }
public double? CostBasis { get; set; }
public double? ClosePrice { get; set; }
public double? Value { get; set; }
public double? UnrealizedPL { get; set; }
public string Code { get; set; }
public string LotDescription { get; set; }
public string LotOpenDateTime { get; set; }
public string LevelOfDetail { get; set; }
}
}
11 changes: 11 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/FxPositions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace IbFlexReader.Contracts.Ib
{
using System.Collections.Generic;
using System.Xml.Serialization;

public class FxPositions
{
public List<FxPosition> FxPosition { get; set; }
public FxLots FxLots { get; set; }
}
}
24 changes: 24 additions & 0 deletions IbFlexReader/IbFlexReader.Contracts/Ib/FxTransaction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace IbFlexReader.Contracts.Ib
{
using System;
using System.Xml.Serialization;

public class FxTransaction
{
public string AccountId { get; set; }
public string AcctAlias { get; set; }
public string Model { get; set; }
public string AssetCategory { get; set; }
public string ReportDate { get; set; }
public string FunctionalCurrency { get; set; }
public string FxCurrency { get; set; }
public string ActivityDescription { get; set; }
public string DateTime { get; set; }
public double? Quantity { get; set; }
public double? Proceeds { get; set; }
public double? Cost { get; set; }
public double? RealizedPL { get; set; }
public string Code { get; set; }
public string LevelOfDetail { get; set; }
}
}
Loading