Kucoin: Change default websocket subscription channel for tickers and orderbooks (#1371)

* kucoin: quick batching support for ticker/trades and orderbooks

* fix test

* kucoin: move pieces add commentry

* kucoin: optimise listOfAssetsCurrencyPairEnabledFor and refactor implementations, address specific orderbook channel subscription handling

* glorious: nits

* thx @thrasher-: nits addressed

* rm types and tests that are not needed

* rm subs checking code, and convert to types.Number

* not needed anymore

* fix tests

* set up reader routine to process updates before init a potential slow websocket subscriber

* implement glorious suggestion

* glorious: nitters

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
Ryan O'Hara-Reid
2024-03-04 12:05:26 +11:00
committed by GitHub
parent 954aa0239e
commit 32a35b3f52
7 changed files with 197 additions and 119 deletions

View File

@@ -137,12 +137,12 @@ func (m *WebsocketRoutineManager) websocketRoutine() {
wg.Add(1)
go func() {
defer wg.Done()
err = ws.Connect()
err = m.websocketDataReceiver(ws)
if err != nil {
log.Errorf(log.WebsocketMgr, "%v", err)
}
err = m.websocketDataReceiver(ws)
err = ws.Connect()
if err != nil {
log.Errorf(log.WebsocketMgr, "%v", err)
}