max: no need to check order volume separately

This commit is contained in:
c9s 2021-06-09 03:07:26 +08:00
parent fdf1ee9258
commit 8c3992d514

View File

@ -459,16 +459,13 @@ func (e *Exchange) SubmitOrders(ctx context.Context, orders ...types.SubmitOrder
req := e.client.OrderService.NewCreateOrderRequest().
Market(maxOrder.Market).
Side(maxOrder.Side).
Volume(maxOrder.Volume).
OrderType(string(maxOrder.OrderType))
if len(maxOrder.ClientOID) > 0 {
req.ClientOrderID(maxOrder.ClientOID)
}
if len(maxOrder.Volume) > 0 {
req.Volume(maxOrder.Volume)
}
if len(maxOrder.Price) > 0 {
req.Price(maxOrder.Price)
}