Skip to main content

Python SDK for Omni Datastream

Project description

omni-datastream-py

Python SDK for Omni Datastream -- SEC filings, financial statements, ownership data, and more.

Installation

pip install omni-datastream-py

Configuration

from omni_datastream_py import OmniDatastreamClient

client = OmniDatastreamClient(
    api_key="ods_test_...",
    # Optional: override base URL (defaults to https://api.secapi.ai)
    # base_url="http://127.0.0.1:8787",
)

You can also authenticate with a Bearer token:

client = OmniDatastreamClient(bearer_token="your-bearer-token")

Environment Variables

Variable Description
OMNI_DATASTREAM_API_KEY Your Omni Datastream API key (starts with ods_)

Configuration Options

Parameter Default Description
api_key None API key authentication
bearer_token None Bearer token authentication
base_url https://api.secapi.ai API base URL
api_version 2026-03-19 API version header

Quickstart

import os
from omni_datastream_py import OmniDatastreamClient

client = OmniDatastreamClient(api_key=os.environ["OMNI_DATASTREAM_API_KEY"])

# Resolve a company entity
entity = client.resolve_entity(ticker="AAPL")
print(entity)

# Get the latest 10-K filing
filing = client.latest_filing(ticker="AAPL", form="10-K")
print(filing)

# Extract a specific section
section = client.latest_section(
    section_key="item_1a",
    ticker="AAPL",
    form="10-K",
    mode="compact",
)
print(section)

Common Use Cases

Financial Statements

# XBRL facts
facts = client.facts(ticker="AAPL", tag="Assets", taxonomy="us-gaap", limit=5)

# Full financial statements
statements = client.all_statements(ticker="AAPL", period="annual", limit=3)

Ownership and Institutional Holdings

# Latest 13F filing (institutional holdings)
holdings = client.latest_13f(cik="0001067983", limit=10)

Market Data

# Market calendar
calendar = client.market_calendar(market="XNYS", duration=3)

# Volatility signal
vol = client.volatility_signal(ticker="AAPL")

Offerings and M&A

# IPO and offering filings
offerings = client.offerings(forms="S-1,424B4", limit=3)

Diagnostics

# Artifact summary (data freshness)
summary = client.artifact_summary()

# System observability
obs = client.observability()

Error Handling

from omni_datastream_py import OmniDatastreamClient, OmniDatastreamError

client = OmniDatastreamClient(api_key="ods_test_...")

try:
    result = client.resolve_entity(ticker="INVALID")
except OmniDatastreamError as e:
    print(f"Status: {e.status}")
    print(f"Payload: {e.payload}")

Scope

The Python SDK covers the full REST surface including:

  • Entity resolution and search
  • Filing retrieval and section extraction
  • XBRL facts and financial statements
  • Offerings, market calendar, and volatility signals
  • Ownership, insiders, and compensation data
  • Institutional holdings (13F)
  • Enforcement actions and M&A events
  • Artifacts, diagnostics, and observability
  • Events, streams, and webhooks

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omni_datastream_py-0.2.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omni_datastream_py-0.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file omni_datastream_py-0.2.0.tar.gz.

File metadata

  • Download URL: omni_datastream_py-0.2.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for omni_datastream_py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 641ec5f95d574b851988655afff24d768edae3ffb6d08bf3aa4e098405f985d9
MD5 3cb083db0dbb28b8c4712f1c92c570b7
BLAKE2b-256 9d834f8d70cb207794fa510b24e10b8b01b0feb3980f36b448860ee7845b80a2

See more details on using hashes here.

File details

Details for the file omni_datastream_py-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: omni_datastream_py-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for omni_datastream_py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a7425582b9672cc7b7dfbe0dc696b5e79f488766600f2ee30036ad49a910ae6
MD5 c4ed94ca2efde9e38f15775324f48067
BLAKE2b-256 535af28536254ce38d4fbbfffc4a97d77299d68910bc176549ca0efaeb4d22aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page