mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-25 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:
@@ -161,7 +161,7 @@ func ({{.Variable}} *{{.CapitalName}}) Setup(exch *config.ExchangeConfig) error
|
||||
|
||||
// NOTE: PLEASE ENSURE YOU SET THE ORDERBOOK BUFFER SETTINGS CORRECTLY
|
||||
{{.Variable}}.Websocket.Orderbook.Setup(
|
||||
exch.WebsocketOrderbookBufferLimit,
|
||||
exch.OrderbookConfig.WebsocketBufferLimit,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
@@ -272,7 +272,13 @@ func ({{.Variable}} *{{.CapitalName}}) FetchOrderbook(currency currency.Pair, as
|
||||
|
||||
// UpdateOrderbook updates and returns the orderbook for a currency pair
|
||||
func ({{.Variable}} *{{.CapitalName}}) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error) {
|
||||
book := &orderbook.Base{ExchangeName: {{.Variable}}.Name, Pair: p, AssetType: assetType}
|
||||
book := &orderbook.Base{
|
||||
ExchangeName: {{.Variable}}.Name,
|
||||
Pair: p,
|
||||
AssetType: assetType,
|
||||
VerificationBypass: {{.Variable}}.OrderbookVerificationBypass,
|
||||
}
|
||||
|
||||
// NOTE: UPDATE ORDERBOOK EXAMPLE
|
||||
/*
|
||||
orderbookNew, err := {{.Variable}}.GetOrderBook(exchange.FormatExchangeCurrency({{.Variable}}.Name, p).String(), 1000)
|
||||
|
||||
Reference in New Issue
Block a user