Skip to main content

QuantPad Data Python SDK

Install into the project's existing environment/package manager:

uv add quantpad-data       # uv project
poetry add quantpad-data   # Poetry project

For a plain Python project, create a local virtual environment:

python3 -m venv .venv
source .venv/bin/activate  # Windows PowerShell: .venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install quantpad-data
export QUANTPAD_API_KEY=qp_live_...

Do not install into Homebrew/system Python or use --break-system-packages. When a project environment already exists, use its package manager or python -m pip rather than creating a second environment. Keep QUANTPAD_API_KEY in the local environment—never source code or chat.

import time
import quantpad_data as qpd

end = int(time.time() * 1000)
bars = qpd.get_bars("ES.FUT", "1m", end - 86_400_000, end)

for chunk in qpd.get_ticks(
    "AAPL", "trades", end - 3_600_000, end, columns=["t", "price", "size"]
):
    print(chunk.head())

# 10-level L2 market-by-price order-book depth. This streams chunks;
# project columns to avoid materializing all 60+ book fields when unnecessary.
for chunk in qpd.get_mbp10(
    "ES.FUT",
    end - 3_600_000,
    end,
    columns=["t", "bid_px_00", "ask_px_00", "bid_sz_00", "ask_sz_00"],
):
    print(chunk.head())

matches = qpd.get_universe("apple", asset_class="equity")
coverage = qpd.get_coverage("AAPL")

QuantPadClient (also available as Client) accepts api_key=, base_url=, and max_retries=. The default client honors Retry-After and uses exponential backoff for transient failures. QuantPad notebooks remain compatible through QUANTPAD_NOTEBOOK_DATA_TOKEN.

Bars preserve the notebook helper's OHLCV aliases and smart futures back-adjustment default. Tick timestamps are epoch nanoseconds. Install quantpad-data[rth] for XNYS regular-session helpers.

mbp-10 is true L2 depth with bid/ask price, size, and order-count fields at levels 0-9. It is available for supported CME futures, individual CME options-on-futures contracts, and US equities, subject to get_coverage() and the plan lookback window (currently 30 days).

This SDK intentionally exposes only bars, ticks, universe, coverage, and symbology. It does not proxy FRED or SEC EDGAR.

Explicit addressing: qpd.v2

Not open yet. /v2 is limited to a small allowlist while it is finished, so everything in this section will raise V2NotAvailableError for you today — an API key is refused with 403 and a notebook token with 404, whatever arguments you pass. Nothing above this section is affected: the /v1 helpers carry the same data and are generally available. Contact QuantPad support if you need /v2 access. This notice comes down when the gate does.

The helpers above infer which dataset a symbol lives in and what kind of symbol it is. That is convenient until it is wrong, and when it is wrong it fails quietly — asking for a specific futures contract returns an empty frame that looks exactly like a coverage gap.

qpd.v2.Historical removes the inference. It takes the same arguments as databento.Historical, so code written against Databento ports over by swapping the client:

import quantpad_data as qpd

client = qpd.v2.Historical()

bars = client.timeseries.get_range(
    dataset="GLBX.MDP3",       # required — never guessed
    symbols="ESZ6",            # a specific contract month
    stype_in="raw_symbol",     # raw_symbol | instrument_id | parent | continuous
    schema="ohlcv-1m",
    start="2026-01-05",
    end="2026-01-06",
)

# What actually answered, so you can confirm it was the contract you meant.
print(bars.attrs["quantpad"])
# {'dataset': 'GLBX.MDP3', 'stype_in': 'raw_symbol',
#  'resolved': 'ESZ6=651968', 'clamped': False, ...}

Every response reports the address it used, and a window that had to be shortened comes back with clamped=True and a warning rather than quietly covering a different period than you asked for.

Large ranges

get_range buffers a single response, so it tells the service up front how much this process can hold. Two different things can then be too large, and they are answered differently:

  • Too large for the service to assemble in one response. get_range falls back automatically to reading parquet straight from object storage — the bytes never traverse the data service.
  • Too large for this process to hold. You get a ResponseTooLargeError naming the estimated size, because no delivery mode makes a frame fit in memory it does not fit in. Stream it with iter_range instead, or pass max_decoded_bytes= if the memory really is available.

The budget is derived from the memory visible to the process (a container's limit, if there is one). Override it per call with max_decoded_bytes=, or globally with the QUANTPAD_MAX_DECODED_BYTES environment variable. Force a delivery path with mode="interactive" or mode="bulk", or stream day by day:

for day in client.timeseries.iter_range(
    dataset="GLBX.MDP3", symbols="ESZ6", schema="mbp-10",
    start="2026-01-05", end="2026-02-05",
):
    process(day)

iter_range holds one day at a time rather than the whole window, and splits the window itself when a single request would have to fetch too much uncached data at once. On a cold window the first frame can take a while to arrive, since the days behind it are fetched before it is handed over.

For ranges too large even for that, submit a batch job, then hydrate it into the cache so ordinary get_range calls serve it from storage:

job = client.batch.submit(
    dataset="GLBX.MDP3", symbols="ESZ6", schema="mbo",
    start="2026-01-05", end="2026-02-05", hydrate=True,
)
client.batch.hydrate(job["job_id"])

Other namespaces

client.symbology.resolve(...), the client.metadata.* mirrors (list_datasets, list_schemas, list_fields, list_publishers, get_dataset_range, get_dataset_condition, get_record_count), and client.options.chain(...) for enumerating strikes and expiries without downloading a day's entire definition schema.

There is no cost or unit-price surface. QuantPad data is included in the plan rather than metered per request.

Metadata

Release files for quantpad-data 0.4.2

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

Source distribution (sdist)

Source distribution for quantpad-data 0.4.2
File Size Uploaded Provenance Actions
quantpad_data-0.4.2.tar.gz 47.1 kB With provenance Details for quantpad_data-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quantpad-data 0.4.2
File Interpreter ABI Platform Actions
quantpad_data-0.4.2-py3-none-any.whl Python 3 none any Details for quantpad_data-0.4.2-py3-none-any.whl

Total release size: 75.9 kB

Release files / quantpad_data-0.4.2.tar.gz

Download URL quantpad_data-0.4.2.tar.gz
Size 47.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c7261353ae85b4b7c8c7166ab48bbac25d6e204d35db7b614671f5dab8ac2bd3
BLAKE2b-256 checksum
How to use checksums
dec97c61b6080a263b4921d785721f0d136c970c035e7982101c8af914731516
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 18, 2026.

Transparency log

Release files / quantpad_data-0.4.2-py3-none-any.whl

Download URL quantpad_data-0.4.2-py3-none-any.whl
Size 28.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
196eb20e96cb119a114cad32ed08d35caa12b1a942d19ab6e50b05012570d6af
BLAKE2b-256 checksum
How to use checksums
df006822e824567ab2d6cd208d4735de91b65f664ce1cb5bbfbb67647514877d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 18, 2026.

Transparency log

Security for quantpad-data 0.4.2

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.

Select from 2 files

Attestation for quantpad_data-0.4.2.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 Sep 18, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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