Skip to main content

ko-edgar

Official Python SDK for ko.io — source-traced SEC & market data for AI agents and quants. 13F institutional holdings (85M+ rows, 2013→today), insider trades, Congress trading, crypto ETF exposure, macro indicators, and a white-labeled EDGAR filings gateway.

pip install ko-edgar

Quickstart

Works out of the box in keyless demo mode — no signup required:

from ko_edgar import KoClient

ko = KoClient()  # demo mode; or KoClient(api_key="ko_live_...")

# Who is Berkshire Hathaway holding right now?
for holding in ko.institutions.holdings("1067983", per_page=10):
    print(holding["ticker"], holding["holding_value"])

# Which institutions hold NVDA?
for holder in ko.stocks.holders("NVDA"):
    print(holder["name"], holder["shares_held"])

# What did Congress trade recently?
for trade in ko.congress.trades(sort="recent", per_page=10):
    print(trade["member_name"], trade["ticker"], trade["transaction_type"])

Get a free API key (200 calls/day, no credit card) at ko.io/console, then:

ko = KoClient(api_key="ko_live_...")   # or set KO_API_KEY env var

Async

from ko_edgar import AsyncKoClient

async with AsyncKoClient() as ko:
    result = await ko.stocks.activity("NVDA", quarters=8)

Pagination

from ko_edgar import KoClient, paginate

ko = KoClient()
for trade in paginate(ko.congress.trades, ticker="NVDA", per_page=100):
    ...

Results and errors

Every method returns an ApiResult: iterate it for rows, or use result.data / result.meta for the raw envelope. result.truncated tells you when the plan's row cap trimmed the response.

from ko_edgar import KoClient, PlanRequiredError, RateLimitError

ko = KoClient()
try:
    yields = ko.macro.treasury_yields(days=90)   # requires Pro
except PlanRequiredError:
    print("macro data needs a Pro plan → https://ko.io/pricing")
except RateLimitError as e:
    print(f"quota resets in {e.retry_after}s")

Escape hatch

Any /api/v1 endpoint not covered by a typed method:

ko.get("/api/v1/exec-compensation", ticker="AAPL", ceo_only=True)

Links

MIT licensed.

Metadata

Release files for ko-edgar 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ko-edgar 0.1.0
File Size Uploaded Provenance
ko_edgar-0.1.0.tar.gz 17.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ko-edgar 0.1.0
File Interpreter ABI Platform
ko_edgar-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.2 kB

Release files / ko_edgar-0.1.0.tar.gz

Download URL ko_edgar-0.1.0.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0ad137134274e65f27c3e6dc9cb8123bcad32a6f9e834eb22d35d0a10df11623
BLAKE2b-256 checksum
How to use checksums
22e26e5d7d1f399391fe0103a6dfa6c7fd61dee2231f34b35e9bbbf6d63d571f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release files / ko_edgar-0.1.0-py3-none-any.whl

Download URL ko_edgar-0.1.0-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f30bbb88938ecc8c4fb666b7e6d5b8427cd1afe85d55d9e9727492098d94e2e
BLAKE2b-256 checksum
How to use checksums
81a4225e64a2a3fab8733fbed2c596372019f8c8b237f0dfe3f6778d877cdcf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Security for ko-edgar 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page