mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Bitfinex: Use strconv for float64 handling.
This commit is contained in:
@@ -398,8 +398,8 @@ func (b *Bitfinex) NewDeposit(Symbol, Method, Wallet string) {
|
||||
func (b *Bitfinex) NewOrder(Symbol string, Amount float64, Price float64, Buy bool, Type string, Hidden bool) {
|
||||
request := make(map[string]interface{})
|
||||
request["symbol"] = Symbol
|
||||
request["amount"] = fmt.Sprintf("%.8f", Amount)
|
||||
request["price"] = fmt.Sprintf("%.5f", Price)
|
||||
request["amount"] = strconv.FormatFloat(Amount, 'f', -1, 64)
|
||||
request["price"] = strconv.FormatFloat(Price, 'f', -1, 64)
|
||||
request["exchange"] = "bitfinex"
|
||||
|
||||
if Buy {
|
||||
@@ -408,8 +408,8 @@ func (b *Bitfinex) NewOrder(Symbol string, Amount float64, Price float64, Buy bo
|
||||
request["side"] = "sell"
|
||||
}
|
||||
|
||||
//request["is_hidden"] - currently not implemented
|
||||
request["type"] = Type
|
||||
request["is_hidden"] = Hidden
|
||||
|
||||
err := b.SendAuthenticatedHTTPRequest("POST", BITFINEX_ORDER_NEW, request, nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user