Documentation Index Fetch the complete documentation index at: https://docs.secapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
JavaScript SDK
The JavaScript SDK is the fastest way to wire Datastream into TypeScript services, server actions, cron jobs, and product backends without hand-rolling request headers or metadata plumbing.
Install in three steps
Install the package
Add the SDK with your package manager of choice.
Set the API key
Export OMNI_DATASTREAM_API_KEY in the runtime where the code will run.
Verify one real investor workflow
Resolve an issuer, fetch a filing, and run one semantic investor workflow before you call the integration done.
npm install @omni-datastream/sdk-js
What this surface is good for
Application backends Use the SDK when you want the public REST contract with less boilerplate and better ergonomics in app code.
Enrichment jobs Good for filing enrichment, artifact generation, and scheduled internal data workflows.
Internal tools Resolve entities, inspect freshness, and retrieve filings without building a wrapper first.
Agent handoff Start from a prompt and keep the metadata trail intact all the way through your coding agent.
First useful calls
import { OmniDatastreamClient } from "@omni-datastream/sdk-js"
const client = new OmniDatastreamClient ({
apiKey: process . env . OMNI_DATASTREAM_API_KEY ! ,
})
const issuer = await client . resolveEntity ({ ticker: "AAPL" })
const filings = await client . searchFilings ({ ticker: "AAPL" , form: "10-K" , limit: 3 })
const statements = await client . allStatements ({ ticker: "AAPL" , period: "annual" , limit: 1 })
const market = await client . marketSnapshots ({ symbols: [ "AAPL" ] })
const macro = await client . macroIndicators ({ country: "US" , indicator_key: "CPIAUCSL" , limit: 3 })
const factors = await client . factorReturns ({ keys: [ "MKT_US" , "QUALITY" ], lookback: "6m" , window: "1m" })
const answer = await client . intelligenceQuery ({
query: "Decompose AAPL's last 6M return into factors, macro drivers, filing-specific risks, then suggest hedges." ,
entities: [ "AAPL" ],
lookback: "6m" ,
responseMode: "compact_json_and_md" ,
})
Error handling
import { OmniDatastreamClient , OmniDatastreamError } from "@omni-datastream/sdk-js"
try {
await client . requestDiagnostics ( "missing-request-id" )
} catch ( error ) {
if ( error instanceof OmniDatastreamError ) {
console . error ( error . status , error . requestId , error . body )
}
}
Do not drop metadata on the floor. In production, keep requestId, traceparent, provenance, freshness, and materialization fields in your logs or downstream artifacts so support and audit workflows stay intact.
Read next
API Reference Open the exact REST calls that sit underneath the SDK methods.
Hosted MCP workflows Use the same Datastream workflows through OMNI-hosted MCP.
Give this prompt to your agent Copy a stronger starting prompt instead of writing one from scratch.