You operate a stablecoin-heavy strategy and need to exit on the first credible signal that a peg is breaking. The risk-events feed delivers depeg starts as they happen, with peg health, deviation in basis points, and the underlying classification.Documentation Index
Fetch the complete documentation index at: https://docs.alterscope.org/llms.txt
Use this file to discover all available pages before exploring further.
What you build
A signed webhook receiver that listens forpeg.depeg.start and triggers your existing kill-switch.
1. Subscribe to the event
2. Verify the signature
Every delivery setsAlterscope-Signature: t=<unix>,v1=<hex> (the v1 MAC is HMAC-SHA256 of <t>.<raw_body>). Recompute, compare v1 in constant time, and reject stale timestamps (~5 min) or anything that doesn’t match. A legacy X-Alterscope-Signature (raw-body hex) is dual-sent during the 60-day transition.
3. Sample payload
4. Troubleshooting
- Missed events: webhooks retry with exponential backoff for 24 hours, then DLQ. Use the replay recipe to recover.
- Duplicate deliveries: receivers should be idempotent on
data.as_of_block + asset_id. - Signature failures: confirm body is the raw bytes, not the JSON-decoded object.