diff --git a/pkg/backtest/matching.go b/pkg/backtest/matching.go index 519e0d123..6b7b75185 100644 --- a/pkg/backtest/matching.go +++ b/pkg/backtest/matching.go @@ -172,6 +172,10 @@ func (m *SimplePriceMatching) PlaceOrder(o types.SubmitOrder) (*types.Order, *ty order := m.newOrder(o, orderID) if isTaker { + if order.Type == types.OrderTypeMarket { + order.Price = m.LastPrice + } + // emit the order update for Status:New m.EmitOrderUpdate(order)