ZB: GetOrderbook out of range fix (#286)

ZB: GetOrderbook out of range fix
This commit is contained in:
Ryan O'Hara-Reid
2019-04-29 17:27:03 +10:00
committed by Adrian Gallagher
parent 47152c87e3
commit 88bc17a17f

View File

@@ -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