mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-21 23:16:49 +00:00
(BUG FIX) Fix order submission crash due to missing "exchange" parameter (#468)
* fix the return problem * fix the return problem * add the mandatory parameter * fix the symbol empity problem * fix the symbol empty problem * add Pair parameter for order.Cancel parameters * follow the gofmt rule Co-authored-by: MK <mk@MKdeMacBook-Pro.local>
This commit is contained in:
@@ -804,7 +804,13 @@ func (s *RPCServer) SubmitOrder(ctx context.Context, r *gctrpc.SubmitOrderReques
|
||||
Amount: r.Amount,
|
||||
Price: r.Price,
|
||||
ClientID: r.ClientId,
|
||||
Exchange: r.Exchange,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return &gctrpc.SubmitOrderResponse{}, err
|
||||
}
|
||||
|
||||
return &gctrpc.SubmitOrderResponse{
|
||||
OrderId: resp.OrderID,
|
||||
OrderPlaced: resp.IsOrderPlaced,
|
||||
@@ -898,6 +904,7 @@ func (s *RPCServer) CancelOrder(ctx context.Context, r *gctrpc.CancelOrderReques
|
||||
ID: r.OrderId,
|
||||
Side: order.Side(r.Side),
|
||||
WalletAddress: r.WalletAddress,
|
||||
Pair: currency.NewPairFromStrings(r.Pair.Base, r.Pair.Quote),
|
||||
})
|
||||
|
||||
return &gctrpc.CancelOrderResponse{}, err
|
||||
|
||||
Reference in New Issue
Block a user