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(). req := e.client.OrderService.NewCreateOrderRequest().
Market(maxOrder.Market). Market(maxOrder.Market).
Side(maxOrder.Side). Side(maxOrder.Side).
Volume(maxOrder.Volume).
OrderType(string(maxOrder.OrderType)) OrderType(string(maxOrder.OrderType))
if len(maxOrder.ClientOID) > 0 { if len(maxOrder.ClientOID) > 0 {
req.ClientOrderID(maxOrder.ClientOID) req.ClientOrderID(maxOrder.ClientOID)
} }
if len(maxOrder.Volume) > 0 {
req.Volume(maxOrder.Volume)
}
if len(maxOrder.Price) > 0 { if len(maxOrder.Price) > 0 {
req.Price(maxOrder.Price) req.Price(maxOrder.Price)
} }