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:
@@ -968,6 +968,7 @@ func (b *Bitfinex) WsInsertSnapshot(p currency.Pair, assetType asset.Item, books
|
||||
book.NotAggregated = true
|
||||
book.HasChecksumValidation = true
|
||||
book.IsFundingRate = fundingRate
|
||||
book.VerificationBypass = b.OrderbookVerificationBypass
|
||||
return b.Websocket.Orderbook.LoadSnapshot(&book)
|
||||
}
|
||||
|
||||
|
||||
@@ -198,8 +198,8 @@ func (b *Bitfinex) 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 {
|
||||
@@ -387,10 +387,12 @@ func (b *Bitfinex) FetchOrderbook(p currency.Pair, assetType asset.Item) (*order
|
||||
// UpdateOrderbook updates and returns the orderbook for a currency pair
|
||||
func (b *Bitfinex) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error) {
|
||||
o := &orderbook.Base{
|
||||
ExchangeName: b.Name,
|
||||
Pair: p,
|
||||
AssetType: assetType,
|
||||
NotAggregated: true}
|
||||
ExchangeName: b.Name,
|
||||
Pair: p,
|
||||
AssetType: assetType,
|
||||
NotAggregated: true,
|
||||
VerificationBypass: b.OrderbookVerificationBypass,
|
||||
}
|
||||
|
||||
fPair, err := b.FormatExchangeCurrency(p, assetType)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user