diff --git a/pkg/types/orderbook.go b/pkg/types/orderbook.go index 0134cfbd0..328ebe204 100644 --- a/pkg/types/orderbook.go +++ b/pkg/types/orderbook.go @@ -212,6 +212,10 @@ func (sb *StreamOrderBook) updateMetrics(t time.Time) { } func (sb *StreamOrderBook) BindStream(stream Stream) { + stream.OnDisconnect(func() { + sb.Reset() + }) + stream.OnBookSnapshot(func(book SliceOrderBook) { if sb.MutexOrderBook.Symbol != book.Symbol { return