diff --git a/Alpaca.Markets/Alpaca.Markets.csproj b/Alpaca.Markets/Alpaca.Markets.csproj index f95c8dc1..64def21b 100644 --- a/Alpaca.Markets/Alpaca.Markets.csproj +++ b/Alpaca.Markets/Alpaca.Markets.csproj @@ -12,17 +12,17 @@ - 7.1.0.1 - 7.1.0.1 - 7.1.0-beta2 + 7.1.0.2 + 7.1.0.2 + 7.1.0-beta3 -- The `OptionsContractRequest.UnderlyingSymbol` mandatory property was replaced with the `OptionsContractRequest.UnderlyingSymbols` optional property. -- The `IAlpacaTradingClient` interface was extended with the `ExerciseOptionsContractByIdAsync` and `ExerciseOptionsContractBySymbolAsync` methods. -- The `IAlpacaTradingClient.ListOptionContractAsync` method now uses a same pagination logic as historical data. -- The `OptionFeed` enum added and now it can be specified for latest/snapshot requests. +- Added support for the new portfolio history endpoint using the existing `IAlpacaTradingClient.GetPortfolioHistoryAsync` method. +- The `OptionChainRequest` class extended with new (optional) filtering properties and initial client-side validation. +- The new `OptionSnapshotRequest` class added and used for the `ListSnapshotsAsync` method (breaking change). +- The new `IOptionSnapshot` interface with Greeks and IV added and used instead of `ISnapshot` for options. C# SDK for Alpaca Trade API https://docs.alpaca.markets/ https://github.com/alpacahq/alpaca-trade-api-csharp diff --git a/Alpaca.Markets/PublicAPI.Shipped.txt b/Alpaca.Markets/PublicAPI.Shipped.txt index 1c50ca05..c8765edb 100644 --- a/Alpaca.Markets/PublicAPI.Shipped.txt +++ b/Alpaca.Markets/PublicAPI.Shipped.txt @@ -491,9 +491,11 @@ Alpaca.Markets.IAlpacaNewsStreamingClient Alpaca.Markets.IAlpacaNewsStreamingClient.GetNewsSubscription() -> Alpaca.Markets.IAlpacaDataSubscription! Alpaca.Markets.IAlpacaNewsStreamingClient.GetNewsSubscription(string! symbol) -> Alpaca.Markets.IAlpacaDataSubscription! Alpaca.Markets.IAlpacaOptionsDataClient +Alpaca.Markets.IAlpacaOptionsDataClient.GetOptionChainAsync(Alpaca.Markets.OptionChainRequest! request, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! Alpaca.Markets.IAlpacaOptionsDataClient.ListExchangesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! Alpaca.Markets.IAlpacaOptionsDataClient.ListLatestQuotesAsync(Alpaca.Markets.LatestOptionsDataRequest! request, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! Alpaca.Markets.IAlpacaOptionsDataClient.ListLatestTradesAsync(Alpaca.Markets.LatestOptionsDataRequest! request, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! +Alpaca.Markets.IAlpacaOptionsDataClient.ListSnapshotsAsync(Alpaca.Markets.OptionSnapshotRequest! request, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! Alpaca.Markets.IAlpacaScreenerClient Alpaca.Markets.IAlpacaScreenerClient.GetTopMarketMoversAsync(int? numberOfLosersAndGainersInResponse = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! Alpaca.Markets.IAlpacaStreamingClient @@ -606,6 +608,9 @@ Alpaca.Markets.IClock.TimestampUtc.get -> System.DateTime Alpaca.Markets.ICorrection Alpaca.Markets.ICorrection.CorrectedTrade.get -> Alpaca.Markets.ITrade! Alpaca.Markets.ICorrection.OriginalTrade.get -> Alpaca.Markets.ITrade! +Alpaca.Markets.IDictionaryPage +Alpaca.Markets.IDictionaryPage.Items.get -> System.Collections.Generic.IReadOnlyDictionary! +Alpaca.Markets.IDictionaryPage.NextPageToken.get -> string? Alpaca.Markets.IEnvironment Alpaca.Markets.IEnvironment.AlpacaCryptoStreamingApi.get -> System.Uri! Alpaca.Markets.IEnvironment.AlpacaDataApi.get -> System.Uri! @@ -621,6 +626,12 @@ Alpaca.Markets.IErrorInformation.OpenOrdersCount.get -> int? Alpaca.Markets.IErrorInformation.Symbol.get -> string! Alpaca.Markets.IExclusiveTimeInterval Alpaca.Markets.IInclusiveTimeInterval +Alpaca.Markets.IGreeks +Alpaca.Markets.IGreeks.Delta.get -> decimal? +Alpaca.Markets.IGreeks.Gamma.get -> decimal? +Alpaca.Markets.IGreeks.Rho.get -> decimal? +Alpaca.Markets.IGreeks.Theta.get -> decimal? +Alpaca.Markets.IGreeks.Vega.get -> decimal? Alpaca.Markets.IIntervalCalendar Alpaca.Markets.IIntervalCalendar.Session.get -> Alpaca.Markets.OpenClose Alpaca.Markets.IIntervalCalendar.Trading.get -> Alpaca.Markets.OpenClose @@ -706,6 +717,12 @@ Alpaca.Markets.IOptionContract.StrikePrice.get -> decimal Alpaca.Markets.IOptionContract.Symbol.get -> string! Alpaca.Markets.IOptionContract.UnderlyingAssetId.get -> System.Guid Alpaca.Markets.IOptionContract.UnderlyingSymbol.get -> string! +Alpaca.Markets.IOptionSnapshot +Alpaca.Markets.IOptionSnapshot.Greeks.get -> Alpaca.Markets.IGreeks? +Alpaca.Markets.IOptionSnapshot.ImpliedVolatility.get -> decimal? +Alpaca.Markets.IOptionSnapshot.Quote.get -> Alpaca.Markets.IQuote? +Alpaca.Markets.IOptionSnapshot.Symbol.get -> string! +Alpaca.Markets.IOptionSnapshot.Trade.get -> Alpaca.Markets.ITrade? Alpaca.Markets.IOrder Alpaca.Markets.IOrder.AssetClass.get -> Alpaca.Markets.AssetClass Alpaca.Markets.IOrder.AssetId.get -> System.Guid @@ -1030,9 +1047,24 @@ Alpaca.Markets.OpenClose.OpenEst.get -> System.DateTimeOffset Alpaca.Markets.OpenClose.OpenEst.init -> void Alpaca.Markets.OpenClose.ToInterval() -> Alpaca.Markets.Interval Alpaca.Markets.OptionChainRequest +Alpaca.Markets.OptionChainRequest.ExpirationDateEqualTo.get -> System.DateOnly? +Alpaca.Markets.OptionChainRequest.ExpirationDateEqualTo.set -> void +Alpaca.Markets.OptionChainRequest.ExpirationDateGreaterThanOrEqualTo.get -> System.DateOnly? +Alpaca.Markets.OptionChainRequest.ExpirationDateGreaterThanOrEqualTo.set -> void +Alpaca.Markets.OptionChainRequest.ExpirationDateLessThanOrEqualTo.get -> System.DateOnly? +Alpaca.Markets.OptionChainRequest.ExpirationDateLessThanOrEqualTo.set -> void Alpaca.Markets.OptionChainRequest.OptionChainRequest(string! underlyingSymbol) -> void Alpaca.Markets.OptionChainRequest.OptionsFeed.get -> Alpaca.Markets.OptionsFeed? Alpaca.Markets.OptionChainRequest.OptionsFeed.set -> void +Alpaca.Markets.OptionChainRequest.OptionType.get -> Alpaca.Markets.OptionType? +Alpaca.Markets.OptionChainRequest.OptionType.set -> void +Alpaca.Markets.OptionChainRequest.Pagination.get -> Alpaca.Markets.Pagination! +Alpaca.Markets.OptionChainRequest.RootSymbol.get -> string? +Alpaca.Markets.OptionChainRequest.RootSymbol.set -> void +Alpaca.Markets.OptionChainRequest.StrikePriceGreaterThanOrEqualTo.get -> decimal? +Alpaca.Markets.OptionChainRequest.StrikePriceGreaterThanOrEqualTo.set -> void +Alpaca.Markets.OptionChainRequest.StrikePriceLessThanOrEqualTo.get -> decimal? +Alpaca.Markets.OptionChainRequest.StrikePriceLessThanOrEqualTo.set -> void Alpaca.Markets.OptionChainRequest.UnderlyingSymbol.get -> string! Alpaca.Markets.OptionContractsRequest Alpaca.Markets.OptionContractsRequest.AssetStatus.get -> Alpaca.Markets.AssetStatus? @@ -1065,6 +1097,11 @@ Alpaca.Markets.OptionsTradingLevel Alpaca.Markets.OptionsTradingLevel.CoveredCallCashSecuredPut = 1 -> Alpaca.Markets.OptionsTradingLevel Alpaca.Markets.OptionsTradingLevel.Disabled = 0 -> Alpaca.Markets.OptionsTradingLevel Alpaca.Markets.OptionsTradingLevel.LongCallPut = 2 -> Alpaca.Markets.OptionsTradingLevel +Alpaca.Markets.OptionSnapshotRequest +Alpaca.Markets.OptionSnapshotRequest.OptionsFeed.get -> Alpaca.Markets.OptionsFeed? +Alpaca.Markets.OptionSnapshotRequest.OptionsFeed.set -> void +Alpaca.Markets.OptionSnapshotRequest.OptionSnapshotRequest(System.Collections.Generic.IEnumerable! symbols) -> void +Alpaca.Markets.OptionSnapshotRequest.Symbols.get -> System.Collections.Generic.IReadOnlyCollection! Alpaca.Markets.OptionStyle Alpaca.Markets.OptionStyle.American = 0 -> Alpaca.Markets.OptionStyle Alpaca.Markets.OptionStyle.European = 1 -> Alpaca.Markets.OptionStyle diff --git a/Alpaca.Markets/PublicAPI.Unshipped.txt b/Alpaca.Markets/PublicAPI.Unshipped.txt index 30b96a7a..ab058de6 100644 --- a/Alpaca.Markets/PublicAPI.Unshipped.txt +++ b/Alpaca.Markets/PublicAPI.Unshipped.txt @@ -1,38 +1 @@ #nullable enable -Alpaca.Markets.IAlpacaOptionsDataClient.GetOptionChainAsync(Alpaca.Markets.OptionChainRequest! request, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -Alpaca.Markets.IAlpacaOptionsDataClient.ListSnapshotsAsync(Alpaca.Markets.OptionSnapshotRequest! request, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -Alpaca.Markets.IDictionaryPage -Alpaca.Markets.IDictionaryPage.Items.get -> System.Collections.Generic.IReadOnlyDictionary! -Alpaca.Markets.IDictionaryPage.NextPageToken.get -> string? -Alpaca.Markets.IGreeks -Alpaca.Markets.IGreeks.Delta.get -> decimal? -Alpaca.Markets.IGreeks.Gamma.get -> decimal? -Alpaca.Markets.IGreeks.Rho.get -> decimal? -Alpaca.Markets.IGreeks.Theta.get -> decimal? -Alpaca.Markets.IGreeks.Vega.get -> decimal? -Alpaca.Markets.IOptionSnapshot -Alpaca.Markets.IOptionSnapshot.Greeks.get -> Alpaca.Markets.IGreeks? -Alpaca.Markets.IOptionSnapshot.ImpliedVolatility.get -> decimal? -Alpaca.Markets.IOptionSnapshot.Quote.get -> Alpaca.Markets.IQuote? -Alpaca.Markets.IOptionSnapshot.Symbol.get -> string! -Alpaca.Markets.IOptionSnapshot.Trade.get -> Alpaca.Markets.ITrade? -Alpaca.Markets.OptionChainRequest.ExpirationDateEqualTo.get -> System.DateOnly? -Alpaca.Markets.OptionChainRequest.ExpirationDateEqualTo.set -> void -Alpaca.Markets.OptionChainRequest.ExpirationDateGreaterThanOrEqualTo.get -> System.DateOnly? -Alpaca.Markets.OptionChainRequest.ExpirationDateGreaterThanOrEqualTo.set -> void -Alpaca.Markets.OptionChainRequest.ExpirationDateLessThanOrEqualTo.get -> System.DateOnly? -Alpaca.Markets.OptionChainRequest.ExpirationDateLessThanOrEqualTo.set -> void -Alpaca.Markets.OptionChainRequest.OptionType.get -> Alpaca.Markets.OptionType? -Alpaca.Markets.OptionChainRequest.OptionType.set -> void -Alpaca.Markets.OptionChainRequest.Pagination.get -> Alpaca.Markets.Pagination! -Alpaca.Markets.OptionChainRequest.RootSymbol.get -> string? -Alpaca.Markets.OptionChainRequest.RootSymbol.set -> void -Alpaca.Markets.OptionChainRequest.StrikePriceGreaterThanOrEqualTo.get -> decimal? -Alpaca.Markets.OptionChainRequest.StrikePriceGreaterThanOrEqualTo.set -> void -Alpaca.Markets.OptionChainRequest.StrikePriceLessThanOrEqualTo.get -> decimal? -Alpaca.Markets.OptionChainRequest.StrikePriceLessThanOrEqualTo.set -> void -Alpaca.Markets.OptionSnapshotRequest -Alpaca.Markets.OptionSnapshotRequest.OptionsFeed.get -> Alpaca.Markets.OptionsFeed? -Alpaca.Markets.OptionSnapshotRequest.OptionsFeed.set -> void -Alpaca.Markets.OptionSnapshotRequest.OptionSnapshotRequest(System.Collections.Generic.IEnumerable! symbols) -> void -Alpaca.Markets.OptionSnapshotRequest.Symbols.get -> System.Collections.Generic.IReadOnlyCollection!