Closed vgpro54321 closed 1 year ago
Qucik workaround (without library mods) causing unhandled 'pong' messages but does keep connection alive.
class KucoinPing
{
[JsonProperty("id")]
public string Id { get; set; } = string.Empty;
[JsonProperty("type")]
public string Type { get; set; } = string.Empty;
}
kucoinSocketClient = new KucoinSocketClient(kucoinOptionsBuilder.GetSocketClientOptions());
kucoinSocketClient.FuturesStreams.SendPeriodic("Ping", TimeSpan.FromSeconds(30), (connection) => new KucoinPing()
{
Id = Math.Round((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds).ToString(CultureInfo.InvariantCulture),
Type = "ping"
});
Has been fixed in the latest version
Hello Guys,
I am noticing that futures socket is disconnecting at 1 minute intervals, disconnect look like initiated by server. I see that Kucoin documentation requires 60 seconds pings but pings are only issued by spot socket client, not by futures client.
I noticed that there is a difference in KucoinSocketClientSpotStreams and KucoinSocketClientFuturesStreams constructors: futures class does not hook up pinging infrastructure.