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
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_id | string | Yes | Asset UUID (path) or trading symbol if is_symbol is present. |
is_symbol | string | No | Query parameter. If present, asset_id is treated as a trading symbol. |
margin_type | string | No | Currently only ISOLATED (defaults to ISOLATED). |
leverage | number | Yes | Leverage value to set (within the asset's permissible range). |
trade_currency | string | No | USDT 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
| Field | Description |
|---|---|
margin_type | Margin type set for the (asset, currency). Currently only ISOLATED. |
leverage | Leverage level set for the asset in the given currency. |
collateral_currency_id | Internal 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 = ISOLATEDis supported, somargin_typeis 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.
BTCUSDTINR leverage2and USDT leverage1.5can coexist, and querying either returns its own value.
