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 (Max (Index Price, Mark Price × (1 + x%)), Mark Price × (1 + y%))
  • Minimum sell price: Max (Min (Index Price, Mark Price × (1 - x%)), Mark Price × (1 - y%))
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
}