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:
Ryan O'Hara-Reid
2021-01-05 15:55:46 +11:00
committed by GitHub
parent eb0571cc9b
commit 010fab02ca
8 changed files with 28 additions and 18 deletions

View File

@@ -25,7 +25,7 @@ const (
apiSecret = ""
canManipulateRealOrders = false
spotPair = "FTT/BTC"
futuresPair = "LEO-0327"
futuresPair = "DOGE-PERP"
testToken = "ADAMOON"
btcusd = "BTC/USD"
)

View File

@@ -506,12 +506,13 @@ func (f *FTX) WsProcessPartialOB(data *WsOrderbookData, p currency.Pair, a asset
}
newOrderBook := orderbook.Base{
Asks: asks,
Bids: bids,
AssetType: a,
LastUpdated: timestampFromFloat64(data.Time),
Pair: p,
ExchangeName: f.Name,
Asks: asks,
Bids: bids,
AssetType: a,
LastUpdated: timestampFromFloat64(data.Time),
Pair: p,
ExchangeName: f.Name,
HasChecksumValidation: true,
}
return f.Websocket.Orderbook.LoadSnapshot(&newOrderBook)
}