Skip to main content

Prerequisites

  • Rust and Cargo.
  • An API key in SECAPI_API_KEY.
Replace the generated [dependencies] section in Cargo.toml:

Run a first request

Replace src/main.rs:
Expect a JSON response that identifies the current matching filing. Preserve its accession number, filing URL, and request ID when present. A response in agent view is intentionally smaller and may not include all default-view metadata.

Special Situations workflow

The async client has helpers for a current roster and detail, filing-event activity, disclosed calendar dates, aggregate counts, archived weekly issues, Markdown exports, underwriting packs, and monitor creation.
Current detail can change as filings arrive; an issue is an immutable historical publication. Retain source identifiers and request IDs with derived output, and review the underlying filing before relying on a disclosed term or date. See Special Situations workflows for the REST and CLI workflow.

Errors and reliability

The SDK defaults to a 30-second request timeout and uses a bounded retry policy that honors Retry-After. A 429 can be retried even when it follows a mutating request; treatment of other failures depends on whether the client is issuing a read or mutation. Use with_timeout(...) to set a service-appropriate budget. Before a mutation whose replay is unsafe, use without_retries() or ensure the operation is idempotent. Do not combine multiple unbounded retry layers.

Production notes

  • Keep credentials in the runtime environment or secret manager, never in source.
  • Capture status, request ID, response version, and source identifiers with failures and persisted results.
  • Prefer typed builders for common paths, but confirm each parameter and optional field in the API reference.
  • Use the default response when a workflow needs provenance or freshness fields that an endpoint’s compact view omits.
Next: SDK reliability, API conventions, or error code catalog.