Trading

Matching Rules

The MVP matching model: compatible limit prices, fill-or-none quantity, and Sell Price execution.

Compatibility

A Buy Limit can match a Sell Limit when the Buy Price is greater than or equal to the Sell Price.

Fill-or-none

In the MVP, an Order either matches for its full Quantity or does not match. Partial fills are deliberately outside the first path.

Execution price

if buy.price >= sell.price:
  executionPrice = sell.price
  quantity = buy.quantity = sell.quantity