perp-md
Typed, asynchronous acquisition of perpetual-market open interest and funding for Python applications.
Release 0.5.4 refreshes optional-provider market catalogs after fifteen
minutes and refreshes unresolved native identities at most once per venue
per minute. Catalog retention is bounded by bytes and venue count. Expiry
releases idle clients without another request; in-flight acquisition finishes
before its retired client closes. Completed HTTP responses retain their
three-second expiry and identical pending requests remain shared.
perp-md turns provider-independent
CDM instrument references
into source-faithful observations. It keeps provider protocols, identity
requirements, pagination, and acquisition evidence behind a small public API.
Install
pip install perp-md
Optional CCXT fallback adapters are available through the ccxt extra:
pip install "perp-md[ccxt]"
Quick start
Pass the CDM reference supplied by your instrument catalog directly to a client:
from cdm import InstrumentReferenceV1
from perp_md import OpenInterestClient
async def current_open_interest(
provider_id: str,
reference: InstrumentReferenceV1,
):
async with OpenInterestClient() as client:
result = await client.fetch_reference(
provider_id,
reference,
include_history=False,
)
return result.current
FundingClient provides the corresponding funding workflow. Both clients can
assess runtime support and return structured metadata or identity gaps before
acquisition. Observations retain native values, timestamps, calculation
lineage, and normalization evidence; missing data is never represented as
zero.
Scope
The library owns market-data acquisition: provider protocols, operation-level identity requirements, source validation, bounded history retrieval, and declared adapter coverage. It does not discover instruments, persist data, schedule jobs, calculate application metrics, or expose a service API.
See the public contract
for data and error semantics, the
architecture guide
for module boundaries, and the
changelog for
release notes. perp-md-coverage emits the deterministic declared-coverage
manifest for documentation and capability tooling.
Status and support
The API is alpha, follows Semantic Versioning, and supports Python 3.11–3.13. Use GitHub Issues for defects and feature requests, and private security advisories for vulnerabilities. Licensed under Apache-2.0.
Metadata
Release files for perp-md 0.5.4
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 |
|---|---|---|---|---|
| perp_md-0.5.4.tar.gz | 119.3 kB | With provenance | Details for perp_md-0.5.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| perp_md-0.5.4-py3-none-any.whl | Python 3 | none | any | Details for perp_md-0.5.4-py3-none-any.whl |
Total release size: 213.8 kB
Release files / perp_md-0.5.4.tar.gz
| Download URL | perp_md-0.5.4.tar.gz |
|---|---|
| Size | 119.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cc7890e959a8dc3c1dcb0b7358cb36f69835de1c01b4435163d5eb068e4babd
|
|
BLAKE2b-256 checksum How to use checksums |
3b542bdfbb224bde632eff7d6e86dd98308a8c6b3ae83bfaa1e9c5317da2fb49
|
| 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 Oct 28, 2026.
Transparency logRelease files / perp_md-0.5.4-py3-none-any.whl
| Download URL | perp_md-0.5.4-py3-none-any.whl |
|---|---|
| Size | 94.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
115d709aa29761a466817e9562f5ffee36273478523e51df0e6e586c3ad5ce0e
|
|
BLAKE2b-256 checksum How to use checksums |
42667ff0cba8f5e4625853b49e46b391a90ce8c68b8d8fc8d08b66340366a3be
|
| 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 Oct 28, 2026.
Transparency logSecurity for perp-md 0.5.4
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 perp_md-0.5.4.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 Oct 28, 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.