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:
Ryan O'Hara-Reid
2021-01-06 12:56:30 +11:00
committed by GitHub
parent 010fab02ca
commit 7431bf8866
56 changed files with 291 additions and 128 deletions

View File

@@ -235,7 +235,12 @@ func (e *EXMO) FetchOrderbook(p currency.Pair, assetType asset.Item) (*orderbook
// UpdateOrderbook updates and returns the orderbook for a currency pair
func (e *EXMO) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error) {
callingBook := &orderbook.Base{ExchangeName: e.Name, Pair: p, AssetType: assetType}
callingBook := &orderbook.Base{
ExchangeName: e.Name,
Pair: p,
AssetType: assetType,
VerificationBypass: e.OrderbookVerificationBypass,
}
enabledPairs, err := e.GetEnabledPairs(assetType)
if err != nil {
return callingBook, err
@@ -253,9 +258,11 @@ func (e *EXMO) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderboo
for i := range enabledPairs {
book := &orderbook.Base{
ExchangeName: e.Name,
Pair: enabledPairs[i],
AssetType: assetType}
ExchangeName: e.Name,
Pair: enabledPairs[i],
AssetType: assetType,
VerificationBypass: e.OrderbookVerificationBypass,
}
curr, err := e.FormatExchangeCurrency(enabledPairs[i], assetType)
if err != nil {