mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 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:
@@ -174,10 +174,11 @@ func (l *LakeBTC) processOrderbook(obUpdate, channel string) error {
|
||||
}
|
||||
|
||||
book := orderbook.Base{
|
||||
Pair: p,
|
||||
LastUpdated: time.Now(),
|
||||
AssetType: asset.Spot,
|
||||
ExchangeName: l.Name,
|
||||
Pair: p,
|
||||
LastUpdated: time.Now(),
|
||||
AssetType: asset.Spot,
|
||||
ExchangeName: l.Name,
|
||||
VerificationBypass: l.OrderbookVerificationBypass,
|
||||
}
|
||||
|
||||
for i := range update.Asks {
|
||||
|
||||
@@ -137,8 +137,8 @@ func (l *LakeBTC) Setup(exch *config.ExchangeConfig) error {
|
||||
UnSubscriber: l.Unsubscribe,
|
||||
GenerateSubscriptions: l.GenerateDefaultSubscriptions,
|
||||
Features: &l.Features.Supports.WebsocketCapabilities,
|
||||
OrderbookBufferLimit: exch.WebsocketOrderbookBufferLimit,
|
||||
BufferEnabled: exch.WebsocketOrderbookBufferEnabled,
|
||||
OrderbookBufferLimit: exch.OrderbookConfig.WebsocketBufferLimit,
|
||||
BufferEnabled: exch.OrderbookConfig.WebsocketBufferEnabled,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -269,7 +269,12 @@ func (l *LakeBTC) FetchOrderbook(p currency.Pair, assetType asset.Item) (*orderb
|
||||
|
||||
// UpdateOrderbook updates and returns the orderbook for a currency pair
|
||||
func (l *LakeBTC) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error) {
|
||||
book := &orderbook.Base{ExchangeName: l.Name, Pair: p, AssetType: assetType}
|
||||
book := &orderbook.Base{
|
||||
ExchangeName: l.Name,
|
||||
Pair: p,
|
||||
AssetType: assetType,
|
||||
VerificationBypass: l.OrderbookVerificationBypass,
|
||||
}
|
||||
fPair, err := l.FormatExchangeCurrency(p, assetType)
|
||||
if err != nil {
|
||||
return book, err
|
||||
|
||||
Reference in New Issue
Block a user