From 88bc17a17fc41e5a6216e797f5b3b4110737eaa9 Mon Sep 17 00:00:00 2001 From: Ryan O'Hara-Reid Date: Mon, 29 Apr 2019 17:27:03 +1000 Subject: [PATCH] ZB: GetOrderbook out of range fix (#286) ZB: GetOrderbook out of range fix --- exchanges/zb/zb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exchanges/zb/zb.go b/exchanges/zb/zb.go index 8d451c14..3ffdd1d4 100644 --- a/exchanges/zb/zb.go +++ b/exchanges/zb/zb.go @@ -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