API Reference
API Reference
The Wealthnow API has two surfaces that share one key and one credit wallet:
The Wealthnow API has two surfaces that share one key and one credit wallet:
| Surface | Base URL | Auth | What it is |
|---|---|---|---|
| FIRM data API | https://firm.wealthnow.io | Authorization: Bearer tengu_... (or X-API-Key) | REST over 18 metered data products, per-call |
| Brain agent API | https://brain.wealthnow.io/v1 | Authorization: Bearer tengu_... | OpenAI/Anthropic-compatible agent (Enterprise), completed-turn cost |
Authentication#
Send the same tengu_ key to both surfaces in an HTTP header. Authorization
takes precedence when both headers are present:
Authorization: Bearer tengu_...— recommended (works with the OpenAI/Anthropic SDKs and most HTTP clients).X-API-Key: tengu_...
Query authentication using the api_key parameter remains available for
compatibility. URLs may be recorded in access logs, browser history, and monitoring
tools, so use a header to keep the credential out of the URL.
Every FIRM response is a JSON envelope: { "ok": true, "timestamp": "<ISO-8601>", ...data }. The data keys
differ per endpoint (e.g. items for feeds, results for search, quote for a quote).
Discover every live endpoint (method, path, params) at any time — no key required:
curl https://firm.wealthnow.io/api/capabilities | jq '{manifest_version, tool_count, groups}'Products, costs & per-plan access#
Which products your key can call depends on your plan. Calling a product outside your plan returns
402 plan_required and is non-billable. Read detail for the product and required
plan; don't assume an unlocked_by[] field exists in every error envelope.
The table describes access permissions, not guaranteed output availability.
Portfolio VaR and calibrated execution estimates are unavailable and return
503 without consuming credits. Quant intervals and Copilot return or sizing
fields can be withheld when supporting evidence is missing.
| Product | Credits/call | Free | Starter $99 | Pro $499 | Expert $999 | Enterprise |
|---|---|---|---|---|---|---|
| Market Data (quotes, OHLCV, crypto, index) | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
| Fundamentals (statements, ratios, screener) | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
| Public Filings (SEC/EDGAR index + extract) | 1 | ✅ | ✅ | ✅ | ✅ | ✅ |
| Congressional / Politician Trades | 2 | — | ✅ | ✅ | ✅ | ✅ |
| News & Sentiment (equity news, analyst consensus) | 2 | — | ✅ | ✅ | ✅ | ✅ |
| Macro, Rates, FX & Commodities | 2 | — | ✅ | ✅ | ✅ | ✅ |
| Quant Signals (stored predictions, nullable intervals, voter evidence) | 3 | — | ✅ | ✅ | ✅ | ✅ |
| Funds & Institutional (13F + Form-4 insiders) | 4 | — | ✅ | ✅ | ✅ | ✅ |
| Alt-Data (lobbying, contracts, patents, WSB) | 3 | — | — | ✅ | ✅ | ✅ |
| Options Flow & Dealer Positioning | 4 | — | — | ✅ | ✅ | ✅ |
| Execution & Research (TWAP arithmetic and research; calibrated execution unavailable) | 4 | — | — | ✅ | ✅ | ✅ |
| Risk Analytics (research and hedge context; portfolio VaR unavailable) | 5 | — | — | ✅ | ✅ | ✅ |
| Private Markets (10.6M companies, deals, funds) | 5 | — | — | ✅ | ✅ | ✅ |
| Tape & Intraday (minute bars, options/futures prints) | 3 | — | — | ✅ | ✅ | ✅ |
| Credit & Fixed-Income (TRACE bonds, CDS, ratings, loans) | 4 | — | — | ✅ | ✅ | ✅ |
| Transcripts & Events (earnings calls, Key Developments) | 3 | — | — | ✅ | ✅ | ✅ |
| LLM Research (web + Perplexity + Grok) | 6 | — | — | ✅ | ✅ | ✅ |
| Copilot (ticker research, portfolio context, source evidence) | 10 | — | — | — | ✅ | ✅ |
| Brain agent API | final turn cost | — | — | — | — | ✅ |
No-auth routes (no key needed): /api/capabilities, /api/health, /api/openapi.json.
Unmetered health/discovery routes: /api/status, /api/ml/health,
/api/v3/monitoring/system_health. Private Markets search and suggestions cost 5 credits
and require Pro+ or the Private Markets add-on.
À-la-carte add-ons — buy on top of any paid plan (each is its own subscription that unlocks one product + tops your wallet): Private Markets $299/mo, Options Flow $79/mo, Copilot $199/mo. So a Starter or Pro customer can add Copilot without going Enterprise.
Included credits/month: Free 1,000 · Starter 250,000 · Pro 2,000,000 · Expert 5,000,000 · Enterprise 20,000,000. Rate limits: Free 30 · Starter 120 · Pro 600 · Expert 1,200 · Enterprise 6,000 req/min. See Pricing & credits.
Pagination#
Many list endpoints accept ?limit (results per call). Most return one window and take no page parameter:
narrow it with the endpoint's filters or a date range instead. A few routes page:
?page=(1-based):/api/v3/fundamentals/screener,/api/v3/fundamentals/tickers, and 14 news routes under/api/v3/news/and/api/v3/news_crypto/(for exampleticker_news,alerts,ratings).?offset=(0-based):/api/crypto/universeand/api/v3/private_markets/companies.
Defaults and maxima vary by endpoint. The authoritative params are in GET /api/openapi.json and
GET /api/capabilities. Example:
1curl -H "Authorization: Bearer $TENGU_API_KEY" \2 "https://firm.wealthnow.io/api/v3/fundamentals/sec_filings?ticker=AAPL&limit=10"FIRM data endpoints#
Paths are relative to https://firm.wealthnow.io. {ticker} is a symbol like AAPL. This lists the most-used
routes per product; the full versioned catalog is in GET /api/capabilities (filter by tool_count/groups).
Market Data — Free+ · 1 credit#
| Method | Path | Description |
|---|---|---|
GET | /api/market/quote/{ticker} | Live quote (canonical) |
GET | /api/crypto/{ticker} | Live crypto quote |
GET | /api/data/universe | Tradable universe + reference data |
Fundamentals — Free+ · 1 credit#
| Method | Path | Description |
|---|---|---|
GET | /api/v3/fundamentals/company_full/{ticker} | Full financials in one call |
GET | /api/v3/fundamentals/income_statements?ticker={ticker} | Income statement |
GET | /api/v3/fundamentals/balance_sheets?ticker={ticker} | Balance sheet |
GET | /api/v3/fundamentals/cash_flow_statements?ticker={ticker} | Cash flow |
GET | /api/v3/fundamentals/metrics?ticker={ticker} | Key metrics & ratios |
Public Filings (SEC / EDGAR) — Free+ · 1 credit#
| Method | Path | Description |
|---|---|---|
GET | /api/v3/fundamentals/sec_filings?ticker={ticker} | Filing index → {ticker, form_type, items} |
GET | /api/v3/sec/filing/{ticker}/{filing_type} | Filing detail/extract |
Insider / Form-4 data is in the Funds & Institutional product (4 credits), not Public Filings — see below.
Congressional / Politician Trades — Starter+ · 2 credits#
| Method | Path | Description |
|---|---|---|
GET | /api/v3/intel/congress | Congressional trades → {items, count} |
GET | /api/v3/intel/politicians | Politician trades |
GET | /api/v3/intel/corporate_donors/{ticker} | Corporate donors |
News & Sentiment — Starter+ · 2 credits#
| Method | Path | Description |
|---|---|---|
GET | /api/v3/news/summary/{ticker} | Equity news summary |
GET | /api/v3/intel/analyst_consensus/{ticker} | Analyst consensus |
GET | /api/v3/intel/news_headlines | Headlines / why-moving / movers |
Macro, Rates, FX & Commodities — Starter+ · 2 credits#
| Method | Path | Description |
|---|---|---|
GET | /api/v3/macro/treasury_curve | Treasury curve, rates & regime |
GET | /api/v3/intel/yield_curve | Treasury curve |
GET | /api/v3/intel/commodities | Commodities |
GET | /api/v3/news_forex/latest | FX news |
Quant Signals — Starter+ · 3 credits#
Check interval availability and calibration separately. Recent realized coverage is withheld; a stored interval does not establish measured coverage or a 90% band. See Quant Signals for nullable fields and authorization gates.
| Method | Path | Description |
|---|---|---|
GET | /api/v3/intel/ml_prediction/{ticker} | Stored prediction, nullable return estimate and interval, voter evidence |
GET | /api/v3/intel/ml_drivers/{ticker} | SHAP drivers |
GET | /api/v3/intel/voter_attribution/{ticker} | 19-voter decomposition |
GET | /api/v3/decision/trade_setups | Ranked trade setups |
GET | /api/v3/stream/quotes?symbols= | SSE — live per-venue BBO quotes (symbols= required, max 50) |
POST | /api/v3/stream/quotes/subscribe | Pre-warm quote coverage before connecting |
GET | /api/v3/stream/bars | SSE — live 1-minute candles, every US ticker (no subscribe step) |
GET | /api/v3/stream/ticks?symbols= | SSE — live trade prints for warmed symbols |
Streams are long-lived SSE connections billed once per connection, not per frame. See Real-Time Streaming.
Funds & Institutional (13F + Form-4) — Starter+ · 4 credits#
| Method | Path | Description |
|---|---|---|
GET | /api/v3/intel/sec13f?ticker={ticker} | Institutional holdings → {items, count, source} |
GET | /api/v3/intel/top_shareholders/{ticker} | Top shareholders |
GET | /api/v3/fundamentals/institutional_ownership?ticker={ticker} | Institutional ownership |
GET | /api/v3/intel/insiders?ticker={ticker} | Insider (Form-4) activity |
GET | /api/insider/clusters | Cross-insider buy clusters |
Alt-Data — Pro+ · 3 credits#
| Method | Path | Description |
|---|---|---|
GET | /api/v3/intel/lobbying/{ticker} | Lobbying activity |
GET | /api/v3/intel/gov_contracts/{ticker} | Government contracts |
GET | /api/v3/intel/patents/{ticker} | Patents |
GET | /api/v3/intel/exec_compensation/{ticker} | Executive compensation |
GET | /api/v3/intel/wsb/{ticker} | WallStreetBets mentions |
Options Flow & Dealer Positioning — Pro+ · 4 credits#
| Method | Path | Description |
|---|---|---|
GET | /api/v3/intel/options_flow | Unusual options flow |
GET | /api/v3/intel/gex/{ticker} | Gamma exposure |
GET | /api/v3/intel/max_pain/{ticker} | Max pain |
GET | /api/v3/intel/darkpool/{ticker} | Dark-pool prints |
Execution & Research — Pro+ · 4 credits#
TWAP is an arithmetic schedule, not a prediction of fills or trading costs.
Calibrated cost estimates and VWAP without an empirical volume curve return
typed 503 responses without consuming credits. See
Execution & Research for availability limits.
| Method | Path | Description |
|---|---|---|
GET | /api/v3/execution/twap_plan/{ticker} | Arithmetic TWAP schedule from quantity and duration |
GET | /api/v3/execution/vwap_plan/{ticker} | Allocation from a complete named historical volume session |
GET | /api/v3/skills/ta_master/{ticker} | TA & trade-plan skills |
Risk Analytics — Pro+ · 5 credits#
Portfolio VaR, stress, and crash outputs are unavailable until verified account positions, NAV, and calibrated evidence are bound to the calculation. Unavailable portfolio-risk requests do not consume credits. Other research routes have separate evidence requirements; see Risk Analytics.
| Method | Path | Description |
|---|---|---|
POST | /api/v3/risk/historical_var_scenario | Historical VaR and expected shortfall for an explicit supplied portfolio |
GET | /api/v2/risk/var?ticker={ticker} | Portfolio VaR route; unavailable without verified account and calibration inputs |
GET | /api/v2/risk/stress | Portfolio stress route; unavailable without verified account inputs |
GET | /api/v3/institutional/hedging | Hedge research context where supporting observations are available |
Private Markets: Pro+ or add-on · 5 credits, including search#
| Method | Path | Description | Credits |
|---|---|---|---|
GET | /api/v3/private_markets/search?q={query} | Search companies/investors/funds → {results} | 5 |
GET | /api/v3/private_markets/company/{company_id} | Full PitchBook-style profile | 5 |
GET | /api/v3/private_markets/company/{company_id}/dossier | Everything on a company in one call | 5 |
GET | /api/v3/private_markets/company/{company_id}/deals | Funding rounds / M&A history | 5 |
GET | /api/v3/private_markets/companies | Screen by sector/geo | 5 |
Tape & Intraday History — Pro+ · 3 credits#
FIRM's own self-collected tick tape — minute bars, per-print options/futures trades, and a historical options chain with greeks/IV/OI. Full catalogue in Tape & Intraday History.
| Method | Path | Description |
|---|---|---|
GET | /api/v3/tape/bars/{ticker} | Intraday minute bars (FIRM's own capture) |
GET | /api/v3/tape/options_chain/{ticker} | Historical options chain w/ greeks, IV, OI |
GET | /api/v3/tape/options/{ticker} | Raw options trade prints for one day |
GET | /api/v3/tape/futures/{root} | CME futures trade prints |
GET | /api/v3/tape/futures_curve/{root} | Futures term structure |
Credit & Fixed-Income — Pro+ · 4 credits#
Institutional corporate-credit stack from licensed WRDS / S&P Capital IQ archives (served at the latest available lag). Full catalogue in Credit & Fixed-Income.
| Method | Path | Description |
|---|---|---|
GET | /api/v3/credit/{ticker} | One-call credit snapshot (call this first) |
GET | /api/v3/credit/bonds/{ticker} | FINRA TRACE corporate-bond trade prints |
GET | /api/v3/credit/cds/{ticker}/history | Markit single-name CDS spread history |
GET | /api/v3/credit/ratings/{ticker} | S&P credit rating-action history |
GET | /api/v3/credit/loans/{ticker} | DealScan syndicated bank-loan book |
GET | /api/v3/credit/indices | CDX + iTraxx index composites by series/tenor (index-keyed, T-2) |
Research Datasets — cost varies by product group#
Row-level access to the licensed research archives. Full catalogue in Research Datasets.
| Method | Path | Description |
|---|---|---|
GET | /api/v2/datasets | List every dataset slug (4 credits, funds, Starter+) |
GET | /api/v2/datasets/{dataset} | Read rows; each dataset bills at its product group's rate |
Transcripts & Corporate Events — Pro+ · 3 credits#
Full-text S&P Capital IQ earnings-call transcripts + the Key Developments corporate-event ledger back to 1990. Full catalogue in Transcripts & Corporate Events.
| Method | Path | Description |
|---|---|---|
GET | /api/v3/transcripts/{ticker} | List a company's earnings calls / investor events |
GET | /api/v3/transcripts/{ticker}/{event_id} | Full transcript as ordered speaker turns |
GET | /api/v3/transcripts/search | Search transcripts (headlines or full text) |
LLM Research — Pro+ · 6 credits#
Source publication dates can be missing. A response timestamp records retrieval, not the age of the cited information. Inspect source dates before making a freshness claim; see LLM Research.
| Method | Path | Description |
|---|---|---|
GET | /api/v3/research/web_search | Grounded web search |
GET | /api/v3/research/synthesis | Cited research synthesis (prose + source URLs) |
GET | /api/v3/research/x_sentiment | Grok/X sentiment |
Copilot — Expert+ (or $199/mo add-on on Starter/Pro) · 10 credits#
Research ranking is not authorization to trade. Return estimates, intervals, and
sizing can be withheld; inspect capital_authorized and the returned evidence.
The ticker aggregation's candidate_weight_pct is echoed context reserved for a
separate sizing integration, not a portfolio-aware sizing calculation. See
Copilot.
| Method | Path | Description |
|---|---|---|
GET | /api/v3/copilot/ticker_full/{ticker} | Ticker research aggregation with per-layer evidence and availability |
POST | /api/v1/copilot/portfolio | Portfolio review |
GET | /api/v1/copilot/score/{ticker} | Research score; return and sizing fields depend on evidence and authorization |
Brain agent endpoints — Enterprise#
Base URL https://brain.wealthnow.io/v1. Auth Authorization: Bearer tengu_....
| Method | Path | Shape |
|---|---|---|
POST | /v1/chat/completions | OpenAI Chat Completions (model: "brain") |
POST | /v1/messages | Anthropic Messages |
Both support streaming (stream: true). Brain is stateless per request — send the full messages[] history to
continue a conversation. A successful turn's authoritative USD cost is multiplied by
2,500 and rounded up to shared-wallet credits. Returned token counts describe the
main query and can omit auxiliary work; they are not an invoice calculation.
max_tokens accepts integers from 1 through 64,000 and limits each provider
response, not input tokens or dollar cost. See Brain billing and usage.
Brain requires the Enterprise plan (it has autonomous access to the
full product suite); a key without Brain entitlement returns 403 CHAT_ENTITLEMENT_REQUIRED.
Error responses#
FIRM uses a flat error envelope: {"ok": false, "error": "<code>", "detail": "<message>", "request_id": "...", "doc_url": "..."} (message instead of detail with ?shape=firm). When one
parameter caused the error, param names it. doc_url links to this section. The code is usually
also on the X-Error-Code header and the id on X-Request-ID.
Example 422 validation body:
1{2 "ok": false,3 "error": "validation",4 "detail": "invalid 'limit': Input should be a valid integer, unable to parse string as an integer (query.limit)",5 "param": "limit",6 "request_id": "example-request-id",7 "doc_url": "https://app.wealthnow.io/docs/api-reference#error-responses"8}detail is a string, not an object. body["detail"]["error_code"] raises — parse body["error"]
for the code and body["detail"] for the human-readable message. See the _parse_error helper in
Quickstart: Production client.
Some 503 responses come from the route itself: they carry status (such as
unavailable_symbol_volume_curve), reason, available: false, billable: false, and retryable,
with no error field and no X-Error-Code header. Read status as the code.
Every non-2xx response is non-billable. A request refused before its credit reservation is never
debited; one that fails after it is refunded and reports X-Credits-Settlement: refunded with
X-Credits-Cost: 0. See Pricing & credits for the credit headers.
| Status | error | Meaning |
|---|---|---|
400 | invalid_json | The request body isn't valid JSON. |
401 | unauthorized | Key missing, malformed, or not sent. An unset env var produces this too. See Troubleshoot a 401. |
402 | plan_required | Product not in your plan; detail names the product and the plan that unlocks it. |
402 | usage_exceeded | Wallet empty / overage cap reached. |
403 | account_suspended | Billing lapsed. |
404 | not_found | Unknown route or symbol. |
422 | validation | A parameter failed validation; detail names it. Some routes send a more specific code. |
429 | rate_limited | Plan rate limit exceeded. Wait Retry-After seconds. |
429 | billing_unavailable | The metering call didn't confirm a debit, so the request was refused. Header Retry-After: 5. |
500 | internal_error | Unexpected server error. Retry a few times with backoff. |
502 | unkey_unreachable | Transient key-service blip — retry. Header Retry-After: 5. |
502 | billing_unavailable | Credit reservation unavailable — retry. Header Retry-After: 5. |
502 | invalid_paid_response | The result wasn't complete JSON within the response size limit. Narrow the request if it repeats. |
503 | paid_data_unavailable | The route couldn't produce a complete, usable result. Don't retry in a loop. |
503 | capability_data_unavailable | The route is tagged data_pending_v1 and serves no data; status is unavailable_data_pending, retryable: false. |
503 | capability_policy_unavailable | Serving policy temporarily unavailable; retryable: true. |
503 | billing_policy_unavailable | Billing policy temporarily unavailable. Header Retry-After: 5. |
503 | status field, no error | A route-level unavailable body. Retry only when retryable is true. |
504 | request_timeout | The request exceeded the server's time budget. Narrow it (add limit, or a start and end date) before retrying. |
Example 402 plan_required body:
1{2 "ok": false,3 "error": "plan_required",4 "detail": "your plan 'free' does not include 'congressional' — upgrade to Starter to access it. Manage your plan at https://app.wealthnow.io",5 "request_id": "example-request-id"6}Retry 429 and 502, and a 503 only when it carries Retry-After or
"retryable": true, honoring Retry-After with exponential backoff capped at 120
seconds. Before retrying 401, 402, 403, 404, or 422, check credential
delivery, permissions, the wallet or plan restriction, and the requested path.
A 401 alone does not justify rotating a key. See the
Quickstart for the Free-plan quote
check and the reference clients.
Response headers#
Every authenticated response carries these headers, so a client can pace itself and reconcile credits without extra calls.
| Header | Meaning |
|---|---|
X-Request-ID | The request's id. Quote it when you contact support. |
X-RateLimit-Limit | Requests allowed per minute on your plan. |
X-RateLimit-Remaining | Requests left in the current window. |
X-RateLimit-Reset | When the window resets, as a Unix time in seconds. |
Retry-After | On a 429, the seconds to wait before retrying. |
X-Credits-Cost | Credits this request cost (0 when it was refunded). |
X-Credits-Remaining | Credits left in your allowance after this request. |
X-Credits-Receipt | The receipt id for the credits this request reserved. |
X-Credits-Settlement | consumed for a billed success, refunded when a failed request was not charged. |
Deprecation | Present on a deprecated route (RFC 9745). A Link header with rel="successor-version" names the route to move to. |