diff --git a/exchanges/bitfinex/bitfinex_websocket.go b/exchanges/bitfinex/bitfinex_websocket.go index 6c88ab5a644..e1f37466b96 100644 --- a/exchanges/bitfinex/bitfinex_websocket.go +++ b/exchanges/bitfinex/bitfinex_websocket.go @@ -472,11 +472,11 @@ func (b *Bitfinex) handleWSEvent(respRaw []byte) error { // TODO - Send a better value down the channel b.Websocket.DataHandler <- glob } else { - errCode, err := jsonparser.GetString(respRaw, "code") + errCode, err := jsonparser.GetInt(respRaw, "code") if err != nil { log.Errorf(log.ExchangeSys, "%s error parsing WS auth event error code: %s", b.Name, err) } - return fmt.Errorf("WS auth subscription error; Status: %s Error Code: %s", status, errCode) + return fmt.Errorf("WS auth subscription error; Status: %s Error Code: %d", status, errCode) } default: return fmt.Errorf("unknown WS event msg: %s", respRaw)