REST API · JSON + 8-PAGE PDF

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.

Base URL https://api.macroweeklydesk.com
Download OpenAPI 3.1 YAML

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.

Request Headers
Authorization: Bearer mwd_test_YOUR_SANDBOX_KEYContent-Type: application/jsonIdempotency-Key: cost-2026-q4   # Recommended on all POST requests
Python urllib 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.

1

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"}'
202 Accepted · response.json
{  "ok": true,  "job_id": "job_9xK2mQp7Lw4R",  "ticker": "COST",  "status": "queued",  "poll_url": "https://api.macroweeklydesk.com/v1/equity/reports/job_9xK2mQp7Lw4R"}
2

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:

200 OK · GET /v1/equity/reports/{job_id}
3

Download the PDF & structured JSON

Fetch the print-ready PDF directly from the signed pdf_url and stream the schema-validated JSON payload:

Terminal · Download PDF & Structured JSON
# 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.json

Endpoints

POST /v1/equity/reports

Queues a single-ticker or batch equity valuation run. Returns 202 Accepted immediately with a job_id and poll_url.

FieldTypeRequirementDescription
tickerstringrequired*U.S. listed equity symbol (e.g. COST, TGT).
tickersstring[]batchUp to 25 unique symbols (Platform & Enterprise tiers).
waccnumberoptionalDecimal WACC override between 0.03 and 0.25.
terminal_gnumberoptionalDecimal terminal growth override between 0.00 and 0.06.
horizon_monthsintegeroptionalExplicit target horizon in months (9–36). Defaults to catalyst-reasoned horizon.
peersstring[]optionalUp to 5 explicit peer tickers. Defaults to automated peer discovery.
webhook_urlurioptionalHTTPS endpoint to receive HMAC-SHA256 signed completion callbacks.
GET /v1/equity/reports/{job_id}

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.

GET /v1/equity/reports/{job_id}/json

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".

GET /v1/macro/issues/latest

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 X-MWD-Signature: v1=<hex> signed using your client's webhook_secret over f"{timestamp}.{raw_body}". Failed deliveries retry up to 3 times.

import hashlib, hmac def verify_mwd_webhook(secret: str, ts: str, sig_header: str, raw_body: bytes) -> bool:    expected = "v1=" + hmac.new(        secret.encode("utf-8"),        f"{ts}.".encode("utf-8") + raw_body,        hashlib.sha256,    ).hexdigest()    return hmac.compare_digest(expected, sig_header.strip())

Status Codes & License Tiers

TierMonthly QuotaBatch (tickers[])Custom DCFRedistribution
Sandbox10 / mo (hard cap)1 tickerEnabledEvaluation only
Desk API100 / mo (+overage)1 ticker—Internal desk / CRM
Platform / Quant350 / mo (+overage)Up to 25EnabledInternal platform
Enterprise / OEM1,000+ / uncappedUp to 25EnabledClient & SaaS licensed
HTTP CodeMeaning
202 AcceptedJob queued (or safe idempotent replay of an existing Idempotency-Key).
400 Bad RequestInvalid ticker symbol, out-of-range DCF override, or non-HTTPS webhook_url.
401 UnauthorizedMissing, invalid, or revoked Bearer API key.
403 ForbiddenFeature not included in tier (e.g. batch on Desk) or IP not on allowlist.
404 Not FoundJob ID not found for this API client (strict tenant isolation).
409 ConflictRequested /json before the job reached ready.
429 Too Many RequestsMonthly report quota exceeded on a tier without overage enabled.