Calculate risk metrics for hypothetical portfolios

Calculate comprehensive risk metrics for one or more portfolios without requiring actual positions. This endpoint is ideal for "what-if" scenarios, risk analysis before trading, and portfolio planning.

Risk Metrics Calculated

For each portfolio, the system calculates:

Margin Requirements:

  • initial_margin: Capital required to open these positions
  • maintenance_margin: Minimum capital to avoid liquidation

Risk Components:

  • matrix_risk: Worst-case loss under various market scenarios
  • delta_risk: Additional margin for systemic market moves
  • roll_risk: Extra margin required near option expiration

Portfolio Greeks:

  • delta: Rate of change with underlying price
  • gamma: Rate of change of delta
  • vega: Sensitivity to volatility changes
  • theta: Time decay per day
  • rho: Interest rate sensitivity

Key Features

  • No Account Required: Analyze risk without having positions
  • Multiple Portfolios: Process multiple trading pairs in one request
  • Hypothetical Analysis: Test strategies before executing trades
  • Individual Results: Each portfolio succeeds/fails independently

Use Cases

  1. Pre-Trade Analysis: Check margin requirements before placing orders
  2. Strategy Testing: Evaluate risk of complex option strategies
  3. Portfolio Planning: Compare risk across different position combinations
  4. Education: Learn how different positions affect portfolio risk

Important Notes

  • This endpoint does NOT calculate equity or P&L
  • Risk calculations use current market prices (mark prices) only
  • Each portfolio in the array is processed independently
  • Failed portfolios return error details without affecting others
  • All monetary values are in USDC with 6 decimal precision
  • Designed for hypothetical analysis based on current market conditions
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!