GRVT has set up a logic to prevent users from inadvertently trading against themselves.
The Self Trade Prevention (STP) will be applicable to a pair of two accounts if they are two Trading Accounts within the same Funding Account.
Modes and Logic
For any order, the "selfTradePreventMode" field determines the logic. When a taker order is matched with a maker order, only the mode in the taker order is considered, ignoring the maker order's mode.
Mode | Logic |
NONE | NO STP will be triggered. Orders will match. |
EXPIRE_TAKER | STP will be triggered and the taker order will be revoked, but the maker order will still be there in the book. |
EXPIRE_MAKER | STP will be triggered and the maker order will be revoked, but the taker order will still be there in the book. |
EXPIRE_BOTH | STP will be triggered and both of them will be revoked. |