Skip to main content

Set Spot Hedging

You can turn on/off Spot hedging feature in Portfolio margin for Unified account

HTTP Request

POST /v5/account/set-hedging-mode

Request Parameters

ParameterRequiredTypeComments
setHedgingModetruestringON, OFF

Response Parameters

ParameterTypeComments
retCodeintegerResult code
retMsgstringResult message

Request Example

POST /v5/account/set-hedging-mode HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1700117968580
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 31

{
"setHedgingMode": "OFF"
}

Response Example

{
"retCode": 0,
"retMsg": "SUCCESS"
}