From 3f7105088119829043a09532af17d35bcfc87a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rensen?= <1040765+mortensorensen@users.noreply.github.com> Date: Wed, 31 Jul 2019 13:58:20 +0800 Subject: [PATCH] Bitmex compare initial orderbook snapsnot insensitive (#331) --- exchanges/bitmex/bitmex_websocket.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exchanges/bitmex/bitmex_websocket.go b/exchanges/bitmex/bitmex_websocket.go index 56f9a494d76..1e9040e283b 100644 --- a/exchanges/bitmex/bitmex_websocket.go +++ b/exchanges/bitmex/bitmex_websocket.go @@ -6,6 +6,7 @@ import ( "net/http" "net/url" "strconv" + "strings" "time" "github.com/gorilla/websocket" @@ -376,7 +377,7 @@ func (b *Bitmex) processOrderbook(data []OrderBookL2, action string, currencyPai var bids, asks []orderbook.Item for _, orderbookItem := range data { - if orderbookItem.Side == exchange.SellOrderSide.ToString() { + if strings.EqualFold(orderbookItem.Side, exchange.SellOrderSide.ToString()) { asks = append(asks, orderbook.Item{ Price: orderbookItem.Price, Amount: float64(orderbookItem.Size),