check_multi_leg_margin
Simulate multi-leg strategy margin atomically and sequentially to catch Standard Margin failures where portfolio checks pass but leg-by-leg execution would fail.
Instructions
Pre-flight margin check for multi-leg strategies. Simulates BOTH as an atomic portfolio AND sequentially (leg-by-leg in execution order). CRITICAL for Standard Margin (SM) which does NOT net spreads — short options require full naked margin even with protective long legs. Returns warnings when portfolio simulation passes but sequential execution would fail. Execution order: buy legs first (lowest premium), then sell legs (highest margin). For atomic multi-leg execution, use RFQ instead of CLOB.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"legs": "<legs>"
},
"name": "check_multi_leg_margin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| legs | Yes | Legs to simulate. Direction is REQUIRED for correct margin analysis. | |
| subaccount_id | No | Subaccount ID (defaults to configured) |