Skip to content

Commit

Permalink
Prepare release 7.1.0-beta3 of Extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegRa committed Apr 28, 2024
1 parent 476e681 commit c3b469a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Alpaca.Markets.Extensions.Tests/AlpacaTradingClientTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using System.Diagnostics.CodeAnalysis;

namespace Alpaca.Markets.Extensions.Tests;

[Collection("MockEnvironment")]
[SuppressMessage("Usage", "xUnit1047:Avoid using TheoryDataRow arguments that might not be serializable")]
public sealed class AlpacaTradingClientTest(
MockClientsFactoryFixture mockClientsFactory)
{
Expand Down
8 changes: 4 additions & 4 deletions Alpaca.Markets.Extensions/Alpaca.Markets.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
</PropertyGroup>

<PropertyGroup>
<AssemblyVersion>7.1.0.1</AssemblyVersion>
<FileVersion>7.1.0.1</FileVersion>
<Version>7.1.0-beta2</Version>
<AssemblyVersion>7.1.0.2</AssemblyVersion>
<FileVersion>7.1.0.2</FileVersion>
<Version>7.1.0-beta3</Version>
</PropertyGroup>

<PropertyGroup>
<PackageReleaseNotes>
- The `ListOptionContractsAsAsyncEnumerable` extensions method uses page token now.
- Added new methods `GetOptionChainAsyncAsAsyncEnumerable` and `ListSnapshotsAsAsyncEnumerable` into the Extensions package.
</PackageReleaseNotes>
<Description>C# SDK for Alpaca Trade API https://docs.alpaca.markets/</Description>
<RepositoryUrl>https://github.com/alpacahq/alpaca-trade-api-csharp</RepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private static OptionSnapshotRequest getRequestWithoutPageToken(
OptionSnapshotRequest request) =>
new(request.Symbols)
{
//Pagination = { Size = Pagination.MaxPageSize },
Pagination = { Size = request.Pagination.Size },
OptionsFeed = request.OptionsFeed
};

Expand Down Expand Up @@ -172,7 +172,7 @@ private static OptionChainRequest getRequestWithoutPageToken(
StrikePriceGreaterThanOrEqualTo = request.StrikePriceGreaterThanOrEqualTo,
StrikePriceLessThanOrEqualTo = request.StrikePriceLessThanOrEqualTo,
ExpirationDateEqualTo = request.ExpirationDateEqualTo,
Pagination = { Size = Pagination.MaxPageSize },
Pagination = { Size = request.Pagination.Size },
OptionType = request.OptionType,
RootSymbol = request.RootSymbol
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private static OptionContractsRequest getRequestForFirstPage(
StrikePriceGreaterThanOrEqualTo = request.StrikePriceGreaterThanOrEqualTo,
StrikePriceLessThanOrEqualTo = request.StrikePriceLessThanOrEqualTo,
ExpirationDateEqualTo = request.ExpirationDateEqualTo,
Pagination = { Size = Pagination.MaxPageSize },
Pagination = { Size = request.Pagination.Size },
AssetStatus = request.AssetStatus,
OptionStyle = request.OptionStyle,
OptionType = request.OptionType,
Expand Down
2 changes: 1 addition & 1 deletion Alpaca.Markets/Helpers/HttpClientExtensions.Get.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static async Task<IReadOnlyDictionary<String, TValueApi>> GetAsync
uriBuilder, rateLimitHandler, cancellationToken)
.ConfigureAwait(false)), elementSelector, StringComparer.Ordinal);

private static IReadOnlyDictionary<TKeyApi, TValueApi> getReadOnlyDictionary<TKeyApi, TValueApi, TKeyJson, TValueJson>(
private static Dictionary<TKeyApi, TValueApi> getReadOnlyDictionary<TKeyApi, TValueApi, TKeyJson, TValueJson>(
Dictionary<TKeyJson, TValueJson> response,
Func<KeyValuePair<TKeyJson, TValueJson>, TValueApi> elementSelector,
IEqualityComparer<TKeyApi> comparer)
Expand Down
2 changes: 1 addition & 1 deletion Alpaca.Markets/Messages/JsonOptionSnapshotsData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal sealed class JsonOptionsSnapshotData : IDictionaryPage<IOptionSnapshot>
{
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[JsonProperty(PropertyName = "snapshots", Required = Required.Default)]
public Dictionary<String, JsonOptionSnapshot> ItemsList { get; [ExcludeFromCodeCoverage] set; } = new();
public Dictionary<String, JsonOptionSnapshot> ItemsList { get; [ExcludeFromCodeCoverage] set; } = [];

[JsonProperty(PropertyName = "next_page_token", Required = Required.Default)]
public String? NextPageToken { get; set; }
Expand Down

0 comments on commit c3b469a

Please sign in to comment.