From 79cce2c11f638b42c077d7e8ab665d9137017fab Mon Sep 17 00:00:00 2001 From: Adrian Gallagher Date: Wed, 10 Aug 2016 03:59:06 +1000 Subject: [PATCH] Fixed Bitfinex Websocket json parsing error. --- bitfinexwebsocket.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitfinexwebsocket.go b/bitfinexwebsocket.go index b47ea667..875689e2 100644 --- a/bitfinexwebsocket.go +++ b/bitfinexwebsocket.go @@ -11,7 +11,7 @@ import ( const ( BITFINEX_WEBSOCKET = "wss://api2.bitfinex.com:3000/ws" - BITFINEX_WEBSOCKET_VERSION = "1.0" + BITFINEX_WEBSOCKET_VERSION = "1.1" BITFINEX_WEBSOCKET_POSITION_SNAPSHOT = "ps" BITFINEX_WEBSOCKET_POSITION_NEW = "pn" BITFINEX_WEBSOCKET_POSITION_UPDATE = "pu" @@ -170,9 +170,9 @@ func (b *Bitfinex) WebsocketClient() { } type WebsocketHandshake struct { - Event string `json:"event"` - Code int64 `json:"code"` - Version int `json:"version"` + Event string `json:"event"` + Code int64 `json:"code"` + Version float64 `json:"version"` } hs := WebsocketHandshake{}