Skip to content

Commit

Permalink
getting price bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sairahul1526 committed Jun 6, 2020
1 parent 784e593 commit 836714f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buysell.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func BuySellAdd(w http.ResponseWriter, r *http.Request) {
SetReponseStatus(w, r, statusCodeBadRequest, "Order not placed", dialogType, response)
return
}
last := strings.Split(getValueRedis(body["ticker"]+"_last"), ":")
last := strings.Split(getValueRedis(body["ticker"]), ":")
if len(last) > 1 {
price, _ := strconv.ParseFloat(last[1], 64)
shares, _ := strconv.ParseFloat(body["shares"], 64)
Expand Down

0 comments on commit 836714f

Please sign in to comment.