CME ETD and cleared-rates optimization
Combine an eligible CME rates future with trade-level cleared swaps, calculate the book, then ask the optimizer to test the listed-versus-cleared allocation.
payload = {
"calculation_type": "margins",
"portfolio": [
{
"account_code": "CME_RATES_IRS",
"exchange_code": "CME",
"contract_code": "SR3",
"contract_type": "FUT",
"contract_expiry": "MAR-28",
"net_position": -250,
"account_type": "H",
},
{
"account_code": "CME_RATES_IRS",
"clearing_house": "CME",
"trade_id": "IRS-10Y-RECEIVE",
"type": "OIS",
"direction": "RECEIVE",
"notional": 100000000,
"currency": "USD",
"effective_date": "20260908",
"maturity_date": "20360908",
"fixed_rate": 3.5,
"float_index": "USD-SOFR-COMPOUND",
"pay_frequency": "6M",
},
],
}
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()
Compare baseline.total with optimized.total, then follow each leg's recommendation, lots_to_seq, and lots_left_in_seg. The cleared-rates engine must be enabled on the caller's licence.
Use GET /validation-reference/irs-reference for accepted swap fields and values.