Skip to main content

Set Leverage

Set the user's maximum leverage in spot cross margin

Covers: Margin trade (Unified Account)

caution

Your account needs to activate spot margin first; i.e., you must have finished the quiz on web / app.

HTTP Request

POST /v5/spot-margin-trade/set-leverage

Request Parameters

ParameterRequiredTypeComments
leveragetruestringLeverage. [2, 10].

Response Parameters

None

Request Example

POST /v5/spot-margin-trade/set-leverage HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672299806626
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"leverage": "4"
}

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {},
"retExtInfo": {},
"time": 1672710944282
}