Self-Match Prevention (SMP)
Prevents order matching between orders placed by the same user.
What is the Self-Match Prevention feature?
This feature prevents unintentional self-trading by blocking order matches when a user’s own orders meet in the order book. It reduces unnecessary fees and helps ensure regulatory compliance in a more efficient and stable way.
How to Set SMP?
- You can enable this feature using the following API endpoints and parameters:
Endpoint | Parameter |
---|---|
POST v1/orders | smp_type |
POST /orders/cancel_and_new | new_smp_type |
What modes are available?
There are three types of SMP settings available. SMP is applied based on the taker order’s setting. Therefore, it does not valid if the orders are already in the order book.
cancel_taker
: Cancel the taker order when orders from the same user are matched.cancel_maker
: Cancel the maker order when orders from the same user are matched.reduce
: Prevent matching by reducing the volume of both orders by the matched amount when orders from the same user are matched.- In other words, if there is any remaining volume, the order is maintained.
How can I identify if an order was canceled due to SMP?
- If an order is canceled due to the SMP setting, you can identify it by the following fields in the order response:
Parameter | Description |
---|---|
smp_type | Self-Match Prevention (SMP) type
|
prevented_volume | Total volume canceled by SMP |
prevented_locked | (Buy) The amount canceled due to the Self-Match Prevention (SMP) setting. |
- When subscribing to MyOrder (& Trade info) data via WebSocket, if the
state
field will be sent asprevented
, it is the amount (or volume) that was canceled due to SMP.- If nothing remains, the
state
field will be sent ascancel
.
- If nothing remains, the
Notes
- This feature is optional. If you do not specify the
smp_type
, the SMP feature is not be activated. In this case, even orders from the same user can be matched and traded. - Self-match is determined at the time of order traded, not at the time of order placed.
- SMP is available in all order types (
ord_type
), including market orders, limit orders, IOC/FOC, and cancel-and-new-order. - You cannot use post_only condition in the
time_in_force
parameter together with SMP. prevented_locked
is the amount blocked by this feature to prevent self-matching, including applicable fees. For example, if the fee rate is 0.25%, it is calculated as theprevented order amount * 1.0025
.prevented_locked
- For buy orders, this is the amount of the order that was prevented from execution due to the SMP feature, including applicable fees. For example, if the fee rate is 0.25%, the value is calculated by multiplying the prevented order amount by 1.0025.
- For sell orders, the value is not affected by fees so it represents the quantity canceled due to self-match prevention. It is equivalent to
prevented_volume
.
- If an SMP-related field is null in the REST API response, that means the field was not included due to the absence of a value.
prevented_locked
andprevented_volume
fields are always present, because of its default value is 0.
{
"uuid": "53afa136-8882-46e5-8119-614ae10e623b",
"side": "bid",
"...": "...",
"smp_type": "cancel_maker", // only included when not null
"prevented_volume": 1.174291929,
"prevented_locked": 0.001706246173
}
- When subscribing to MyOrder and TradeInfo data via WebSocket, all fields are included in the payload, even if their values are null.
{
"type": "myOrder",
"code": "SGD-XRP",
"uuid": "ac2dc2a3-fce9-40a2-a4f6-5987c25c438f",
"ask_bid": "BID",
"order_type": "limit",
"...": "...",
"smp_type": null, // always included, even if the value is null
"prevented_volume": "0",
"prevented_locked": "0"
...
}
Example


Updated 3 days ago