API Reference

API Reference

The Wealthnow API has two surfaces that share one key and one credit wallet:

Live API

The Wealthnow API has two surfaces that share one key and one credit wallet:

SurfaceBase URLAuthWhat it is
FIRM data APIhttps://firm.wealthnow.ioAuthorization: Bearer tengu_... (or X-API-Key)REST over 18 metered data products, per-call
Brain agent APIhttps://brain.wealthnow.io/v1Authorization: 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:

  1. Authorization: Bearer tengu_...recommended (works with the OpenAI/Anthropic SDKs and most HTTP clients).
  2. 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.

ProductCredits/callFreeStarter $99Pro $499Expert $999Enterprise
Market Data (quotes, OHLCV, crypto, index)1
Fundamentals (statements, ratios, screener)1
Public Filings (SEC/EDGAR index + extract)1
Congressional / Politician Trades2
News & Sentiment (equity news, analyst consensus)2
Macro, Rates, FX & Commodities2
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 Positioning4
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 APIfinal 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 example ticker_news, alerts, ratings).
  • ?offset= (0-based): /api/crypto/universe and /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:

Shell
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#

MethodPathDescription
GET/api/market/quote/{ticker}Live quote (canonical)
GET/api/crypto/{ticker}Live crypto quote
GET/api/data/universeTradable universe + reference data

Fundamentals — Free+ · 1 credit#

MethodPathDescription
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#

MethodPathDescription
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#

MethodPathDescription
GET/api/v3/intel/congressCongressional trades → {items, count}
GET/api/v3/intel/politiciansPolitician trades
GET/api/v3/intel/corporate_donors/{ticker}Corporate donors

News & Sentiment — Starter+ · 2 credits#

MethodPathDescription
GET/api/v3/news/summary/{ticker}Equity news summary
GET/api/v3/intel/analyst_consensus/{ticker}Analyst consensus
GET/api/v3/intel/news_headlinesHeadlines / why-moving / movers

Macro, Rates, FX & Commodities — Starter+ · 2 credits#

MethodPathDescription
GET/api/v3/macro/treasury_curveTreasury curve, rates & regime
GET/api/v3/intel/yield_curveTreasury curve
GET/api/v3/intel/commoditiesCommodities
GET/api/v3/news_forex/latestFX 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.

MethodPathDescription
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_setupsRanked trade setups
GET/api/v3/stream/quotes?symbols=SSE — live per-venue BBO quotes (symbols= required, max 50)
POST/api/v3/stream/quotes/subscribePre-warm quote coverage before connecting
GET/api/v3/stream/barsSSE — 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#

MethodPathDescription
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/clustersCross-insider buy clusters

Alt-Data — Pro+ · 3 credits#

MethodPathDescription
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#

MethodPathDescription
GET/api/v3/intel/options_flowUnusual 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.

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

MethodPathDescription
POST/api/v3/risk/historical_var_scenarioHistorical 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/stressPortfolio stress route; unavailable without verified account inputs
GET/api/v3/institutional/hedgingHedge research context where supporting observations are available
MethodPathDescriptionCredits
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 profile5
GET/api/v3/private_markets/company/{company_id}/dossierEverything on a company in one call5
GET/api/v3/private_markets/company/{company_id}/dealsFunding rounds / M&A history5
GET/api/v3/private_markets/companiesScreen by sector/geo5

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.

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

MethodPathDescription
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}/historyMarkit 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/indicesCDX + 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.

MethodPathDescription
GET/api/v2/datasetsList 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.

MethodPathDescription
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/searchSearch 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.

MethodPathDescription
GET/api/v3/research/web_searchGrounded web search
GET/api/v3/research/synthesisCited research synthesis (prose + source URLs)
GET/api/v3/research/x_sentimentGrok/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.

MethodPathDescription
GET/api/v3/copilot/ticker_full/{ticker}Ticker research aggregation with per-layer evidence and availability
POST/api/v1/copilot/portfolioPortfolio 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_....

MethodPathShape
POST/v1/chat/completionsOpenAI Chat Completions (model: "brain")
POST/v1/messagesAnthropic 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:

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

StatuserrorMeaning
400invalid_jsonThe request body isn't valid JSON.
401unauthorizedKey missing, malformed, or not sent. An unset env var produces this too. See Troubleshoot a 401.
402plan_requiredProduct not in your plan; detail names the product and the plan that unlocks it.
402usage_exceededWallet empty / overage cap reached.
403account_suspendedBilling lapsed.
404not_foundUnknown route or symbol.
422validationA parameter failed validation; detail names it. Some routes send a more specific code.
429rate_limitedPlan rate limit exceeded. Wait Retry-After seconds.
429billing_unavailableThe metering call didn't confirm a debit, so the request was refused. Header Retry-After: 5.
500internal_errorUnexpected server error. Retry a few times with backoff.
502unkey_unreachableTransient key-service blip — retry. Header Retry-After: 5.
502billing_unavailableCredit reservation unavailable — retry. Header Retry-After: 5.
502invalid_paid_responseThe result wasn't complete JSON within the response size limit. Narrow the request if it repeats.
503paid_data_unavailableThe route couldn't produce a complete, usable result. Don't retry in a loop.
503capability_data_unavailableThe route is tagged data_pending_v1 and serves no data; status is unavailable_data_pending, retryable: false.
503capability_policy_unavailableServing policy temporarily unavailable; retryable: true.
503billing_policy_unavailableBilling policy temporarily unavailable. Header Retry-After: 5.
503status field, no errorA route-level unavailable body. Retry only when retryable is true.
504request_timeoutThe request exceeded the server's time budget. Narrow it (add limit, or a start and end date) before retrying.

Example 402 plan_required body:

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

HeaderMeaning
X-Request-IDThe request's id. Quote it when you contact support.
X-RateLimit-LimitRequests allowed per minute on your plan.
X-RateLimit-RemainingRequests left in the current window.
X-RateLimit-ResetWhen the window resets, as a Unix time in seconds.
Retry-AfterOn a 429, the seconds to wait before retrying.
X-Credits-CostCredits this request cost (0 when it was refunded).
X-Credits-RemainingCredits left in your allowance after this request.
X-Credits-ReceiptThe receipt id for the credits this request reserved.
X-Credits-Settlementconsumed for a billed success, refunded when a failed request was not charged.
DeprecationPresent on a deprecated route (RFC 9745). A Link header with rel="successor-version" names the route to move to.