Skip to main content

Runbooks

Full desk readiness checklist and integration certification tests.

Desk Readiness Checklist

Before going live, verify:

API Connectivity

  • Staging endpoints tested
  • Production endpoints configured (when available)
  • Health check endpoint responding
  • WebSocket connection stable

Authentication

  • EIP-712 signing working
  • Agent authorization configured (if applicable)
  • Nonce management implemented
  • Signature verification tested

Quoting System

  • Bulk order placement tested
  • Order lifecycle reconciliation verified
  • Fill tracking implemented
  • Cancel functionality tested

Risk Controls

  • MMP configured and tested
  • Margin model understood
  • Tier restrictions verified
  • Portfolio monitoring implemented

Monitoring

  • WebSocket feeds subscribed
  • Order/fill reconciliation automated
  • Health checks configured
  • Alerting set up

Kill Switch

  • Ability to cancel all orders
  • Ability to disconnect immediately
  • Emergency procedures documented

Hedging

  • Integration with Hyperliquid perps verified
  • Delta hedging strategy implemented
  • Perp margin calculation understood

Settlement

  • Expiry handling tested
  • Position settlement verified
  • Reference price source understood

Integration Certification Tests

Test 1: Order Placement

Steps:

  1. Place single order via POST /order
  2. Verify order status: ACKEDOPEN
  3. Check order appears in GET /orders?wallet=...
  4. Verify WebSocket order_updates received

Expected: Order placed successfully, status updates received

Test 2: Bulk Order Placement

Steps:

  1. Place 10 orders via POST /bulk_order
  2. Verify all orders accepted
  3. Check order statuses via REST and WS
  4. Verify no signature/auth errors

Expected: All orders placed successfully

Test 3: Fill Tracking

Steps:

  1. Place order that will fill
  2. Monitor WebSocket fills channel
  3. Verify fill received with correct order_id
  4. Check fill appears in GET /fills?wallet=...
  5. Verify order status updates to FILLED

Expected: Fills tracked correctly, order status updated

Test 4: Partial Fill Tracking

Steps:

  1. Place order that will partially fill
  2. Monitor WebSocket fills channel (not order_updates)
  3. Verify partial fill received
  4. Aggregate fills by order_id to compute filled size
  5. Verify order status remains OPEN (not PARTIALLY_FILLED on WS)

Expected: Partial fills tracked via fills channel, order status correct

Test 5: Order Cancellation

Steps:

  1. Place order via POST /order
  2. Cancel order via DELETE /order
  3. Verify order status: CANCELED
  4. Check WebSocket order_updates received

Expected: Order canceled successfully, status updates received

Test 6: MMP Trigger

Steps:

  1. Configure MMP via POST /mmp-config
  2. Place MMP-enabled orders
  3. Trigger MMP by exceeding limits
  4. Verify orders canceled with MMP reason
  5. Check other MMP-enabled orders also canceled

Expected: MMP triggers correctly, orders canceled

Test 7: Margin Rejection

Steps:

  1. Place order that exceeds margin
  2. Verify order rejected with "Insufficient margin" reason
  3. Check rejection reason includes scenario type
  4. Verify order status: REJECTED

Expected: Order rejected with clear reason

Test 8: Tier Restriction

Steps:

  1. Set wallet to tier1 via POST /user-tier
  2. Attempt to place sell order without long position
  3. Verify order rejected with tier reason
  4. Place buy order (should succeed)
  5. Place sell order to close (should succeed)

Expected: Tier restrictions enforced correctly

Test 9: WebSocket Reconnection

Steps:

  1. Connect to WebSocket
  2. Subscribe to channels
  3. Disconnect WebSocket
  4. Reconnect with exponential backoff
  5. Resubscribe to channels
  6. Poll REST to catch up on missed updates

Expected: Reconnection works, state recovered

Test 10: Portfolio Reconciliation

Steps:

  1. Place and fill orders
  2. Check portfolio via GET /portfolio?wallet=...
  3. Verify positions match fills
  4. Check margin usage correct
  5. Reconcile with WebSocket portfolio updates

Expected: Portfolio state accurate, reconciliation successful

Production Readiness

Pre-Production Checklist

  • All integration tests passed
  • Monitoring and alerting configured
  • Kill switch tested
  • Emergency procedures documented
  • Team trained on incident response
  • Support contacts identified

Go-Live Checklist

  • Staging environment fully tested
  • Production endpoints verified
  • Monitoring dashboards ready
  • Alerting configured
  • Team on-call schedule established
  • Documentation reviewed

References