Use -1 and 'f' for formatting floats.

This commit is contained in:
Adrian Gallagher
2015-06-20 17:01:14 +10:00
parent 1f6f160c23
commit 8761189400
12 changed files with 54 additions and 54 deletions

View File

@@ -525,11 +525,11 @@ func (k *Kraken) AddOrder(symbol, side, orderType string, price, price2, volume,
values.Set("pairs", symbol)
values.Set("type", side)
values.Set("ordertype", orderType)
values.Set("price", strconv.FormatFloat(price, 'f', 2, 64))
values.Set("price2", strconv.FormatFloat(price, 'f', 2, 64))
values.Set("volume", strconv.FormatFloat(volume, 'f', 2, 64))
values.Set("leverage", strconv.FormatFloat(leverage, 'f', 2, 64))
values.Set("position", strconv.FormatFloat(position, 'f', 2, 64))
values.Set("price", strconv.FormatFloat(price, 'f', -1, 64))
values.Set("price2", strconv.FormatFloat(price, 'f', -1, 64))
values.Set("volume", strconv.FormatFloat(volume, 'f', -1, 64))
values.Set("leverage", strconv.FormatFloat(leverage, 'f', -1, 64))
values.Set("position", strconv.FormatFloat(position, 'f', -1, 64))
result, err := k.SendAuthenticatedHTTPRequest(KRAKEN_ORDER_PLACE, values)