Skip to content

Commit

Permalink
Updated CryptoExchange.Net version, added Type property to CoinExExch…
Browse files Browse the repository at this point in the history
…ange class
  • Loading branch information
JKorf committed Jan 7, 2025
1 parent f94c622 commit 8054faf
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CoinEx.Net.UnitTests/JsonToObjectComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async Task ProcessSubject<K>(
}

var buffer = new byte[file.Length];
await file.ReadAsync(buffer, 0, buffer.Length);
_ = await file.ReadAsync(buffer, 0, buffer.Length);
file.Close();

var json = Encoding.UTF8.GetString(buffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ internal async Task<WebCallResult<CoinExPaginated<T>>> ExecutePaginatedAsync<T>(
#endregion

/// <inheritdoc />
protected override ServerError? TryParseError(IMessageAccessor accessor)
protected override Error? TryParseError(IEnumerable<KeyValuePair<string, IEnumerable<string>>> responseHeaders, IMessageAccessor accessor)
{
if (!accessor.IsJson)
return new ServerError(accessor.GetOriginalString());
Expand Down
2 changes: 1 addition & 1 deletion CoinEx.Net/Clients/SpotApiV2/CoinExRestClientSpotApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ private static KlineInterval GetKlineIntervalFromTimespan(TimeSpan timeSpan)
#endregion

/// <inheritdoc />
protected override ServerError? TryParseError(IMessageAccessor accessor)
protected override Error? TryParseError(IEnumerable<KeyValuePair<string, IEnumerable<string>>> responseHeaders, IMessageAccessor accessor)
{
if (!accessor.IsJson)
return new ServerError(accessor.GetOriginalString());
Expand Down
2 changes: 1 addition & 1 deletion CoinEx.Net/CoinEx.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Crc32.NET" Version="1.2.0" />
<PackageReference Include="CryptoExchange.Net" Version="8.5.0" />
<PackageReference Include="CryptoExchange.Net" Version="8.6.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
9 changes: 7 additions & 2 deletions CoinEx.Net/CoinEx.Net.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions CoinEx.Net/CoinExExchange.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CryptoExchange.Net;
using CryptoExchange.Net.Objects;
using CryptoExchange.Net.SharedApis;
using System;

Expand Down Expand Up @@ -37,6 +38,11 @@ public static class CoinExExchange
"https://docs.coinex.com/api/v2/"
};

/// <summary>
/// Type of exchange
/// </summary>
public static ExchangeType Type { get; } = ExchangeType.CEX;

internal const string ClientOrderId = "x-147866029-";
internal const string ClientOrderIdPrefix = ClientOrderId + LibraryHelpers.ClientOrderIdSeperator;

Expand Down

0 comments on commit 8054faf

Please sign in to comment.