Set MMP
What is MMP?
Market Maker Protection (MMP) is an automated mechanism designed to protect market makers (MM) against liquidity risks and over-exposure in the market. It prevents simultaneous trade executions on quotes provided by the MM within a short time span. The MM can automatically pull their quotes if the number of contracts traded for an underlying asset exceeds the configured threshold within a certain time frame. Once MMP is triggered, any pre-existing MMP orders will be automatically canceled, and new orders tagged as MMP will be rejected for a specific duration — known as the frozen period — so that MM can reassess the market and modify the quotes.
How to enable MMP
Send an email to Bybit (financial.inst@bybit.com) or contact your business development (BD) manager to apply for MMP. After processed, the default settings are as below table:
Parameter | Type | Comments | Default value |
---|---|---|---|
baseCoin | string | Base coin | BTC |
window | string | Time window (millisecond) | 5000 |
frozenPeriod | string | Frozen period (millisecond) | 100 |
qtyLimit | string | Quantity limit | 100 |
deltaLimit | string | Delta limit | 100 |
Applicable
Effective for options only. When you place an option
order, set mmp
=true, which means you mark this order as a mmp order.
Some points to note
- Only maker order qty and delta will be counted into
qtyLimit
anddeltaLimit
. qty_limit
is the sum of absolute value of qty of each trade executions.delta_limit
is the absolute value of the sum of qty*delta. If any of these reaches or exceeds the limit amount, the account's market maker protection will be triggered.
HTTP Request
POST /v5/account/mmp-modify
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
baseCoin | true | string | Base coin, uppercase only |
window | true | string | Time window (ms) |
frozenPeriod | true | string | Frozen period (ms). "0" means the trade will remain frozen until manually reset |
qtyLimit | true | string | Trade qty limit (positive and up to 2 decimal places) |
deltaLimit | true | string | Delta limit (positive and up to 2 decimal places) |
Response Parameters
None
Request Example
- HTTP
- Python
- Node.js
POST /v5/account/mmp-modify HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1675833524616
X-BAPI-RECV-WINDOW: 50000
Content-Type: application/json
{
"baseCoin": "ETH",
"window": "5000",
"frozenPeriod": "100000",
"qtyLimit": "50",
"deltaLimit": "20"
}
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.set_mmp(
baseCoin="ETH",
window="5000",
frozenPeriod="100000",
qtyLimit="50",
deltaLimit="20"
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.setMMP({
baseCoin: 'ETH',
window: '5000',
frozenPeriod: '100000',
qtyLimit: '50',
deltaLimit: '20',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Response Example
{
"retCode": 0,
"retMsg": "success"
}