Webhooks

Receive real-time notifications for events in your KEK account.

What this covers

  • Available webhook events
  • Webhook configuration
  • Payload formats
  • Security and verification

Available Events

| Event | Description | |-------|-------------| | strategy.generated | New strategy created | | strategy.optimized | Strategy optimization complete | | backtest.complete | Backtest results ready | | trade.executed | Trade was executed | | alert.triggered | Price or performance alert |

Configuration

Register webhook endpoints in your account settings or via API:

curl -X POST "https://api.kek.io/v1/webhooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-server.com/webhook",
    "events": ["trade.executed", "alert.triggered"]
  }'

Payload Format

{
  "event": "trade.executed",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "trade_id": "trade_abc123",
    "symbol": "BTC/USDT",
    "side": "buy",
    "amount": 0.1,
    "price": 42000
  }
}

Security

Webhooks include a signature header for verification:

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