Bitmex compare initial orderbook snapsnot insensitive (#331)

This commit is contained in:
Morten Sørensen
2019-07-31 13:58:20 +08:00
committed by Ryan O'Hara-Reid
parent eb07c7e495
commit 3f71050881

View File

@@ -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),