mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 23:16:52 +00:00
Exchanges: Add config variable to set bypassing of orderbook verification by exchange (#614)
* Exchanges: Add config variable to set bypassing of orderbook verification * Exchanges: Consolidate orderbook variables into config struct * Exchanges: Addr nit; set verification bypass on websocket book implementations
This commit is contained in:
@@ -512,6 +512,7 @@ func (b *Bitmex) processOrderbook(data []OrderBookL2, action string, p currency.
|
||||
book.AssetType = a
|
||||
book.Pair = p
|
||||
book.ExchangeName = b.Name
|
||||
book.VerificationBypass = b.OrderbookVerificationBypass
|
||||
|
||||
err := b.Websocket.Orderbook.LoadSnapshot(&book)
|
||||
if err != nil {
|
||||
|
||||
@@ -154,8 +154,8 @@ func (b *Bitmex) Setup(exch *config.ExchangeConfig) error {
|
||||
UnSubscriber: b.Unsubscribe,
|
||||
GenerateSubscriptions: b.GenerateDefaultSubscriptions,
|
||||
Features: &b.Features.Supports.WebsocketCapabilities,
|
||||
OrderbookBufferLimit: exch.WebsocketOrderbookBufferLimit,
|
||||
BufferEnabled: exch.WebsocketOrderbookBufferEnabled,
|
||||
OrderbookBufferLimit: exch.OrderbookConfig.WebsocketBufferLimit,
|
||||
BufferEnabled: exch.OrderbookConfig.WebsocketBufferEnabled,
|
||||
UpdateEntriesByID: true,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -334,9 +334,10 @@ func (b *Bitmex) FetchOrderbook(p currency.Pair, assetType asset.Item) (*orderbo
|
||||
// UpdateOrderbook updates and returns the orderbook for a currency pair
|
||||
func (b *Bitmex) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error) {
|
||||
book := &orderbook.Base{
|
||||
ExchangeName: b.Name,
|
||||
Pair: p,
|
||||
AssetType: assetType,
|
||||
ExchangeName: b.Name,
|
||||
Pair: p,
|
||||
AssetType: assetType,
|
||||
VerificationBypass: b.OrderbookVerificationBypass,
|
||||
}
|
||||
|
||||
if assetType == asset.Index {
|
||||
|
||||
Reference in New Issue
Block a user