Skip to main content

perp-md

PyPI Python CI

Typed, asynchronous acquisition of perpetual-market open interest and funding for Python applications.

Release 0.5.3 expires completed HTTP response payloads without requiring the same request key to recur. Timestamped history windows cannot accumulate responses for the lifetime of a client. Identical pending requests remain shared until completion; successful responses retain the three-second TTL.

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.3

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

Source distribution (sdist)

Source distribution for perp-md 0.5.3
File Size Uploaded
perp_md-0.5.3.tar.gz 115.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for perp-md 0.5.3
File Interpreter ABI Platform
perp_md-0.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 208.7 kB

Release files / perp_md-0.5.3.tar.gz

Download URL perp_md-0.5.3.tar.gz
Size 115.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0871c358d2a859c23893500909dfbb8906e0a78d8407fa449ab587aac474408f
BLAKE2b-256 checksum
How to use checksums
7669bc4d94719bfa248c8a39c179e1b46106b4c1e8f15127c0ef4b7bfefe7b50
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 4, 2026.

Transparency log

Release files / perp_md-0.5.3-py3-none-any.whl

Download URL perp_md-0.5.3-py3-none-any.whl
Size 93.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eef2ca80c6c30c682670f58e1ea8f7c90b5150974df8d57f7ff19e37bde519bf
BLAKE2b-256 checksum
How to use checksums
312d127dc3f6c38b554b1a96e522e3a72dd1d510c590cba6672d7baf91270c2a
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 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.3 This release

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

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