mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 07:26:47 +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:
@@ -685,6 +685,7 @@ func (o *OKGroup) WsProcessPartialOrderBook(wsEventData *WebsocketOrderBook, ins
|
||||
Pair: instrument,
|
||||
ExchangeName: o.Name,
|
||||
HasChecksumValidation: true,
|
||||
VerificationBypass: o.OrderbookVerificationBypass,
|
||||
}
|
||||
return o.Websocket.Orderbook.LoadSnapshot(&newOrderBook)
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ func (o *OKGroup) Setup(exch *config.ExchangeConfig) error {
|
||||
UnSubscriber: o.Unsubscribe,
|
||||
GenerateSubscriptions: o.GenerateDefaultSubscriptions,
|
||||
Features: &o.Features.Supports.WebsocketCapabilities,
|
||||
OrderbookBufferLimit: exch.WebsocketOrderbookBufferLimit,
|
||||
BufferEnabled: exch.WebsocketOrderbookBufferEnabled,
|
||||
OrderbookBufferLimit: exch.OrderbookConfig.WebsocketBufferLimit,
|
||||
BufferEnabled: exch.OrderbookConfig.WebsocketBufferEnabled,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -79,9 +79,10 @@ func (o *OKGroup) FetchOrderbook(p currency.Pair, assetType asset.Item) (*orderb
|
||||
// UpdateOrderbook updates and returns the orderbook for a currency pair
|
||||
func (o *OKGroup) UpdateOrderbook(p currency.Pair, a asset.Item) (*orderbook.Base, error) {
|
||||
book := &orderbook.Base{
|
||||
ExchangeName: o.Name,
|
||||
Pair: p,
|
||||
AssetType: a,
|
||||
ExchangeName: o.Name,
|
||||
Pair: p,
|
||||
AssetType: a,
|
||||
VerificationBypass: o.OrderbookVerificationBypass,
|
||||
}
|
||||
|
||||
if a == asset.Index {
|
||||
|
||||
Reference in New Issue
Block a user