Skip to content

Liquidation Alert

POST /liquidation/alert

Create a webhook alert triggered when liquidation cascade risk exceeds your threshold.

Cost: $0.06 USDC

Request Body

json
{
  "symbol": "BTC",
  "threshold_pct": 5.0,
  "min_value_usd": 100000000,
  "webhook_url": "https://your-bot.com/webhook",
  "expires_in_hours": 24
}

Parameters

FieldTypeRequiredDescription
symbolstringYesToken symbol (e.g. BTC, ETH)
conditionstringNoAlert condition (default: cascade_risk)
threshold_pctfloatNoOI at risk % to trigger alert (default: 5.0)
min_value_usdfloatNoMinimum USD OI at risk to trigger (default: 0)
webhook_urlstringYesCallback URL (must be HTTPS)
expires_in_hoursintNoAlert lifetime in hours, 1–168 (default: 24)

Response

json
{
  "alert_id": "alert_liq_btc_1720447800_001",
  "symbol": "BTC",
  "status": "active",
  "threshold_pct": 5.0,
  "min_value_usd": 100000000,
  "webhook_url": "https://your-bot.com/webhook",
  "expires_at": "2026-07-09T14:30:00Z",
  "message": "Liquidation alert created successfully"
}

GET /liquidation/alert/:id

Check the status of an existing liquidation alert.

Cost: FREE

bash
curl https://api.foursec.xyz/liquidation/alert/alert_liq_btc_1720447800_001

DELETE /liquidation/alert/:id

Cancel an active liquidation alert.

Cost: FREE

bash
curl -X DELETE \
  https://api.foursec.xyz/liquidation/alert/alert_liq_btc_1720447800_001

GET /liquidation/alerts

List all active liquidation alerts.

Cost: FREE

Query Parameters

ParamTypeDescription
walletstringFilter by wallet address

POST /liquidation/alert/:id/extend

Extend the duration of an active liquidation alert.

Cost: $0.03 USDC

Request Body

json
{
  "add_hours": 24
}

Webhook Payload

When cascade risk threshold is exceeded:

json
{
  "event": "liquidation_alert",
  "alert_id": "alert_liq_btc_1720447800_001",
  "symbol": "BTC",
  "severity": "high",
  "data": {
    "triggered": true,
    "current_price": 57200,
    "oi_at_risk_usd": 450000000,
    "oi_at_risk_pct": 8.2,
    "cascade_risk": "high",
    "threshold_pct": 5.0
  },
  "timestamp": "2026-07-08T14:30:00Z"
}

Signature: X-4SEC-Signature: sha256=<hmac-hex> (same as price alerts).

Built with x402 protocol on Base