Skip to main content

Monitoring & Alerts

What to monitor and alert on for market makers.

Health Checks

API Health

Endpoint: GET /health

Response: { "status": "ok" }

Monitoring: Check every 30-60 seconds

Alert: If health check fails, API server may be down

WebSocket Connection

Monitoring: Track WebSocket connection status

Alert: If connection drops, reconnect immediately

Best practice: Implement exponential backoff on reconnect

Order Monitoring

Rejection Rate

Metric: Percentage of orders rejected

Alert: If rejection rate > 5%, investigate:

  • Margin issues
  • Tier restrictions
  • Expired instruments
  • System overload

Fill Rate

Metric: Percentage of orders filled

Alert: If fill rate drops significantly, investigate:

  • Market conditions
  • Quote competitiveness
  • Orderbook depth

Order Latency

Metric: Time from order placement to fill/ack

Alert: If latency > 1s, investigate:

  • System overload
  • Network issues
  • Engine processing delays

Portfolio Monitoring

Margin Usage

Metric: total_margin_used / balance

Alert: If margin usage > 80%, consider:

  • Reducing position size
  • Adding collateral
  • Closing positions

Cash Balance

Metric: Account cash balance

Alert: If cash balance < threshold, deposit funds (when implemented)

MMP Monitoring

MMP Triggers

Metric: Number of MMP triggers per hour

Alert: If MMP triggers frequently, consider:

  • Increasing MMP limits
  • Reducing quoting frequency
  • Reviewing fill patterns

MMP Cancel Rate

Metric: Percentage of orders canceled by MMP

Alert: If MMP cancel rate > 10%, review MMP configuration

System Monitoring

API Response Times

Metric: P50, P95, P99 response times

Alert: If P95 > 500ms, investigate system load

WebSocket Message Rate

Metric: Messages per second on WebSocket

Alert: If message rate spikes, investigate:

  • Market volatility
  • System overload
  • Message processing delays
  1. Health check failure: API server down
  2. High rejection rate: > 5% orders rejected
  3. Low fill rate: < 50% orders filled (context-dependent)
  4. High margin usage: > 80% margin used
  5. MMP triggers: > 5 triggers per hour
  6. WebSocket disconnect: Connection lost
  7. High latency: P95 > 500ms

Monitoring Tools

Recommended:

  • Health check endpoint for uptime monitoring
  • WebSocket connection status tracking
  • Order/fill reconciliation for accuracy
  • Portfolio margin tracking

Current: No built-in monitoring dashboard. Use external tools (e.g., Prometheus, Grafana).

References