Skip to content

Commit

Permalink
fixup! Bitfinex: Fix WS trade processing
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Dec 27, 2024
1 parent c7db5d8 commit 8b8da5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exchanges/bitfinex/bitfinex_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"hash/crc32"
"math"
"net/http"
"sort"
"strconv"
Expand Down Expand Up @@ -919,7 +920,7 @@ func (b *Bitfinex) handleWSAllTrades(s *subscription.Subscription, respRaw []byt
}
if t.Amount < 0 {
t.Side = order.Sell
t.Amount *= -1
t.Amount = math.Abs(t.Amount)
}
if feedEnabled {
b.Websocket.DataHandler <- &t
Expand Down

0 comments on commit 8b8da5c

Please sign in to comment.