- An incoming (aggressing) order is submitted to the order book.
- The matching engine checks if the aggressing order would cross the spread and match with a resting (maker) order.
- Before executing a trade, the engine checks if the
account_idof the aggressing order is the same as theaccount_idof the resting order. - If the account IDs are identical, a self-trade is detected.
- Instead of a trade being executed, the resting maker order is immediately canceled.
- No Trade Execution: A self-trade is never filled. The system treats it as a cancellation of the passive order.
- No Fees: Since no trade occurs, no trading fees are charged for the prevented match.
- Market Maker Friendly: This behavior, often referred to as “Expire Maker” or “Cancel Resting” on other exchanges, is highly desirable for market makers. It allows them to place an aggressive order that can trade through their own resting liquidity to access deeper liquidity on the order book without being filled against themselves.
- Trade Feed: The event is not recorded as a trade in the public trade feed. It is treated simply as an order cancellation.