Introduction to Self-Trade Prevention (STP)

1. What is self-trade prevention (STP)?


Self-Trade Prevention (STP) is a trading mechanism designed to prevent buy and sell orders from the same user (or different accounts belonging to the same entity) from unintentionally matching with each other in the trading system. The STP mechanism is especially important for maintaining a fair and transparent trading environment, helping to prevent market price manipulation and ensuring that trading activity accurately reflects genuine market interest.

MEXC's Self-Trade Prevention (STP) mechanism is used to prevent orders from the same user or users within the same "tradeGroupId" from matching with each other.

2. What is self-trading?


Possible situations where self-trading can occur:
1) Trades between orders from the same account.
2) Trades between different sub-accounts under the same main account.

3. What happens when STP is triggered?


When an order triggers the self-trade prevention mechanism, the system may apply one of the following four modes:

1) NONE Mode: The order is not affected by the STP mechanism. The system does not check the account or tradeGroupId, and the trade executes normally.

2) CANCEL_TAKER Mode: The remaining quantity of the taker order is immediately canceled to prevent the trade from executing.

3) CANCEL_MAKER Mode: The remaining quantity of the maker order is immediately canceled to prevent the trade from executing.

4) CANCEL_BOTH Mode: The remaining quantities of both the taker and maker orders are simultaneously canceled to prevent the trade from executing.

4. How to set the STP Mode for an order


STP mode can be set using the stpMode parameter in the following API calls:
  • POST /api/v3/order
  • POST /api/v3/batchOrders

5. What is "tradeGroupId"?


Accounts sharing the same tradeGroupId are treated as belonging to the same trading group. Orders submitted by members of the same trading group may trigger STP depending on the taker order's STP mode.

6. Which trading pairs support STP?


All trading pairs.

7. Which order types Support STP?


Only the following order types support STP:
  • LIMIT orders
  • MARKET orders
  • LIMIT_MAKER (post-only) orders
  • IMMEDIATE_OR_CANCEL (IOC) orders
Note: STP is not effective when the type is set to FOK (Fill-Or-Kill).

Coin Icon
Daftar sekarang untuk mendapatkan hadiah pengguna baru senilai 10,000 USDT

Berlangganan MEXC Digest

Pergerakan pasar, listing, & wawasan mingguan, langsung ke kotak masuk Anda.
Dengan berlangganan, Anda setuju untuk menerima buletin dan pembaruan email dari MEXC, serta menyetujui Kebijakan Privasi kami. Konten yang disediakan hanya untuk tujuan informasi dan bukan merupakan saran investasi.

Gabung dengan MEXC di Telegram

Ketahui listing, acara, dan perkembangan terbaru secara aktual, langsung dari saluran Telegram resmi kami.

Introduction to Self-Trade Prevention (STP)

1. What is self-trade prevention (STP)?


Self-Trade Prevention (STP) is a trading mechanism designed to prevent buy and sell orders from the same user (or different accounts belonging to the same entity) from unintentionally matching with each other in the trading system. The STP mechanism is especially important for maintaining a fair and transparent trading environment, helping to prevent market price manipulation and ensuring that trading activity accurately reflects genuine market interest.

MEXC's Self-Trade Prevention (STP) mechanism is used to prevent orders from the same user or users within the same "tradeGroupId" from matching with each other.

2. What is self-trading?


Possible situations where self-trading can occur:
1) Trades between orders from the same account.
2) Trades between different sub-accounts under the same main account.

3. What happens when STP is triggered?


When an order triggers the self-trade prevention mechanism, the system may apply one of the following four modes:

1) NONE Mode: The order is not affected by the STP mechanism. The system does not check the account or tradeGroupId, and the trade executes normally.

2) CANCEL_TAKER Mode: The remaining quantity of the taker order is immediately canceled to prevent the trade from executing.

3) CANCEL_MAKER Mode: The remaining quantity of the maker order is immediately canceled to prevent the trade from executing.

4) CANCEL_BOTH Mode: The remaining quantities of both the taker and maker orders are simultaneously canceled to prevent the trade from executing.

4. How to set the STP Mode for an order


STP mode can be set using the stpMode parameter in the following API calls:
  • POST /api/v3/order
  • POST /api/v3/batchOrders

5. What is "tradeGroupId"?


Accounts sharing the same tradeGroupId are treated as belonging to the same trading group. Orders submitted by members of the same trading group may trigger STP depending on the taker order's STP mode.

6. Which trading pairs support STP?


All trading pairs.

7. Which order types Support STP?


Only the following order types support STP:
  • LIMIT orders
  • MARKET orders
  • LIMIT_MAKER (post-only) orders
  • IMMEDIATE_OR_CANCEL (IOC) orders
Note: STP is not effective when the type is set to FOK (Fill-Or-Kill).

Coin Icon
Daftar sekarang untuk mendapatkan hadiah pengguna baru senilai 10,000 USDT

Berlangganan MEXC Digest

Pergerakan pasar, listing, & wawasan mingguan, langsung ke kotak masuk Anda.
Dengan berlangganan, Anda setuju untuk menerima buletin dan pembaruan email dari MEXC, serta menyetujui Kebijakan Privasi kami. Konten yang disediakan hanya untuk tujuan informasi dan bukan merupakan saran investasi.

Gabung dengan MEXC di Telegram

Ketahui listing, acara, dan perkembangan terbaru secara aktual, langsung dari saluran Telegram resmi kami.
Tetap ikuti info terkini mengenai listing, delisting, acara perdagangan, dan kabar terbaru produk MEXC. Temukan token baru, proyek Launchpad, peluang Earn, alat bertenaga AI, dan penyempurnaan perdagangan futures di platform MEXC.Tetap ikuti info terkini mengenai listing, delisting, acara perdagangan, dan kabar terbaru produk MEXC. Temukan token baru, proyek Launchpad, peluang Earn, alat bertenaga AI, dan penyempurnaan perdagangan futures di platform MEXC.