Bitmex: Fix handling index records in WS trade stream (#1685)

Fixes handling for Size == 0 index records sent to trade stream

fixes #1684
This commit is contained in:
Gareth Kirwan
2024-10-25 10:57:34 +02:00
committed by GitHub
parent 4c7c0bc533
commit 4d36ea4943
5 changed files with 62 additions and 50 deletions

View File

@@ -49,13 +49,15 @@ const (
DefaultWebsocketOrderbookBufferLimit = 5
)
// Public Errors
var (
// ErrExchangeNameIsEmpty is returned when the exchange name is empty
ErrExchangeNameIsEmpty = errors.New("exchange name is empty")
ErrExchangeNameIsEmpty = errors.New("exchange name is empty")
ErrSymbolCannotBeMatched = errors.New("symbol cannot be matched")
)
var (
errEndpointStringNotFound = errors.New("endpoint string not found")
errConfigPairFormatRequiresDelimiter = errors.New("config pair format requires delimiter")
errSymbolCannotBeMatched = errors.New("symbol cannot be matched")
errSetDefaultsNotCalled = errors.New("set defaults not called")
errExchangeIsNil = errors.New("exchange is nil")
)
@@ -247,7 +249,7 @@ func (b *Base) GetPairAndAssetTypeRequestFormatted(symbol string) (currency.Pair
}
}
}
return currency.EMPTYPAIR, asset.Empty, errSymbolCannotBeMatched
return currency.EMPTYPAIR, asset.Empty, ErrSymbolCannotBeMatched
}
// GetClientBankAccounts returns banking details associated with