pub async fn get_risk_grid(
__arg0: State<AppState>,
__arg1: Query<RiskGridQuery>,
) -> ResponseExpand description
Get extended risk grid for a wallet.
Returns detailed margin breakdown and scenario P&L for risk analysis. This is similar to Deribit’s risk grid endpoint.
The response includes:
equity: Executed PM equity = cash + executed option UPNL + executed perp UPNLposition_initial_margin: IM from executed positions onlyposition_maintenance_margin: MM threshold for liquidationopen_orders_initial_margin: Additional IM from open ordersscenarios: P&L under each SPAN scenario