mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
Bitfinex: Fix websocket trade processing (#1754)
* Bitfinex: Fix WS trade processing * Add handling for funding trades Fixes #1746 * Linter: Disable shadow linting for err It's been a year, and I'm still getting caught out by govet demanding I don't shadow a var I was deliberately shadowing. Made worse by an increase in clashes with stylecheck when they both want opposite things on the same line. * Bitfinex: Move websocket constants to websocket file * Bitfinex: Rename channel consts * Bitfinex: Send individual WS trades down the DataHandler
This commit is contained in:
@@ -242,9 +242,7 @@ func (m *WebsocketRoutineManager) websocketDataHandler(exchName string, data int
|
||||
}
|
||||
m.syncer.PrintTickerSummary(&d[x], "websocket", err)
|
||||
}
|
||||
case order.Detail,
|
||||
ticker.Price,
|
||||
orderbook.Depth:
|
||||
case order.Detail, ticker.Price, orderbook.Depth:
|
||||
return errUseAPointer
|
||||
case stream.KlineData:
|
||||
if m.verbose {
|
||||
@@ -347,7 +345,7 @@ func (m *WebsocketRoutineManager) websocketDataHandler(exchName string, data int
|
||||
m.printAccountHoldingsChangeSummary(d[x])
|
||||
}
|
||||
}
|
||||
case []trade.Data:
|
||||
case []trade.Data, trade.Data:
|
||||
if m.verbose {
|
||||
log.Infof(log.Trade, "%+v", d)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user