Skip to content

Commit

Permalink
Merge pull request thrasher-corp#135 from shazbert/binance_fix
Browse files Browse the repository at this point in the history
Fixed bug in Binance GetOrderbook.
  • Loading branch information
shazbert authored Jun 11, 2018
2 parents 9d0616d + bf885cd commit 12ea178
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exchanges/binance/binance.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ func (b *Binance) GetOrderBook(symbol string, limit int64) (OrderBook, error) {
ASK.Price, _ = strconv.ParseFloat(ask.(string), 64)
case 1:
ASK.Quantity, _ = strconv.ParseFloat(ask.(string), 64)
orderbook.Asks = append(orderbook.Asks, ASK)
break
}
orderbook.Asks = append(orderbook.Asks, ASK)
}
}

Expand All @@ -177,8 +178,9 @@ func (b *Binance) GetOrderBook(symbol string, limit int64) (OrderBook, error) {
BID.Price, _ = strconv.ParseFloat(bid.(string), 64)
case 1:
BID.Quantity, _ = strconv.ParseFloat(bid.(string), 64)
orderbook.Bids = append(orderbook.Bids, BID)
break
}
orderbook.Bids = append(orderbook.Bids, BID)
}
}
return orderbook, nil
Expand Down

0 comments on commit 12ea178

Please sign in to comment.