Skip to main content
Use this path when you want compact factor catalog, returns, history, and portfolio attribution data in a product or agent workflow.

Before you start

  1. Export SECAPI_API_KEY
  2. Use https://api.secapi.ai for production requests
  3. Send the API key in the x-api-key header
  4. Send secapi-version: 2026-03-19
  5. Use response_mode=compact&include=trust for agent, chart, table, and prompt-context workflows that need audit metadata
Keep requestId, traceparent, freshness, materialization, methodology, and degradedState fields attached to downstream traces when they are present. If a compact response omits a heavier section your workflow needs, request it with include; those fields tell an agent whether the answer is current, how it was constructed, and whether any part of the response fell back to a partial state.

REST

Start with the catalog, then request the smallest return window that proves your workflow.
Use single-factor history when you need a 1D through MAX table, chart, or backtest input.
Use extreme-move endpoints when you need to investigate unusual factor behavior instead of just return history.

TypeScript

Python

Portfolio Attribution

Use portfolio attribution when you need explained return, residual alpha, contribution rows, and model metadata for a portfolio or model-builder draft.

Hosted MCP

Hosted MCP exposes the same factor workflows as agent-callable tools.
Call compact factor returns:
Call portfolio attribution:

Copy this factor prompt for your agent.

Next Pages