diff --git a/CryptoExchange.Net/Sockets/Query.cs b/CryptoExchange.Net/Sockets/Query.cs
index c024fb3..9357a33 100644
--- a/CryptoExchange.Net/Sockets/Query.cs
+++ b/CryptoExchange.Net/Sockets/Query.cs
@@ -79,6 +79,11 @@ namespace CryptoExchange.Net.Sockets
///
public int Weight { get; }
+ ///
+ /// Whether the query should wait for a response or not
+ ///
+ public bool ExpectsResponse { get; set; } = true;
+
///
/// Get the type the message should be deserialized to
///
@@ -116,10 +121,19 @@ namespace CryptoExchange.Net.Sockets
///
public void IsSend(TimeSpan timeout)
{
- // Start timeout countdown
RequestTimestamp = DateTime.UtcNow;
- _cts = new CancellationTokenSource(timeout);
- _cts.Token.Register(Timeout, false);
+ if (ExpectsResponse)
+ {
+ // Start timeout countdown
+ _cts = new CancellationTokenSource(timeout);
+ _cts.Token.Register(Timeout, false);
+ }
+ else
+ {
+ Completed = true;
+ Result = CallResult.SuccessResult;
+ _event.Set();
+ }
}
///