mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-01 07:26:48 +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:
@@ -513,6 +513,7 @@ func (f *FTX) WsProcessPartialOB(data *WsOrderbookData, p currency.Pair, a asset
|
||||
Pair: p,
|
||||
ExchangeName: f.Name,
|
||||
HasChecksumValidation: true,
|
||||
VerificationBypass: f.OrderbookVerificationBypass,
|
||||
}
|
||||
return f.Websocket.Orderbook.LoadSnapshot(&newOrderBook)
|
||||
}
|
||||
|
||||
@@ -176,8 +176,8 @@ func (f *FTX) Setup(exch *config.ExchangeConfig) error {
|
||||
UnSubscriber: f.Unsubscribe,
|
||||
GenerateSubscriptions: f.GenerateDefaultSubscriptions,
|
||||
Features: &f.Features.Supports.WebsocketCapabilities,
|
||||
OrderbookBufferLimit: exch.WebsocketOrderbookBufferLimit,
|
||||
BufferEnabled: exch.WebsocketOrderbookBufferEnabled,
|
||||
OrderbookBufferLimit: exch.OrderbookConfig.WebsocketBufferLimit,
|
||||
BufferEnabled: exch.OrderbookConfig.WebsocketBufferEnabled,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -333,7 +333,12 @@ func (f *FTX) FetchOrderbook(currency currency.Pair, assetType asset.Item) (*ord
|
||||
|
||||
// UpdateOrderbook updates and returns the orderbook for a currency pair
|
||||
func (f *FTX) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error) {
|
||||
book := &orderbook.Base{ExchangeName: f.Name, Pair: p, AssetType: assetType}
|
||||
book := &orderbook.Base{
|
||||
ExchangeName: f.Name,
|
||||
Pair: p,
|
||||
AssetType: assetType,
|
||||
VerificationBypass: f.OrderbookVerificationBypass,
|
||||
}
|
||||
formattedPair, err := f.FormatExchangeCurrency(p, assetType)
|
||||
if err != nil {
|
||||
return book, err
|
||||
|
||||
Reference in New Issue
Block a user