Skip to content

Commit

Permalink
Feature/cc upd (#9)
Browse files Browse the repository at this point in the history
Updated CryptoExchange.Net, fixed response checking listenkey operations
  • Loading branch information
JKorf authored Jun 23, 2024
1 parent ac7ee57 commit 6a58b46
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Mexc.Net/Clients/SpotApi/MexcRestClientSpotApiAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ public async Task<WebCallResult> KeepAliveUserStreamAsync(string listenKey, Canc
};

var result = await _baseClient.SendRequestInternal<MexcResult>("/api/v3/userDataStream", HttpMethod.Put, ct, parameters, signed: true).ConfigureAwait(false);
if (!result)
return result.AsDataless();

if (result.Data.Code != 0)
return result.AsDatalessError(new ServerError(result.Data.Code, result.Data.Message!));

Expand All @@ -331,6 +334,9 @@ public async Task<WebCallResult> StopUserStreamAsync(string listenKey, Cancellat
};

var result = await _baseClient.SendRequestInternal<MexcResult>("/api/v3/userDataStream", HttpMethod.Delete, ct, parameters, signed: true).ConfigureAwait(false);
if (!result)
return result.AsDataless();

if (result.Data.Code != 0)
return result.AsDatalessError(new ServerError(result.Data.Code, result.Data.Message!));

Expand Down
2 changes: 1 addition & 1 deletion Mexc.Net/Clients/SpotApi/MexcSocketClientSpotApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public async Task<CallResult<UpdateSubscription>> SubscribeToUserTradeUpdatesAsy
}

/// <inheritdoc />
protected override Query? GetAuthenticationRequest() => null;
protected override Query? GetAuthenticationRequest(SocketConnection connection) => null;

private static string GetIntervalString(KlineInterval interval)
=> interval switch
Expand Down
2 changes: 1 addition & 1 deletion Mexc.Net/Mexc.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CryptoExchange.Net" Version="7.6.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CryptoExchange.Net" Version="7.7.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Mexc.Net/Mexc.Net.xml

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

0 comments on commit 6a58b46

Please sign in to comment.