mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-18 23:16:49 +00:00
ZB: GetOrderbook out of range fix (#286)
ZB: GetOrderbook out of range fix
This commit is contained in:
committed by
Adrian Gallagher
parent
47152c87e3
commit
88bc17a17f
@@ -285,8 +285,8 @@ func (z *ZB) GetOrderbook(symbol string) (OrderbookResponse, error) {
|
||||
|
||||
// reverse asks data
|
||||
var data [][]float64
|
||||
for x := len(res.Asks) - 1; x != 0; x-- {
|
||||
data = append(data, res.Asks[x])
|
||||
for x := len(res.Asks); x > 0; x-- {
|
||||
data = append(data, res.Asks[x-1])
|
||||
}
|
||||
|
||||
res.Asks = data
|
||||
|
||||
Reference in New Issue
Block a user