mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 23:16:53 +00:00
binance/perf: Optimize UFuturesNewOrder function parameters (#1043)
* pref(Binance.UFuturesNewOrder()):Optimize function parameters * perf(Binance.UFuturesNewOrder()):Optimize function parameters * Apply suggestions from code review Co-authored-by: Ryan O'Hara-Reid <oharareid.ryan@gmail.com> * fix: fix the linter issue * fix(binance_test): fix gofmt lint Co-authored-by: xw <xw@xwdeiMac.local> Co-authored-by: Ryan O'Hara-Reid <oharareid.ryan@gmail.com>
This commit is contained in:
@@ -1053,10 +1053,17 @@ func (b *Binance) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm
|
||||
return nil, errors.New("invalid type, check api docs for updates")
|
||||
}
|
||||
order, err := b.UFuturesNewOrder(ctx,
|
||||
s.Pair, reqSide,
|
||||
"", oType, "GTC", "",
|
||||
s.ClientOrderID, "", "",
|
||||
s.Amount, s.Price, 0, 0, 0, s.ReduceOnly)
|
||||
&UFuturesNewOrderRequest{
|
||||
Symbol: s.Pair,
|
||||
Side: reqSide,
|
||||
OrderType: oType,
|
||||
TimeInForce: "GTC",
|
||||
NewClientOrderID: s.ClientOrderID,
|
||||
Quantity: s.Amount,
|
||||
Price: s.Price,
|
||||
ReduceOnly: s.ReduceOnly,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user