Configure or update Market Maker Protection (MMP) settings for a smart account and trading pair.
How MMP Works
MMP is a per-order opt-in risk management feature. When placing limit orders, each order includes a required mmp boolean field. Setting mmp: true on an order opts it into MMP protection for that specific order. Orders with mmp: false are completely unaffected by MMP at all times.
Lifecycle:
- Configure MMP with risk limits via this endpoint (per trading pair)
- Place orders with
mmp: trueto opt them into MMP protection - Only trades from
mmp: trueorders count toward MMP threshold calculations - When a threshold is breached, only open orders with
mmp: trueare automatically cancelled - Account is frozen for
frozen_timeseconds — during which new orders withmmp: trueare rejected (orders withmmp: falsecan still be placed) - After freeze expires, MMP counters reset and normal trading resumes
- If
frozen_timeis 0, the freeze is indefinite — reset by re-submitting the MMP config with status "active" (this resets counters and clears the freeze)
Order Editing: Orders with mmp: true can be edited normally while MMP is active and not frozen. If MMP is frozen, edits to mmp: true orders are rejected — the order retains its mmp: true status and would be rejected at the sequencer regardless. Orders with mmp: false can always be edited.
Deactivation: When MMP is deactivated (status set to inactive), all open orders with mmp: true for the specified pair are automatically cancelled. The response includes the list of cancelled order IDs. This cancellation is best-effort — if it fails, the config is still deactivated but orders may remain open.
Risk Limits
- Quantity Limit: Total option contracts traded within the interval — cumulative absolute value, not net (Options only)
- Delta Limit: Maximum absolute net delta exposure (Perpetuals and Options)
- Vega Limit: Maximum absolute net vega exposure (Options only)
Important Notes
- At least one limit must be set when status is "active"
- Setting status to "inactive" will delete the MMP configuration and cancel all open
mmp: trueorders for that pair - When MMP is triggered, only open orders with
mmp: trueare automatically cancelled — orders withmmp: falseare not affected - Trading for
mmp: trueorders is frozen for the specifiedfrozen_timeduration
EIP-712 Signature
The request requires an EIP-712 signature with the following structure:
const MMPConfigType = [
{ name: 'smartAccountAddress', type: 'address' },
{ name: 'pairSymbol', type: 'string' },
{ name: 'status', type: 'string' },
{ name: 'interval', type: 'uint256' },
{ name: 'frozenTime', type: 'uint256' },
{ name: 'deadline', type: 'uint256' }
];
Note: The risk limit fields (quantity_limit, delta_limit, vega_limit) are included in the
request body but are not part of the signed EIP-712 message. Only the 6 fields above are signed.
