Margin and Leverage Parameters
Control margin mode, leverage, and multi-asset settings for futures trading.
margin_mode
- Type:
string - Required: No
- Allowed Values:
isolated,cross(lower case: upper-case values are not recognized) - Default: the connection's margin mode, otherwise
isolated. A Binance connection in BNFCR mode always usescrosswith multi-asset mode.
ISOLATED Mode
Each position has its own margin. Liquidation only affects that position.
CROSS Mode
All positions share account balance. Liquidation affects entire account.
Example
{
"strategy_key": "your_key",
"position_side": "LONG",
"margin_mode": "isolated",
"leverage": 10
}
leverage
- Type:
integer - Required: Yes for futures entries (spot uses 1)
- Description: Leverage multiplier for the position
Details
A futures entry without leverage is not executed (There is no open position for strategy): send it on every futures entry. For exits, the open trade's leverage is used.
If your connection has an account leverage configured, and the signal carries both leverage and tradable_ratio above 0, leverage is multiplied by the account leverage and the ratio is divided by it. The position's notional size stays the same; less margin is used:
finalLeverage = signalLeverage * accountLeverage
tradableRatio = signalTradableRatio / accountLeverage
Examples
Without account leverage:
{
"leverage": 10,
"tradable_ratio": 1.0
}
// Uses 10x leverage, 100% of allocation
With 2x account leverage:
{
"leverage": 10,
"tradable_ratio": 1.0
}
// Actual: 20x leverage, 50% of allocation as margin.
// Notional size is the same as without account leverage.
multi_asset_mode
- Type:
boolean - Required: No
- Default: From connection settings
Details
- Enables multi-asset mode for supported exchanges
- Automatically enabled if connection has multi-asset mode
- Required for BNFCR mode on Binance
Complete Example
{
"strategy_key": "your_key",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "LONG",
"action": "BUY",
"entry_price": 50000,
"leverage": 10,
"margin_mode": "isolated",
"multi_asset_mode": false
}
Best Practices
1. Start with Lower Leverage
// ✅ Conservative
{"leverage": 3}
// ⚠️ Higher risk
{"leverage": 20}
2. Use Isolated for Individual Trades
{
"margin_mode": "isolated",
"leverage": 10
}
3. Cross Mode for Hedging Strategies
{
"margin_mode": "cross",
"leverage": 5
}