TickerDB for Python
Market data for AI agents. Technicals, fundamentals, SEC filings, insider trades and macro, ready to search and backtest. This is the official Python client for the TickerDB API.
- 10,000+ tickers. US stocks, ETFs and crypto, daily and weekly.
- Full-market screening. Filter every stock on any field and any date, in one call.
- Point in time. Each date only uses data that was public by then, without lookahead bias.
- Direct from the SEC. Built from SEC EDGAR filings: 10-K, 10-Q, 8-K, Form 4, 13F and N-PORT.
Work 6.2x faster, on 55% fewer tokens. TickerDB does the computing for you: trends, patterns and valuations for every stock, with their history, as named bands (momentum_rsi_zone = "oversold") plus raw values. So there's no pipeline to build. You just ask for what you want. See the benchmarks.
pip install "tickerdb[pandas]"
import tickerdb
tickerdb.login() # once: approve in the browser, the key is saved
db = tickerdb.TickerDB()
db.summary("AAPL")["trend"]["direction"] # 'strong_uptrend'
# Screen the whole market, as a DataFrame
db.search(
filters=[{"field": "momentum_rsi_zone", "op": "eq", "value": "oversold"},
{"field": "market_cap_usd", "op": "gt", "value": 10e9}],
fields=["ticker", "sector", "momentum_rsi_value"],
).to_frame()
# Every daily bar since 2019, across pages
bars = tickerdb.frame(db.iter_ohlcv("AAPL", start="2019-01-01", order="asc"))
The key
TickerDB() looks for a key in this order: the api_key argument, the TICKERDB_API_KEY environment variable, then the key tickerdb.login() saved (~/.config/tickerdb/config.json, on Windows %APPDATA%\tickerdb\config.json). You can also create a key in the dashboard.
Methods
One method per endpoint, with the endpoint's parameters as keyword arguments. Your editor shows each one's parameters and allowed values.
| Method | Endpoint | What it returns |
|---|---|---|
summary(ticker) |
/v1/summary/{ticker} |
One asset's full snapshot; also a past date, a date range, or band events |
ohlcv(ticker) |
/v1/ohlcv/{ticker} |
Daily or weekly price bars |
search() |
/v1/search |
Assets matching filters, on the latest or any past date |
universe(fields) |
/v1/universe |
Chosen fields for every asset on one date |
history() |
/v1/history |
Chosen fields for many assets over a date range |
market() |
/v1/market |
Market and macro fields per date |
diff(tickers) |
/v1/diff |
What changed for some tickers |
statements(ticker), statement_lines() |
/v1/statements |
Financial statements from SEC filings, point in time |
insiders(), insider_trades(insider), insider_holdings(insider) |
/v1/insiders |
Company insiders, 13F institutions, members of Congress |
funds(), fund_holdings(fund), fund_holders(ticker) |
/v1/funds |
Fund holdings from SEC N-PORT filings |
indexes(), index_members(index) |
/v1/indexes |
Index membership on a date |
models(), model(slug), model_history(slug), model_holdings(slug), model_trades(slug), models_holdings() |
/v1/models |
TickerDB's open-source trading models |
watchlist(), watchlist_add(tickers), watchlist_remove(tickers), watchlist_diff() |
/v1/watchlist |
Your watchlist and what changed for it |
schema(), status(), account() |
The field list, release times, your plan and usage |
Lists can be Python lists (fields=["ticker", "sector"]), dates can be date objects, and filters are a list of {"field", "op", "value"} dicts. The endpoint pages in the docs describe every parameter and response.
Results
Every method returns a Result: the response's JSON as a dict, with three additions.
result = db.ohlcv("AAPL", limit=5)
result["bars"] # the JSON, as documented
result.rows # the rows, whatever the endpoint calls them
result.to_frame() # the rows as a pandas DataFrame
result.usage # {'limit': 200000, 'used': 42, 'remaining': 199958, ...}
Paging
Endpoints that page have an iter_... twin that returns every row, fetching pages as you go:
for trade in db.iter_insider_trades("jeffrey-p-bezos", start="2024-01-01"):
...
panel = tickerdb.frame(db.iter_history(
tickers=["AAPL", "MSFT", "NVDA"],
fields=["trend_direction", "momentum_rsi_zone", "fundamentals_pe_ratio"],
timeframe="weekly", start="2019-01-01",
))
max_rows= stops early. history() with thousands of tickers is sent as a POST by itself.
Fields
from tickerdb import fields
fields.find("rsi zone") # ['momentum_rsi_zone', 'momentum_rsi_zone_prev', ...]
fields.TICKER["momentum_rsi_zone"].values # ('deep_oversold', 'oversold', 'neutral_low', ...)
fields.TICKER, fields.MARKET and fields.MODEL list every field with its type, band values and description. db.schema(search="bull flag") asks the API instead, with full descriptions.
Search builder
db.query().eq("trend_direction", "strong_uptrend").gte("market_cap_usd", 2e9) \
.member_of("sp500").select("ticker", "sector").sort("market_cap_usd").limit(50).execute()
Errors
try:
db.summary("AAPL", date="2015-01-02")
except tickerdb.PlanRestrictedError as error: # the date is before your plan's history
print(error.message, error.upgrade_url)
except tickerdb.TickerDBError as error: # any API error
print(error.status_code, error.error_type, error.message)
InvalidRequestError (400), AuthenticationError (401), InsufficientCreditsError (402), PlanRestrictedError (403), NotFoundError (404), RateLimitError (429) and ServiceUnavailableError (503) all subclass TickerDBError. Network errors and 429, 502, 503 and 504 are retried twice before they are raised (max_retries=). Only successful responses cost credits.
Async
from tickerdb import AsyncTickerDB
async with AsyncTickerDB() as db:
summary = await db.summary("AAPL")
async for bar in db.iter_ohlcv("AAPL", start="2019-01-01"):
...
How this library stays current
The methods and the field tables are generated from TickerDB's own OpenAPI document, which the API builds from its routes: https://api.tickerdb.com/v1/openapi.json. A copy is in this repository as openapi.json.
python scripts/generate.py --update # fetch the newest document and regenerate
python -m pytest # the tests compare the library with the document
python -m pytest -m live # a few real calls (needs a key)
A push to main with a new version in src/tickerdb/_version.py is published to PyPI by .github/workflows/publish.yml.
Upgrading from 0.2
1.0 is a rewrite for the current API, and it breaks 0.2 code.
- Methods return the response itself, not
{"data": ..., "rate_limits": ...}. Useresult[...]andresult.usage. base_urlno longer includes/v1.ForbiddenErroris nowPlanRestrictedError;DataUnavailableErrorisServiceUnavailableError.- Field names are the API's current ones (
db.schema()lists them).
License
MIT
Metadata
Release files for tickerdb 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tickerdb-1.1.0.tar.gz | 137.9 kB | With provenance | Details for tickerdb-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tickerdb-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for tickerdb-1.1.0-py3-none-any.whl |
Total release size: 203.6 kB
Release files / tickerdb-1.1.0.tar.gz
| Download URL | tickerdb-1.1.0.tar.gz |
|---|---|
| Size | 137.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c237de3d8bd0d894a23ff8a52ed94b168b804bf99d6958a353221af0e666e41a
|
|
BLAKE2b-256 checksum How to use checksums |
04e8414c3ceaf233c4c3bf0ccb85eb49a243ccd10d6b9d06136a1cdb5d11d676
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / tickerdb-1.1.0-py3-none-any.whl
| Download URL | tickerdb-1.1.0-py3-none-any.whl |
|---|---|
| Size | 65.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f45612a3456cc56ae7815046ff3d78abf69898018502a8b23eaa71a959b9c0d
|
|
BLAKE2b-256 checksum How to use checksums |
23b3fb54157c2f3bda74281187663198105351469382eba8bae4d2e734647a33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for tickerdb 1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tickerdb-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.