Guides
Guides

Set leverage by asset id/symbol

Set or update the leverage and margin type for a specific asset, in a specific currency. Setting leverage in one currency does not affect the other; both are independently queryable.

Request

# USDT (default)
curl -X POST "https://trade.mudrex.com/fapi/v1/futures/SOMIUSDT/leverage?is_symbol" \
  -H "Content-Type: application/json" \
  -H "X-Authentication: your-secret-key" \
  -d '{
    "margin_type": "ISOLATED",
    "leverage": "5"
  }'
# INR
curl -X POST "https://trade.mudrex.com/fapi/v1/futures/SOMIUSDT/leverage?is_symbol" \
  -H "Content-Type: application/json" \
  -H "X-Authentication: your-secret-key" \
  -d '{
    "margin_type": "ISOLATED",
    "leverage": "5",
    "trade_currency": "INR"
  }'

Parameters

ParameterTypeRequiredDescription
asset_idstringYesAsset UUID (path) or trading symbol if is_symbol is present.
is_symbolstringNoQuery parameter. If present, asset_id is treated as a trading symbol.
margin_typestringNoCurrently only ISOLATED (defaults to ISOLATED).
leveragenumberYesLeverage value to set (within the asset's permissible range).
trade_currencystringNoUSDT or INR (body field). Defaults to USDT when omitted.

Response

Status: 200 OK

{
    "success": true,
    "data": {
        "margin_type": "ISOLATED",
        "leverage": "5",
        "collateral_currency_id": 0
    }
}

Response fields

FieldDescription
margin_typeMargin type set for the (asset, currency). Currently only ISOLATED.
leverageLeverage level set for the asset in the given currency.
collateral_currency_idInternal collateral currency identifier.

Errors

Common errors

Leverage out of permissible range

{
    "success": false,
    "errors": [
        {
            "code": 400,
            "text": "leverage out of permissible range"
        }
    ]
}

Status: 400 Bad Request — leverage too high, or 0/negative.

Invalid trade currency — any value other than USDT or INR.

{
    "success": false,
    "errors": [
        {
            "code": 400,
            "text": "Invalid trade currency"
        }
    ]
}

Status: 400 Bad Request

Notes

  • Currently only margin_type = ISOLATED is supported, so margin_type is not a mandatory field.
  • Leverage must be within the permissible range for the asset (check asset details for min/max leverage).
  • Leverage is independent per currency: e.g. BTCUSDT INR leverage 2 and USDT leverage 1.5 can coexist, and querying either returns its own value.