CME delta-ladder optimization
Use the same margin and optimization calls as the trade-level cleared-rates workflow, but replace swaps with DV01 ladder rows.
payload = {
"calculation_type": "margins",
"portfolio": [
{
"account_code": "CME_RATES_LADDER",
"exchange_code": "CME",
"contract_code": "SR3",
"contract_type": "FUT",
"contract_expiry": "MAR-28",
"net_position": 250,
"account_type": "H",
},
{"account_code": "CME_RATES_LADDER", "index": "USD_SOFR_1D_ERS", "tenor": "365D", "dv01": -42000},
{"account_code": "CME_RATES_LADDER", "index": "USD_SOFR_1D_ERS", "tenor": "1826D", "dv01": 78000},
],
}
baseline = requests.post(f"{C9_API_ENDPOINT}/portfolios", headers=HEADERS, json=payload).json()
payload["portfolio"][0]["cross_margin"] = True
optimized = requests.post(f"{C9_API_ENDPOINT}/portfolios/optimize", headers=HEADERS, json=payload).json()
The optimizer response is identical to the trade-level workflow. Compare total margin and inspect the recommended lots moved into cleared rates.
Use GET /validation-reference/ladder-reference to discover valid indices and CME CORE tenors.