Closed git-yongge closed 3 months ago
if I have got correct, what you mean. You would start a socket like the code I have shown before. you can send a stopC channel to stop the socket.
wsKlineHandler := func(event *binance.WsKlineEvent) {
fmt.Println(event)
}
errHandler := func(err error) {
fmt.Println(err)
}
doneC, _, err := binance.WsKlineServe("LTCBTC", "1m", wsKlineHandler, errHandler)
if err != nil {
fmt.Println(err)
return
}
<-doneC
Yes, I found out that stopC can be used to stop the socket, but my calling process is that the upper client calls my program, and then I call adshao to get the market data of Binance. If the client needs to stop the push of certain data, then There is no way to stop the last request sent, this is giving me a headache, please help me.
No response for a long time, close this issue
How to subscribe and unsubscribe Binance Data push