mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 07:26:48 +00:00
btcmarkets: Add websocket orderbook checksum validation (#900)
* btcmarkets: add websocket checksum, fetch different book via REST * Update exchanges/btcmarkets/btcmarkets_test.go Co-authored-by: Scott <gloriousCode@users.noreply.github.com> * buffer: add explicit type for buffer related variables and comments, do all checks buffer side and load in setup as per glorious recom. * buffer: fix tests add error * buffer: test re-add code cov * depth/stream/ws: fix tests, change field name to be more specific. * buffer: rm unused field and small comment fixes * btcm: remove redundant field * glorious: nits * buffer: fix commenting Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/protocol"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/request"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/stream"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/stream/buffer"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/ticker"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/trade"
|
||||
"github.com/thrasher-corp/gocryptotrader/log"
|
||||
@@ -173,12 +174,10 @@ func (b *Bittrex) Setup(exch *config.Exchange) error {
|
||||
Unsubscriber: b.Unsubscribe, // Unsubscriber function outlined above.
|
||||
GenerateSubscriptions: b.GenerateDefaultSubscriptions, // GenerateDefaultSubscriptions function outlined above.
|
||||
Features: &b.Features.Supports.WebsocketCapabilities, // Defines the capabilities of the websocket outlined in supported features struct. This allows the websocket connection to be flushed appropriately if we have a pair/asset enable/disable change. This is outlined below.
|
||||
|
||||
// Orderbook buffer specific variables for processing orderbook updates via websocket feed.
|
||||
// Other orderbook buffer vars:
|
||||
// UpdateEntriesByID bool
|
||||
SortBuffer: true,
|
||||
SortBufferByUpdateIDs: true,
|
||||
OrderbookBufferConfig: buffer.Config{
|
||||
SortBuffer: true,
|
||||
SortBufferByUpdateIDs: true,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user