Disclosed CapitolDisclosedCapitol
Home
Plans
Chad AI
API
Sign InGet Pro

Never Miss a Trade

Get weekly trade alerts free.

Explore

  • Politician Trades
  • Politicians
  • Executive Branch
  • Companies
  • All Stocks A–Z
  • Leaderboard
  • Compare Politicians
  • Committee Portfolios
  • Chad AI

Money & Policy

  • Government Contracts
  • Lobbying
  • Legislation
  • Campaign Finance
  • Institutional (13F)
  • Whale Watch (13D)

Markets

  • Markets Overview
  • Top Companies
  • Insider Trends
  • Economic Indicators
  • Live News

Resources

  • API Access
  • Developers
  • Data Export
  • Glossary
  • Methodology
  • Data Sources
  • How It Works

Company

  • About Us
  • Press
  • FAQ
  • Pricing
  • vs. Capitol Trades
  • Contact
  • Watchlist

Legal

  • Editorial Standards
  • Corrections
  • Disclaimers
  • Privacy
  • Terms
© 2026 Disclosed Capitol. All rights reserved.
TermsPrivacyDisclaimer
HomeTrades
Chad
WatchlistAccount
Tutorials · Webhooks Pro

Webhook Setup

Register a URL once and receive a signed JSON payload the instant a congressional trade, filing, or contract lands — no polling.

Pro plan required. Webhooks are a Pro feature — you need a Pro API key to register one (free keys are rejected with a 403). See plans →

How it works

01 · Event
Something happens
A politician buys a stock, or a new filing lands.
02 · Push
We send it to you
We instantly POST the event to your URL as signed JSON.
03 · React
Your app acts
You confirm it's really us, then act — alert, trade, or log it.

Quickstart

You need a Pro API key and a public URL that accepts POST. For testing, grab a throwaway URL at webhook.site.

1 — Create a subscription
curl -X POST https://api.disclosedcapitol.com/alerts/subscriptions \
  -H "DC-API-Key: <your-pro-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "alert_type":     "trade.created",
    "delivery":       "webhook",
    "webhook_url":    "https://your-server.com/hook",
    "webhook_secret": "a-strong-secret-you-choose",
    "filter_value":   "NVDA"
  }'

# → { "id": 12, "status": "created" }
2 — Test-fire it
curl -X POST https://api.disclosedcapitol.com/alerts/subscriptions/12/test \
  -H "DC-API-Key: <your-pro-key>"

# → { "delivered": true, "event": "trade.created", "test": true }

Verify the signature

Every delivery is a POST with a { "event", "data" } body. We sign the raw request body with your webhook_secret using HMAC-SHA256, hex-encoded, in the X-DisclosedCapitol-Signature header.

Verify against the raw bytes, before parsing JSON, using a constant-time compare.

Python
import hmac, hashlib

def verify(raw_body: bytes, signature: str, secret: str) -> bool:
    expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature)
Node.js
const crypto = require("crypto");

function verify(rawBody, signature, secret) {
  const expected = crypto.createHmac("sha256", secret)
    .update(rawBody).digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(expected), Buffer.from(signature));
}

Event catalog

Each data object mirrors the matching REST resource, so REST and webhook consumers parse identically.

disclosure.detectedlowest latency

A new congressional filing appears in the public index — before the PDF is even parsed.

member · party · chamber · tickers · est_amount_high · is_high_signal

trade.createdper scrape

A new congressional stock trade is ingested (post-parse).

politician_name · party · chamber · ticker · trade_type · amount_range · dates

insider.filedweekly

A new SEC Form-4 — a company insider buys or sells their own stock.

insider_name · ticker · transaction_type · shares · total_value · has_politician_overlap

lobbying.fileddaily

A new federal lobbying (LDA) filing is ingested.

registrant_name · client_name · amount · filing_period · url

contract.awardedreal-time

A new federal government contract award (USASpending).

recipient_name · ticker · awarding_agency · amount · award_date

whale.filedreal-time

A new SEC 13D/G — an activist or >5% stakeholder discloses a position.

filer_name · issuer_name · ticker · percent_of_class · position_value

Delivery & reliability

at-least-once
An event may arrive more than once (e.g. after a retry). Deduplicate on data.id within an event type.
timeout
We wait ~10 seconds for a 2xx response. Anything else counts as a failed delivery.
retries
Failed deliveries retry with backoff — roughly 1, 5, 30, 120, 360 minutes, up to 5 attempts — then are abandoned.
auto-disable
After 10 consecutive abandoned deliveries a subscription is disabled and the owner is emailed. Re-enable once your endpoint is healthy.

Your endpoint should return 2xx fast (do slow work async), verify the signature before trusting the payload, and dedupe on data.id.

Example receiver

A minimal endpoint that verifies, deduplicates, and acknowledges fast.

Python · Flask
import hmac, hashlib
from flask import Flask, request, abort

app = Flask(__name__)
SECRET = "a-strong-secret-you-choose"
seen = set()  # use a real store in production

@app.post("/hook")
def hook():
    raw = request.get_data()  # raw bytes — verify BEFORE parsing
    sig = request.headers.get("X-DisclosedCapitol-Signature", "")
    expected = hmac.new(SECRET.encode(), raw, hashlib.sha256).hexdigest()
    if not hmac.compare_digest(expected, sig):
        abort(401)

    evt = request.get_json()
    key = (evt["event"], evt["data"]["id"])
    if key in seen:
        return "", 200        # duplicate — ack & ignore
    seen.add(key)

    handle(evt["event"], evt["data"])  # your logic
    return "", 200            # ack fast; do slow work async

Endpoint reference

GET/alerts/webhook-eventspublicEvent catalog
GET/alerts/webhooks/guidepublicFull machine-readable guide
POST/alerts/subscriptionskeyCreate a subscription
GET/alerts/subscriptionskeyList subscriptions
DEL/alerts/subscriptions/{id}keyDelete a subscription
POST/alerts/subscriptions/{id}/testkeyTest-fire
POST/alerts/subscriptions/{id}/rotate-secretkeyRotate signing secret
GET/alerts/logkeyDelivery history

Base URL api.disclosedcapitol.com · full machine-readable guide at /alerts/webhooks/guide.