# Self-Trade Prevention

Self-trade prevention (STP) prevents orders from the same subaccount from matching. It does not apply across subaccounts.

## Behavior

When an incoming order would match a resting order from the same subaccount, the matching system prevents that match. The current configuration uses the cancel-maker rule. The system cancels the resting self order. The incoming order can then continue to other liquidity.

* A market or IOC order can continue to other available liquidity after the system cancels the self order.
* A market order is rejected as unfilled if only self liquidity is available.
* A FOK order fails if it cannot complete without a self-trade.

WebSocket order updates provide the final state.

## Block Execution

Taker orders wait in the current execution block. Therefore, the set of resting orders can change before matching. STP is applied when the block is processed, against the order state at that time.

See [Block Execution](/trading/perpetual-futures/block-execution) and [Order Placement](/developer-guides/trading-api/order-placement).
