Starting March 14, 2024, at 6:00 PM (UTC+8), OKX will enforce Self-Trade Prevention (STP) across all trading products and business lines for every user. This update marks a significant step toward ensuring a more secure, fair, and efficient trading environment. The feature will be applied at the main account level, affecting all new order submissions.
What Is Self-Trade Prevention?
Self-Trade Prevention (STP) is a mechanism designed to stop unintended trades between accounts under the same ownership. These self-matching trades—while not inherently malicious—can lead to unnecessary fees, market distortion, and potential compliance risks. By implementing STP by default, OKX reinforces its commitment to transparency and regulatory alignment while enhancing overall market integrity.
Initially introduced in June 2023 as an optional setting for API users, STP has now evolved into a mandatory safeguard for all traders on the platform. This move reflects growing industry standards around automated trading safety and risk management.
👉 Discover how advanced trading safeguards can protect your strategy and reduce costs.
How the Mandatory STP Update Works
From the enforcement date, OKX will block any trade that occurs between:
- A main account and itself
- Any sub-account and itself
- The main account and any of its sub-accounts
- Any two sub-accounts under the same main account
For example, if you have a main account A with sub-accounts A1 and A2, the following trading pairs will be prohibited:
- A ↔ A
- A1 ↔ A1
- A2 ↔ A2
- A ↔ A1
- A ↔ A2
- A1 ↔ A2
This restriction applies to all new orders placed after the activation time. It covers spot, margin, futures, options, and other supported trading instruments across both web and API channels.
Default STP Behavior: Cancel-Maker Mode
By default, OKX uses the "Cancel-Maker" mode for handling potential self-trades. Here's how it works:
When a taker order could result in a self-match with an existing maker order from the same account group:
- The system automatically cancels the resting maker order.
- The taker order continues executing against the next available counterparty in the order book.
This ensures execution continuity while preventing internal matching.
Benefits of Enforced Self-Trade Prevention
1. Eliminates Unnecessary Fees
Without STP, automated strategies—especially high-frequency or grid bots—can accidentally trigger self-trades, generating avoidable transaction costs. With enforced STP, traders save on fees and improve net profitability.
2. Improves Market Fairness
Self-trading can artificially inflate volume or manipulate price discovery. By blocking such activity, OKX helps maintain genuine market dynamics accessible to all participants.
3. Strengthens Compliance Posture
Regulatory bodies increasingly scrutinize exchange practices related to market manipulation. Proactively preventing self-deals demonstrates OKX’s adherence to global best practices in digital asset trading.
4. Enhances API Trading Safety
API traders benefit from built-in protection against flawed logic or misconfigured bots. Even if multiple scripts operate under one account tree, they won’t inadvertently execute internal trades.
Customization Options for API Users
While STP is enabled by default for all accounts, API traders retain control over specific behaviors using the stpMode parameter when placing orders. Different order types support various STP modes, allowing fine-tuned strategy execution.
Available modes may include:
- Cancel-Maker: Cancels the maker side (default)
- Cancel-Taker: Rejects the incoming taker order
- Cancel-Both: Removes both maker and taker orders
Check the official API documentation for full details on supported parameters and compatibility.
Important Notes and Limitations
Despite the enforcement of STP for new orders, users should be aware of the following:
- Cross-time self-trades are still possible: Orders created before and after the STP activation may still match if they remain open across the transition period.
- Block trading implications: In大宗交易 (block trading), if a taker belongs to the same main account as the maker, the maker will no longer receive Request-for-Quote (RFQ) messages.
- Order history tracking: All users can review their order logs via the OKX web or mobile app to check whether an order was canceled due to STP. API users can access this data through REST APIs or WebSocket subscriptions.
Core Keywords for SEO Optimization
To align with search intent and enhance visibility, the following keywords have been naturally integrated throughout this article:
- Self-Trade Prevention
- STP on OKX
- prevent self-trading crypto
- OKX trading rules
- crypto exchange safety
- automated trading protection
- API trading safeguards
- block self-trades exchange
These terms reflect common queries from traders seeking clarity on platform policies, risk controls, and technical configurations.
👉 Learn how smart trading protections give you a competitive edge in volatile markets.
Frequently Asked Questions (FAQ)
Q: Does STP apply to all account types?
A: Yes. The rule applies uniformly to all main accounts and their associated sub-accounts, regardless of user tier or region.
Q: Can I disable Self-Trade Prevention?
A: No. As of March 14, 2024, STP is mandatory and cannot be turned off. However, API users can adjust behavior via stpMode for certain order types.
Q: Will my open orders be affected before the enforcement date?
A: Open orders placed before March 14 may still result in self-trades if matched with new orders after that date. To avoid this, consider canceling stale orders ahead of the change.
Q: Does STP impact cross-margin or isolated positions differently?
A: No. STP operates at the account level, independent of margin mode. Whether using cross or isolated margin, the restriction remains consistent.
Q: Is there a way to test STP behavior before going live?
A: Yes. You can simulate order flows in a demo environment or use testnet APIs to observe how your strategies respond under STP conditions.
Q: What happens if my bot tries to place a self-trade?
A: The system will either cancel the maker order (default) or reject the taker order based on your configured stpMode. Your bot should handle cancellation events gracefully.
👉 See how top traders design resilient strategies with built-in compliance features.
Final Thoughts
The mandatory rollout of Self-Trade Prevention underscores OKX’s focus on responsible innovation in digital asset trading. By eliminating unintended internal executions, the platform empowers users with cleaner trade execution, reduced costs, and stronger alignment with global regulatory expectations.
Whether you're a retail trader using the mobile app or an institutional player leveraging API infrastructure, this update enhances your experience without compromising flexibility.
Staying informed about such changes ensures your trading operations remain smooth and compliant in an evolving ecosystem.