Skip to content

Commit

Permalink
Bitfinex: Fix cancel/update order WS ack not seen
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Aug 1, 2023
1 parent 74bf13f commit 83c6ea7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions exchanges/bitfinex/bitfinex_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,19 @@ func (b *Bitfinex) wsHandleData(respRaw []byte) error {
b.Websocket.DataHandler <- offer
}
}
case strings.Contains(channelName, wsOrderNewRequest),
strings.Contains(channelName, wsOrderUpdateRequest),
strings.Contains(channelName, wsOrderCancelRequest):
case strings.Contains(channelName, wsOrderNewRequest):
if data[2] != nil {
if id, ok := data[2].(float64); ok && id > 0 {
if cid, ok := data[2].(float64); ok && cid > 0 {
if b.Websocket.Match.IncomingWithData(int64(cid), respRaw) {
return nil
}
b.wsHandleOrder(data)
}
}
case strings.Contains(channelName, wsOrderUpdateRequest),
strings.Contains(channelName, wsOrderCancelRequest):
if data[0] != nil {
if id, ok := data[0].(float64); ok && id > 0 {
if b.Websocket.Match.IncomingWithData(int64(id), respRaw) {
return nil
}
Expand Down

0 comments on commit 83c6ea7

Please sign in to comment.