Institutional Valuation & Macro Research API
Programmatically trigger deterministic 5-period SEC EDGAR financials, DCF sensitivity matrices, peer valuation comps, 3-year dividend-adjusted TSR, and print-ready 8-page US Letter PDF monographs for any U.S. public stock. Enforced over TLS 1.3 with hybrid post-quantum key agreement (X25519MLKEM768) and HSTS.
Authentication & Headers
Authenticate all /v1/* requests using a scoped Bearer API key (mwd_test_... for sandbox, mwd_live_... for production). Keys support optional IP allowlisting and instant revocation.
Authorization: Bearer mwd_test_YOUR_SANDBOX_KEYContent-Type: application/jsonIdempotency-Key: cost-2026-q4 # Recommended on all POST requestsurllib Note: Cloudflare Browser Integrity Check blocks default Python-urllib/* User-Agent headers. Standard curl, requests, httpx, and Node fetch work out of the box; if using urllib, pass an explicit User-Agent: YourFirm-Client/1.0.
Quickstart
Equity valuations execute asynchronously (typically 1–3 minutes) so your client never blocks on SEC filing sync or Chromium PDF rendering.
Queue a valuation job
Submit a ticker with an Idempotency-Key (safe retries never double-count quota):
curl -X POST https://api.macroweeklydesk.com/v1/equity/reports \ -H "Authorization: Bearer mwd_test_YOUR_SANDBOX_KEY" \ -H "Idempotency-Key: cost-2026-q4" \ -H "Content-Type: application/json" \ -d '{"ticker": "COST", "webhook_url": "https://desk.example.com/webhooks/mwd"}'import requests resp = requests.post( "https://api.macroweeklydesk.com/v1/equity/reports", headers={ "Authorization": "Bearer mwd_test_YOUR_SANDBOX_KEY", "Idempotency-Key": "cost-2026-q4", }, json={"ticker": "COST", "wacc": 0.085, "terminal_g": 0.025}, timeout=15,)job = resp.json()print(job["job_id"], job["poll_url"])const res = await fetch("https://api.macroweeklydesk.com/v1/equity/reports", { method: "POST", headers: { Authorization: "Bearer mwd_test_YOUR_SANDBOX_KEY", "Idempotency-Key": "cost-2026-q4", "Content-Type": "application/json", }, body: JSON.stringify({ ticker: "COST", horizon_months: 18 }),});const job = await res.json();console.log(job.job_id, job.poll_url);{ "ok": true, "job_id": "job_9xK2mQp7Lw4R", "ticker": "COST", "status": "queued", "poll_url": "https://api.macroweeklydesk.com/v1/equity/reports/job_9xK2mQp7Lw4R"}Poll status or await webhook
Poll GET /v1/equity/reports/{job_id} or listen on your HTTPS webhook_url. When status transitions to ready, time-limited signed URLs (15 min TTL) are returned:
{ "ok": true, "job_id": "job_9xK2mQp7Lw4R", "ticker": "COST", "status": "ready", "duration_ms": 68420, "created_at": "2026-12-03T05:10:02.411Z", "completed_at": "2026-12-03T05:11:10.831Z", "artifacts": { "pdf_url": "https://api.macroweeklydesk.com/v1/artifacts/job_9xK2mQp7Lw4R/report.pdf?exp=1796275570&sig=8f2a...", "html_url": "https://api.macroweeklydesk.com/v1/artifacts/job_9xK2mQp7Lw4R/index.html?exp=1796275570&sig=4c91...", "json_url": "https://api.macroweeklydesk.com/v1/equity/reports/job_9xK2mQp7Lw4R/json", "expires_in_seconds": 900 }}Download the PDF & structured JSON
Fetch the print-ready PDF directly from the signed pdf_url and stream the schema-validated JSON payload:
# Download the 8-page US Letter PDF (signed URL requires no Bearer header)curl -sSL "https://api.macroweeklydesk.com/v1/artifacts/job_9xK2mQp7Lw4R/report.pdf?exp=...&sig=..." -o COST.pdf # Download the schema-validated EquityDeepDive JSONcurl -sS "https://api.macroweeklydesk.com/v1/equity/reports/job_9xK2mQp7Lw4R/json" \ -H "Authorization: Bearer mwd_test_YOUR_SANDBOX_KEY" -o COST.jsonEndpoints
Queues a single-ticker or batch equity valuation run. Returns 202 Accepted immediately with a job_id and poll_url.
| Field | Type | Requirement | Description |
|---|---|---|---|
ticker | string | required* | U.S. listed equity symbol (e.g. COST, TGT). |
tickers | string[] | batch | Up to 25 unique symbols (Platform & Enterprise tiers). |
wacc | number | optional | Decimal WACC override between 0.03 and 0.25. |
terminal_g | number | optional | Decimal terminal growth override between 0.00 and 0.06. |
horizon_months | integer | optional | Explicit target horizon in months (9–36). Defaults to catalyst-reasoned horizon. |
peers | string[] | optional | Up to 5 explicit peer tickers. Defaults to automated peer discovery. |
webhook_url | uri | optional | HTTPS endpoint to receive HMAC-SHA256 signed completion callbacks. |
Returns current job status (queued, running, ready, failed), runtime in milliseconds, and 15-minute signed download URLs for report.pdf and index.html once complete. Strictly scoped to the authenticated client.
Streams the full schema-validated EquityDeepDive JSON payload directly from private R2 storage: 5-period financial summary, DCF fair value & 5×5 sensitivity matrix, peer comps + median, 3-year dividend-adjusted TSR series, and primary SEC filing citations. Returns 409 Conflict if called before status == "ready".
Returns the latest published Weekly Macro Desk cross-asset edition as structured JSON (macro regime, rates, credit spreads, equities, FX, crypto KPIs, and desk watch levels).
Webhooks
Every webhook callback includes X-MWD-Timestamp (Unix seconds) and dual signatures over f"{timestamp}.{raw_body}": X-MWD-Signature-V2: v2=<hex> (CNSA 2.0 HMAC-SHA384, recommended) and X-MWD-Signature: v1=<hex> (HMAC-SHA256). Outbound targets must be public HTTPS hosts (private/loopback IPs are blocked). Failed deliveries retry up to 3 times.
import hashlib, hmac # Recommended: verify CNSA 2.0 X-MWD-Signature-V2 (v2= HMAC-SHA384)def verify_mwd_webhook_v2(secret: str, ts: str, sig_v2: str, raw_body: bytes) -> bool: expected = "v2=" + hmac.new( secret.encode("utf-8"), f"{ts}.".encode("utf-8") + raw_body, hashlib.sha384, ).hexdigest() return hmac.compare_digest(expected, sig_v2.strip())import crypto from "node:crypto"; // Recommended: verify CNSA 2.0 X-MWD-Signature-V2 (v2= HMAC-SHA384)export function verifyMwdWebhookV2(secret, ts, sigV2, rawBody) { const expected = "v2=" + crypto.createHmac("sha384", secret).update(`${ts}.${rawBody}`).digest("hex"); return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(sigV2.trim()));}Status Codes & License Tiers
| Tier | Monthly Quota | Burst Limit | Batch (tickers[]) | Custom DCF | Redistribution |
|---|---|---|---|---|---|
| Sandbox | 10 / mo (14-day expiry) | 5 / min | 1 ticker | Enabled | Evaluation only |
| Desk API | 100 / mo (+overage) | 20 / min | 1 ticker | — | Internal desk / CRM |
| Platform / Quant | 350 / mo (+overage) | 40 / min | Up to 25 | Enabled | Internal platform |
| Enterprise / OEM | 1,000+ / uncapped | 60 / min | Up to 25 | Enabled | Client & SaaS licensed |
| HTTP Code | Meaning |
|---|---|
202 Accepted | Job queued (or safe idempotent replay of an existing Idempotency-Key). |
400 Bad Request | Invalid ticker symbol, out-of-range DCF override, or non-HTTPS webhook_url. |
401 Unauthorized | Missing, invalid, or revoked Bearer API key. |
403 Forbidden | Feature not included in tier (e.g. batch on Desk) or IP not on allowlist. |
404 Not Found | Job ID not found for this API client (strict tenant isolation). |
409 Conflict | Requested /json before the job reached ready. |
429 Too Many Requests | Monthly report quota exceeded on a tier without overage enabled. |