Start with the user workflow: history tables, 1D through MAX windows, extreme moves, attribution, hedging, optimization, and bulk exports. Then wire the SEC API endpoint that returns the same job with compact responses, request diagnostics, and trust metadata.
What improves when you switch
Agent-first payloads
response_mode=compact keeps factor, portfolio, and model payloads small by default while include=series,trust expands only the fields your workflow needs.Trust metadata beside the data
Freshness, methodology, materialization, degraded-state, and request diagnostics travel with the response instead of living in a separate support channel.
One surface for REST, SDKs, CLI, and MCP
The same factor workflows are exposed through API reference pages, generated SDKs, CLI commands, and hosted MCP tools for agentic workflows.
Portfolio and model workflows
Attribution, hedging, optimization, stress testing, and model factor analysis share submitted-holdings contracts that work in apps and agents.
Endpoint Mapping
Launch Coverage Posture
SEC API’s launch factor surface is built around U.S. market, style, sector, and industry workflows. Launch factors target a2015-01-01 public history floor, and public history claims should be made only where row-level coverage, freshness, model version, and methodology metadata prove the factor.
Shorter-history, beta, blocked, and deferred factors are labeled in catalog or methodology metadata. Do not treat a tracked catalog definition as a launch claim by itself.
Workflow Translation Patterns
Factor History And Tables
Usefactors/history/{factorKey} when the UI focuses on one factor, and factors/sparklines when the UI needs many compact rows for index, sector, dashboard, or model tables.
range=max only with the proven row-level floor for that factor. For launch-facing claims, preserve historyStartDate, historyEndDate, observationCount, lastCompleteMarketDate, freshness, materialization, and methodology metadata when present.
Bulk Downloads
FactorsToday-style manual return downloads map toGET /v1/factors/bulk-download. Compact mode omits full series unless requested.
factors/returns, factors/history, or factors/sparklines for UI and agent workflows that do not need a full return export.
Extreme Moves And Pairs
Use extreme-move and extreme-pair endpoints for FactorsToday-style homepage views.Portfolio, Hedge, And Optimizer
SEC API portfolio endpoints use submitted holdings. Migrate query-string portfolio workflows into POST bodies so agents, SDKs, and UI clients share one contract.maxPositionWeight, use POST /v1/portfolio/hedge with a constraints object. Unsupported constraints are rejected or returned as explicit degraded state rather than silently modeled.
SDK, CLI, And MCP Migration
REST is the fastest path to verify parity. Once the response shape is correct, move application code to the SDK or CLI surface that matches your runtime.response_mode and include with the same intent as REST: compact by default, with trust metadata when an agent will cite freshness, coverage, or methodology.
factors.returns, factors.history, factors.sparklines, factors.extreme_moves, factors.extreme_pairs, factors.exposures, factors.bulk_returns, portfolio.analyze, portfolio.attribution, portfolio.hedge, portfolio.optimize, and portfolio.stress_test.
Authentication
FactorsToday examples often pass API keys as query parameters. SEC API uses thex-api-key header:
Migration Checklist
- Replace query-parameter API keys with the
x-api-keyheader. - Replace local return-file jobs with
factors/history,factors/sparklines,factors/returns, orfactors/bulk-downloaddepending on the UI/export requirement. - Use
response_mode=compactby default for agent/UI flows. - Add
include=trustwhen the workflow needs freshness, materialization, methodology, or degraded-state metadata. - Use
include=seriesonly when a full daily series is required. - Gate MAX and long-history claims on returned row-level coverage and freshness fields.
- Preserve
requestIdandtraceparentin logs, agent responses, and support tickets. - Pin
secapi-versionbefore dual-running production traffic.
Read next
Factor quickstart
Start with copy-paste factor history, portfolio, and MCP examples.
Factor API reference
Open the generated REST operation pages for every factor endpoint.
Portfolio analytics
Wire attribution, hedging, optimization, stress testing, and model analysis workflows.

