Skip to main content

Stream Polling

Hosted webhooks are not the only delivery mechanism. SEC API also exposes cursor-based stream polling for applications and agents that want deterministic replay.

Endpoints

  • GET /v1/stream_subscriptions
  • POST /v1/stream_subscriptions
  • GET /v1/stream_subscriptions/{stream_id}/events

Poll the feed

curl "$SECAPI_BASE_URL/v1/stream_subscriptions/str_123/events?limit=25" \
  -H "Authorization: Bearer $SECAPI_API_KEY"
The response includes:
  • data: ordered stream events
  • nextCursor: the cursor to use on the next poll
  • replayCursor: the last durable cursor the client can checkpoint

Resume from a checkpoint

curl "$SECAPI_BASE_URL/v1/stream_subscriptions/str_123/events?cursor=evt_987" \
  -H "Authorization: Bearer $SECAPI_API_KEY"
Use cursor polling when:
  • a tenant cannot expose a public webhook endpoint
  • an agent runtime wants explicit checkpoint control
  • your team needs to replay a recent stream window without replaying the entire subscription

CLI

secapi streams events --stream-id str_123 --limit 25
secapi streams events --stream-id str_123 --cursor evt_987 --limit 25

Operational notes

  • stream events are filtered to the current org
  • cursor ordering is based on recorded event order, not the original SEC filing timestamp
  • replay should advance from replayCursor, not from the last array element a client happened to inspect