mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-08 23:16:54 +00:00
Exchanges: Bypass websocket book validation (#613)
* Exchanges: Bypass websocket book validation on exchanges when checksum is implemented, fix FTX test, go mod tidy * Orderbook: Change orderbook base field name
This commit is contained in:
@@ -275,9 +275,11 @@ func (b *Base) Process() error {
|
||||
b.LastUpdated = time.Now()
|
||||
}
|
||||
|
||||
err := b.Verify()
|
||||
if err != nil {
|
||||
return err
|
||||
if !b.HasChecksumValidation {
|
||||
err := b.Verify()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return service.Update(b)
|
||||
|
||||
@@ -79,10 +79,15 @@ type Base struct {
|
||||
LastUpdateID int64 `json:"lastUpdateId"`
|
||||
AssetType asset.Item `json:"assetType"`
|
||||
ExchangeName string `json:"exchangeName"`
|
||||
|
||||
// NotAggregated defines whether an orderbook can contain duplicate prices
|
||||
// in a payload
|
||||
NotAggregated bool `json:"-"`
|
||||
IsFundingRate bool `json:"fundingRate"`
|
||||
|
||||
// HasChecksumValidation defines an allowance to bypass internal
|
||||
// verification if the book has been verified by checksum.
|
||||
HasChecksumValidation bool `json:"-"`
|
||||
}
|
||||
|
||||
type byOBPrice []Item
|
||||
|
||||
Reference in New Issue
Block a user