Skip to main content

Webhooks

TRADEOS.tech can push real-time event notifications to any HTTPS endpoint you configure. This allows you to build integrations with external alerting systems, record-keeping tools, or custom dashboards.

Supported Event Types

EventDescription
trade.openedA new position was opened
trade.closedA position was closed
trade.stoppedA position was closed by stop-loss
signal.rejectedA signal was rejected by a risk gate
drawdown.gate.activatedDrawdown signal gate tripped
drawdown.breaker.activatedDrawdown breaker tripped, positions closing
circuit_breaker.trippedA circuit breaker has activated
system.health.degradedSystem health has dropped below healthy threshold
system.health.restoredSystem health has recovered

Configuring Webhooks

  1. Navigate to Settings → Webhooks in the dashboard
  2. Click Add Webhook
  3. Enter your endpoint URL (must be HTTPS)
  4. Select the event types you want to receive
  5. Optionally add a secret for request signature verification
  6. Click Save and Test — TRADEOS.tech will send a test event to verify delivery

Payload Format

All webhook events share a common envelope:

{
"event": "trade.opened",
"timestamp": "2026-03-10T12:00:00Z",
"event_id": "evt_abc123",
"data": {
// event-specific data
}
}

trade.opened

{
"event": "trade.opened",
"timestamp": "2026-03-10T12:00:00Z",
"event_id": "evt_abc123",
"data": {
"trade_id": "trade_xyz789",
"symbol": "BTC-PERP",
"side": "long",
"size": 0.1,
"entry_price": 85000.00,
"stop_loss": 83200.00,
"signal_score": 0.78,
"regime": "trending_bull",
"execution_algorithm": "adaptive"
}
}

trade.closed

{
"event": "trade.closed",
"timestamp": "2026-03-10T14:30:00Z",
"event_id": "evt_def456",
"data": {
"trade_id": "trade_xyz789",
"symbol": "BTC-PERP",
"side": "long",
"close_reason": "signal_reversal",
"pnl": 145.00,
"pnl_pct": 1.71,
"holding_period_minutes": 150
}
}

Signature Verification

If you configure a webhook secret, TRADEOS.tech includes an HMAC-SHA256 signature in every request:

X-TradeOS-Signature: sha256=abc123...

To verify:

import hmac, hashlib

def verify_webhook(payload_bytes, secret, signature_header):
expected = hmac.new(
secret.encode(),
payload_bytes,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature_header)

Reliability

TRADEOS.tech retries failed webhook deliveries with exponential backoff (up to 5 attempts over ~30 minutes). If all retries fail, the event is logged and flagged in the dashboard. Webhook delivery failures do not affect signal, risk, or execution operations.