Skip to main content

Set Price Limit Behaviour

You can configure how the system behaves when your limit order price exceeds the highest bid or lowest ask price. You can query your current configuration with Get Trade Behaviour Setting. Learn more about the price limit for spot and futures in the help centre.


Where x% is priceLimitRatioX; and y% is the priceLimitRatioY:

Spot

  • Maximum buy price: Min[Max(Index Price, Index Price × (1 + x%) + 2-Minute Average Premium), Index Price × (1 + y%)]
  • Minimum sell price: Max[Min(Index Price, Index Price × (1 – x%) + 2-Minute Average Premium), Index Price × (1 – y%)]

Futures

  • Maximum Buy Price = min(Mark × (1 + Y), max(Index, Mark × (1 + X) + α × max(0, Premium_avg)))
  • Minimum Sell Price = max(Mark × (1 - Y), min(Index, Mark × (1 - X) + α × min(0, Premium_avg)))

Where:

  • Premium_avg: Average order book premium over the past 30 seconds, calculated every second: avg((Best Ask Price + Best Bid Price) / 2 − Mark Price)
  • α: Weighting factor applied to the premium average. The default value is 1. Bybit may dynamically adjust this parameter based on market conditions.
Default Setting
  • Spot: modifyEnable = false. If the order price exceeds the limit, the system rejects the request.
    Corresponds to Get Limit Price Behaviour, where lpaSpot = false, lpaPerp = true

  • Futures: modifyEnable = true. If the order price exceeds the limit, the system will automatically adjust the price to the nearest allowed price (i.e., highest bid or lowest ask).
    Corresponds to Get Limit Price Behaviour, where lpaSpot = true, lpaPerp = false

  • Setting either linear or inverse will set the behaviour for all futures.

HTTP Request

POST/v5/account/set-limit-px-action

Request Parameters

ParameterRequiredTypeComments
categorytruestringlinear, inverse, spot
modifyEnabletruebooleantrue: allow the system to modify the order price
false: reject your order request

Response Parameters

None

Request Example

POST /v5/account/set-limit-px-action HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1753255927950
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 52

{
"category": "spot",
"modifyEnable": true
}

Response Example

{
"retCode": 0,
"retMsg": "success",
"result": {},
"retExtInfo": {},
"time": 1753255927952
}