Open saniales opened 5 years ago
UPDATE: the same problem seem to be encountered also by subscribing to orderbook
[0.001642 2 54.01921392]
[0.0016403 1 101.73380781]
[0.0016402 1 70]
[0.0016401 1 1]
[0.00164 3 5.425]
[0.001639 1 10]
[0.0016387 1 235]
[0.0016386 1 5.66773013]
[0.0016384 1 2539.999]
[0.001638 1 20]
[0.0016376 1 60.99420555]
[0.0016372 1 30]
[0.0016371 2 69.10058896]
[0.0016369 1 24.750402]
[0.0016366 2 182.96402085]
[0.0016358 1 273.4215416]
[0.0016356 4 769.83048073]
[0.0016355 1 304.83379453]
[0.0016354 1 49.48639335]
[0.0016353 1 100]
[0.0016351 3 427.08876288]
[0.001635 2 184.29517357]
[0.0016347 2 527.3700244]
[0.0016346 1 487.9536444]
[0.0016341 1 487.99233852]
[0.0016421 5 -142.29863851]
[0.0016423 1 -60.9570253]
[0.0016426 1 -304.83513425]
[0.0016428 1 -1.1]
[0.0016429 1 -61.00220523]
[0.001643 1 -240.34083171]
[0.0016431 1 -121.99808464]
[0.0016432 1 -30]
[0.0016433 2 -487.8986083]
[0.0016438 1 -32]
[0.0016442 1 -160]
[0.0016444 1 -243.74449125]
[0.0016446 1 -488.06676754]
[0.0016456 1 -107.6299756]
[0.0016457 1 -18.2940773]
[0.0016463 1 -243.71745655]
[0.0016465 1 -243.99616927]
[0.0016467 2 -35.49551]
[0.0016468 1 -18.16454]
[0.0016469 1 -95]
[0.0016477 2 -35.80481024]
[0.0016481 1 -2539.999]
[0.0016486 1 -100]
[0.0016489 1 -350]
[0.0016497 1 -12]
[0.0016423 2 -123.1270253]
[-123.1270253]
so i suggest to revise this piece of code
// from
func (w *WebSocketService) handleDataMessage(msg []byte) {
// ...
else {
itemsSlice := fullPayload[1]
i, _ := json.Marshal(itemsSlice)
var items [][]float64
err = json.Unmarshal(i, &items)
if err == nil {
chanID := fullPayload[0].(float64)
for _, v := range items {
w.chanMap[chanID] <- v
}
}
//...
}
I signal here that using websocket to retrieve data (V1) something strange happens
Here the output
Let's take first couple of lines
The first two elements of the array (got from the channel) are missing the call of
handleDataMessage
in the library fills the channel twice, and removes the first two elements the second time it pushes into the chan.Please solve this or explain if this is a normal behaviour, thanks