QuantSet Docs Developer console

Set up webhooks

Register an HTTPS receiver and verify a signed test delivery before using its payload.

Register the receiver

Use a key with webhook access. Replace the example URL with your receiver. Save the id and secret from the 201 response. Listing your subscriptions later returns their configuration and omits the signing secret.

curl -X POST "https://api.quantset.dev/api/v1/webhooks" \
  -H "X-API-Key: $QUANTSET_API_KEY" -H 'Content-Type: application/json' \
  --data '{"url":"https://receiver.example/quantset","events":["filing.created"]}'

Verify the incoming POST

The X-Quantset-Signature header contains t (Unix seconds) and v1 (a hex digest). At your receiver, compute HMAC-SHA256 over the timestamp, a period and the exact raw request bytes. Compare before parsing JSON. The five-minute tolerance below is a receiver policy for rejecting stale requests.

import hashlib
import hmac
import time

def valid_delivery(secret, signature, raw_body):
    try:
        fields = dict(part.split("=", 1) for part in signature.split(","))
        timestamp = fields["t"]
        if abs(time.time() - int(timestamp)) > 300:
            return False
        signed = timestamp.encode("ascii") + b"." + raw_body
        expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
        return hmac.compare_digest(expected, fields["v1"])
    except (KeyError, ValueError, TypeError):
        return False

Send a test delivery

curl -X POST "https://api.quantset.dev/api/v1/webhooks/$WEBHOOK_ID/test" \
  -H "X-API-Key: $QUANTSET_API_KEY"

Your receiver gets a JSON envelope like this illustrative filing test. Read type (also sent as X-Quantset-Event), livemode and data.object. A test has livemode=false and uses a synthetic filing object even when another event was selected.

{"id":"evt_test_example","type":"filing.created","api_version":"1.0","livemode":false,"created":1780315200,"data":{"object":{"instrument_id":"us:NVDA","accession_number":"0001045810-26-000000","form_type":"8-K","filing_date":"2026-06-01"}}}

Return a 2xx status after accepting the delivery. Inspect delivered and status_code in the test receipt. Treat repeated deliveries idempotently. A successful test confirms receiver connectivity and signing.

Subscription event names

  • filing.created — filing
  • earnings.created — earnings disclosure
  • insider_trade.created — insider transaction
  • activist_filing.created — activist ownership filing
  • form144.created — proposed sale notice
  • ipo_filing.created — IPO filing

Registration accepts these names. Automatic delivery depends on a connected event producer. Only the explicit test delivery is verified in this workflow. Use the filings endpoint when you need to check for new filings.

Manage a subscription

GET /api/v1/webhooks lists subscriptions for the account. DELETE /api/v1/webhooks/{webhook_id} removes the selected receiver. See create a webhook and test a webhook for the response schemas.