From f6bde3f0a3be75de42d1e64daa5b60d2f53d8283 Mon Sep 17 00:00:00 2001 From: Zizheng Zhang <92221220+Chacoon3@users.noreply.github.com> Date: Sun, 10 Nov 2024 12:27:54 -0500 Subject: [PATCH] adding a previously unmapped activity type (#765) * adding a previously unmapped activity type * Fixed compilation issues before merging changes to the origin repository. --------- Co-authored-by: Oleg Rakhmatulin (cherry picked from commit 30af5fd30735ffeebcbbb2c88a82a9cc268e5f24) --- Alpaca.Markets/Alpaca.Markets.csproj | 2 +- Alpaca.Markets/CompatibilitySuppressions.xml | 189 +++---------------- Alpaca.Markets/Enums/AccountActivityType.cs | 9 + Alpaca.Markets/PublicAPI.Shipped.txt | 5 +- 4 files changed, 41 insertions(+), 164 deletions(-) diff --git a/Alpaca.Markets/Alpaca.Markets.csproj b/Alpaca.Markets/Alpaca.Markets.csproj index 74d1dd99..b98593d0 100644 --- a/Alpaca.Markets/Alpaca.Markets.csproj +++ b/Alpaca.Markets/Alpaca.Markets.csproj @@ -49,7 +49,7 @@ true - 7.0.0 + 7.1.0 true true AllEnabledByDefault diff --git a/Alpaca.Markets/CompatibilitySuppressions.xml b/Alpaca.Markets/CompatibilitySuppressions.xml index 32eebfaf..f0ae7013 100644 --- a/Alpaca.Markets/CompatibilitySuppressions.xml +++ b/Alpaca.Markets/CompatibilitySuppressions.xml @@ -2,204 +2,71 @@ - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.ExerciseOptionsPositionByIdAsync(System.Guid,System.Threading.CancellationToken) - lib/net6.0/Alpaca.Markets.dll - lib/net6.0/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.ExerciseOptionsPositionBySymbolAsync(System.String,System.Threading.CancellationToken) - lib/net6.0/Alpaca.Markets.dll - lib/net6.0/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.GetOptionContractByIdAsync(System.Guid,System.Threading.CancellationToken) - lib/net6.0/Alpaca.Markets.dll - lib/net6.0/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.GetOptionContractBySymbolAsync(System.String,System.Threading.CancellationToken) - lib/net6.0/Alpaca.Markets.dll - lib/net6.0/Alpaca.Markets.dll - true + CP0008 + T:Alpaca.Markets.RequestValidationException + lib/netstandard2.0/Alpaca.Markets.dll + lib/net462/Alpaca.Markets.dll - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.ListOptionContractsAsync(Alpaca.Markets.OptionContractsRequest,System.Threading.CancellationToken) - lib/net6.0/Alpaca.Markets.dll - lib/net6.0/Alpaca.Markets.dll - true + CP0008 + T:Alpaca.Markets.RestClientErrorException + lib/netstandard2.0/Alpaca.Markets.dll + lib/net462/Alpaca.Markets.dll - CP0006 - P:Alpaca.Markets.IAccount.OptionsApprovedLevel - lib/net6.0/Alpaca.Markets.dll - lib/net6.0/Alpaca.Markets.dll + CP0011 + F:Alpaca.Markets.AccountActivityType.CryptoFee + lib/net462/Alpaca.Markets.dll + lib/net462/Alpaca.Markets.dll true - CP0006 - P:Alpaca.Markets.IAccount.OptionsBuyingPower - lib/net6.0/Alpaca.Markets.dll - lib/net6.0/Alpaca.Markets.dll + CP0011 + F:Alpaca.Markets.AccountActivityType.FeeInUsd + lib/net462/Alpaca.Markets.dll + lib/net462/Alpaca.Markets.dll true - CP0006 - P:Alpaca.Markets.IAccount.OptionsTradingLevel + CP0011 + F:Alpaca.Markets.AccountActivityType.CryptoFee lib/net6.0/Alpaca.Markets.dll lib/net6.0/Alpaca.Markets.dll true - CP0006 - P:Alpaca.Markets.IAccountConfiguration.MaxOptionsTradingLevel + CP0011 + F:Alpaca.Markets.AccountActivityType.FeeInUsd lib/net6.0/Alpaca.Markets.dll lib/net6.0/Alpaca.Markets.dll true - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.ExerciseOptionsPositionByIdAsync(System.Guid,System.Threading.CancellationToken) - lib/netstandard2.0/Alpaca.Markets.dll - lib/netstandard2.0/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.ExerciseOptionsPositionBySymbolAsync(System.String,System.Threading.CancellationToken) - lib/netstandard2.0/Alpaca.Markets.dll - lib/netstandard2.0/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.GetOptionContractByIdAsync(System.Guid,System.Threading.CancellationToken) + CP0011 + F:Alpaca.Markets.AccountActivityType.CryptoFee lib/netstandard2.0/Alpaca.Markets.dll lib/netstandard2.0/Alpaca.Markets.dll true - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.GetOptionContractBySymbolAsync(System.String,System.Threading.CancellationToken) + CP0011 + F:Alpaca.Markets.AccountActivityType.FeeInUsd lib/netstandard2.0/Alpaca.Markets.dll lib/netstandard2.0/Alpaca.Markets.dll true - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.ListOptionContractsAsync(Alpaca.Markets.OptionContractsRequest,System.Threading.CancellationToken) - lib/netstandard2.0/Alpaca.Markets.dll - lib/netstandard2.0/Alpaca.Markets.dll - true - - - CP0006 - P:Alpaca.Markets.IAccount.OptionsApprovedLevel - lib/netstandard2.0/Alpaca.Markets.dll - lib/netstandard2.0/Alpaca.Markets.dll - true - - - CP0006 - P:Alpaca.Markets.IAccount.OptionsBuyingPower - lib/netstandard2.0/Alpaca.Markets.dll - lib/netstandard2.0/Alpaca.Markets.dll - true - - - CP0006 - P:Alpaca.Markets.IAccount.OptionsTradingLevel - lib/netstandard2.0/Alpaca.Markets.dll - lib/netstandard2.0/Alpaca.Markets.dll - true - - - CP0006 - P:Alpaca.Markets.IAccountConfiguration.MaxOptionsTradingLevel - lib/netstandard2.0/Alpaca.Markets.dll - lib/netstandard2.0/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.ExerciseOptionsPositionByIdAsync(System.Guid,System.Threading.CancellationToken) - lib/netstandard2.1/Alpaca.Markets.dll - lib/netstandard2.1/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.ExerciseOptionsPositionBySymbolAsync(System.String,System.Threading.CancellationToken) - lib/netstandard2.1/Alpaca.Markets.dll - lib/netstandard2.1/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.GetOptionContractByIdAsync(System.Guid,System.Threading.CancellationToken) - lib/netstandard2.1/Alpaca.Markets.dll - lib/netstandard2.1/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.GetOptionContractBySymbolAsync(System.String,System.Threading.CancellationToken) - lib/netstandard2.1/Alpaca.Markets.dll - lib/netstandard2.1/Alpaca.Markets.dll - true - - - CP0006 - M:Alpaca.Markets.IAlpacaTradingClient.ListOptionContractsAsync(Alpaca.Markets.OptionContractsRequest,System.Threading.CancellationToken) - lib/netstandard2.1/Alpaca.Markets.dll - lib/netstandard2.1/Alpaca.Markets.dll - true - - - CP0006 - P:Alpaca.Markets.IAccount.OptionsApprovedLevel + CP0011 + F:Alpaca.Markets.AccountActivityType.CryptoFee lib/netstandard2.1/Alpaca.Markets.dll lib/netstandard2.1/Alpaca.Markets.dll true - CP0006 - P:Alpaca.Markets.IAccount.OptionsBuyingPower + CP0011 + F:Alpaca.Markets.AccountActivityType.FeeInUsd lib/netstandard2.1/Alpaca.Markets.dll lib/netstandard2.1/Alpaca.Markets.dll true - - CP0006 - P:Alpaca.Markets.IAccount.OptionsTradingLevel - lib/netstandard2.1/Alpaca.Markets.dll - lib/netstandard2.1/Alpaca.Markets.dll - true - - - CP0006 - P:Alpaca.Markets.IAccountConfiguration.MaxOptionsTradingLevel - lib/netstandard2.1/Alpaca.Markets.dll - lib/netstandard2.1/Alpaca.Markets.dll - true - - - CP0008 - T:Alpaca.Markets.RequestValidationException - lib/netstandard2.0/Alpaca.Markets.dll - lib/net462/Alpaca.Markets.dll - - - CP0008 - T:Alpaca.Markets.RestClientErrorException - lib/netstandard2.0/Alpaca.Markets.dll - lib/net462/Alpaca.Markets.dll - \ No newline at end of file diff --git a/Alpaca.Markets/Enums/AccountActivityType.cs b/Alpaca.Markets/Enums/AccountActivityType.cs index 5937aa13..7bb26653 100644 --- a/Alpaca.Markets/Enums/AccountActivityType.cs +++ b/Alpaca.Markets/Enums/AccountActivityType.cs @@ -8,6 +8,8 @@ [SuppressMessage("ReSharper", "IdentifierTypo")] [SuppressMessage("ReSharper", "StringLiteralTypo")] [SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("Design", "CA1027:Mark enums with FlagsAttribute", + Justification = "This enum is not flags-based so we shouldn't mark it with this attribute.")] public enum AccountActivityType { /// @@ -250,6 +252,13 @@ public enum AccountActivityType [EnumMember(Value = "OPXRC")] OptionExercise, + /// + /// Option trade + /// + [UsedImplicitly] + [EnumMember(Value = "OPTRD")] + OptionTrade, + /// /// Fee denominated in USD /// diff --git a/Alpaca.Markets/PublicAPI.Shipped.txt b/Alpaca.Markets/PublicAPI.Shipped.txt index 8598c6b6..f88884e6 100644 --- a/Alpaca.Markets/PublicAPI.Shipped.txt +++ b/Alpaca.Markets/PublicAPI.Shipped.txt @@ -21,7 +21,7 @@ Alpaca.Markets.AccountActivityType.ACATCash = 3 -> Alpaca.Markets.AccountActivit Alpaca.Markets.AccountActivityType.ACATSecurities = 4 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.CashDeposit = 5 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.CashWithdrawal = 6 -> Alpaca.Markets.AccountActivityType -Alpaca.Markets.AccountActivityType.CryptoFee = 35 -> Alpaca.Markets.AccountActivityType +Alpaca.Markets.AccountActivityType.CryptoFee = 36 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.Dividend = 7 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.DividendCapitalGainsLongTerm = 8 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.DividendCapitalGainsShortTerm = 9 -> Alpaca.Markets.AccountActivityType @@ -31,7 +31,7 @@ Alpaca.Markets.AccountActivityType.DividendNRAWithheld = 12 -> Alpaca.Markets.Ac Alpaca.Markets.AccountActivityType.DividendReturnOfCapital = 13 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.DividendTaxExempt = 15 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.DividendTefraWithheld = 14 -> Alpaca.Markets.AccountActivityType -Alpaca.Markets.AccountActivityType.FeeInUsd = 34 -> Alpaca.Markets.AccountActivityType +Alpaca.Markets.AccountActivityType.FeeInUsd = 35 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.Fill = 0 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.Interest = 16 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.InterestNRAWithheld = 17 -> Alpaca.Markets.AccountActivityType @@ -45,6 +45,7 @@ Alpaca.Markets.AccountActivityType.NameChange = 23 -> Alpaca.Markets.AccountActi Alpaca.Markets.AccountActivityType.OptionAssignment = 31 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.OptionExercise = 33 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.OptionExpiration = 32 -> Alpaca.Markets.AccountActivityType +Alpaca.Markets.AccountActivityType.OptionTrade = 34 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.PassThruCharge = 24 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.PassThruRebate = 25 -> Alpaca.Markets.AccountActivityType Alpaca.Markets.AccountActivityType.RefTafFee = 30 -> Alpaca.Markets.AccountActivityType