Why Binance Self-Trade Prevention Cancels Orders
Binance Self-Trade Prevention (STP) triggers to cancel orders when a trade would otherwise occur between accounts within the same account or same trading group. The core reason is to prevent self-trading that could artificially inflate volume or manipulate price. After STP triggers, which order gets cancelled depends on the taker order's STP mode.
The world's largest cryptocurrency exchange by trading volume,leading in security and liquidity.
New user benefit: Enjoy 20% off trading fees upon registration!
This situation is most common for users of APIs or quantitative strategies, but under certain order placement scenarios, even regular users may encounter it. Below is how self-trade prevention works and the steps to handle cancellations.
Prerequisites
- You are trading on Binance and an order has been cancelled by the system, with a status showing "EXPIRED_IN_MATCH".
- You confirm the order was not cancelled manually but by the system automatically.
- You can log into your Binance account to view order history.
Step 1: Confirm whether the order was cancelled due to STP
On the Binance App or website, go to [Order Management] → [Order History], and find the cancelled order. Check the status field.
Case A: Order status shows "EXPIRED_IN_MATCH"
This indicates that the order was indeed cancelled by the system due to Self-Trade Prevention (STP). This is Binance's clear marker that the order expired due to STP.
Case B: Order status shows "CANCELED" with no special explanation
It may have been cancelled manually, or cancelled by the system for other reasons. Check the selfTradePreventionMode field of the order. If it shows EXPIRE_TAKER, EXPIRE_MAKER, or EXPIRE_BOTH, it is related to STP.
Completion standard: Confirm that the order was indeed cancelled due to STP.
Step 2: Understand how Self-Trade Prevention is triggered
Self-trading can occur in two scenarios:
- Within the same account: Your own buy and sell orders match each other.
- Within the same trading group: The main account and a sub-account match each other.
When STP triggers, the system decides which order to cancel based on the STP mode of the taker order:
| STP Mode | Effect |
|---|---|
EXPIRE_TAKER | Cancels the remaining taker order |
EXPIRE_MAKER | Cancels the remaining maker order (default for regular users) |
EXPIRE_BOTH | Cancels both remaining taker and maker orders |
NONE | Does not trigger STP, allows self-trading |
Completion standard: Know which order was cancelled and the corresponding trigger mode.
Step 3: Choose how to respond
Case A: Order was mistakenly cancelled, need to place again
- Confirm the cancelled order's quantity and price.
- Place a new order on the trading page.
- If you are using API and need to avoid STP, you can set the order's STP mode to
NONE(confirm that the trading pair supports this mode).
Case B: Order cancellation is normal (using quantitative strategies)
If using the API, Binance's API orders have STP enabled by default. If you don't want your strategy orders to be cancelled due to self-trading, you can specify the mode via the selfTradePreventionMode field when placing the order.
Completion standard: The order has been resubmitted successfully, or the strategy has been adjusted as needed.
Common Pitfalls
Assuming STP only affects API users; actually, regular users may also encounter it
Although most regular users' STP defaults to cancelling the maker order, in certain order placement scenarios (for example, when simultaneously placing both buy and sell orders with crossed prices), the STP mechanism will also take effect and cancel orders. If you encounter an order being cancelled without reason in normal trading, do not immediately blame a system malfunction—first check whether you have price-crossing open orders at the same time.
Risk Reminder
- Self-trading may be considered market manipulation: Some jurisdictions view repeated self-trading as market manipulation. Even if STP prevents the self-trading, frequent triggering may attract risk control attention.
- STP may generate a "prevented quantity": The quantity of the cancelled order is recorded in the order's "preventedQuantity" field. API users can query the prevented matches via the
GET /api/v3/preventedMatchesendpoint.
The world's largest cryptocurrency exchange by trading volume,leading in security and liquidity.
New user benefit: Enjoy 20% off trading fees upon registration!
How to Confirm the Operation Is Complete
After re-placing the order, check the new order's status in [Current Orders]. If it shows "Pending" or "Filled" instead of "Cancelled", the order has entered the matching queue normally.
If the order is cancelled again, check whether STP was triggered again. If so, consider adjusting the order price or using the NONE mode (confirm support).
