Skip to main content
Version: Next

Update Margin Mode

Update the margin mode for a specified futures trading pair.

API Information

  • Method: POST
  • Path: /api/v1/futures/open-api/account/margin-mode

Request Parameters

ParameterTypeRequiredDescription
symbolstringYesFutures trading pair, e.g. AAPL
marginModeintYesMargin mode: 1=Cross, 2=Isolated

Request Example

{
"symbol": "AAPL",
"marginMode": 2
}

Response Fields

FieldTypeDescription
codeintStatus code, 0 indicates success
data.symbolstringFutures trading pair
data.marginModeintEffective margin mode

Response Example

{
"code": 0,
"data": {
"symbol": "AAPL",
"marginMode": 2
}
}

Relationship to Order Creation

This endpoint is the dedicated API for switching margin mode. The order creation endpoint does not support changing margin mode via request parameters.

After a successful switch, subsequent Create Order requests automatically use the new margin mode. We recommend querying the current marginMode via Account Contract Config before calling this endpoint.

Error Codes

Business errors are returned with HTTP 200. Use the body code field to identify the specific error.

codeDescription
3000Trading pair not found
8009Failed to switch margin mode
8010Cannot change margin mode while holding a position