Skip to main content

openchainbench

Official Python client for OpenChainBench, the live, reproducible benchmark suite for crypto infrastructure (RPC latency, bridge fees, perp venues, oracle deviation, and more).

PyPI version Python versions Downloads License

The data served by openchainbench.com is published under CC-BY-4.0. Attribute with a link back to the benchmark page (pageUrl on every payload).

Install

pip install openchainbench

Requires Python 3.10+.

Quick start

from openchainbench import OpenChainBench

with OpenChainBench() as ocb:
    for bench in ocb.list_benchmarks():
        if bench.leader:
            print(f"{bench.title}: {bench.leader.name} -> {bench.value}")

Fetch one benchmark

from openchainbench import OpenChainBench

with OpenChainBench() as ocb:
    bench = ocb.get_benchmark("bridge-fee")
    print(bench.headline)
    for row in bench.rankings[:3]:
        print(row.slug, row.ms.p50, row.success_rate)

Fetch a time series

from openchainbench import OpenChainBench

with OpenChainBench() as ocb:
    series = ocb.get_series("bridge-fee", range="24h")
    for provider in series.providers:
        print(provider.name, provider.values[-1])

Filter by chain or region

bench = ocb.get_benchmark("network-fees", chain="ethereum")
series = ocb.get_series("network-fees", range="7d", chain="ethereum", region="eu-west")

Error handling

The client maps HTTP responses to a typed exception hierarchy so callers can react to intent rather than status codes.

from openchainbench import (
    OpenChainBench,
    NotFoundError,
    RateLimitError,
    APIUnavailableError,
)

with OpenChainBench() as ocb:
    try:
        ocb.get_benchmark("not-a-real-slug")
    except NotFoundError:
        ...
    except RateLimitError as exc:
        print(f"retry after {exc.retry_after_sec}s")
    except APIUnavailableError:
        # cold cache or Prom blackout, retry later
        ...

API reference

Method Endpoint Returns
list_benchmarks() GET /api/citable list[BenchmarkSummary]
fetch_citable_index() GET /api/citable CitableIndex
get_benchmark(slug, *, chain=None, region=None) GET /api/stat/<slug> Benchmark
get_series(slug, *, range="24h", chain=None, region=None, providers=None) GET /api/series/<slug> Series

All models are immutable dataclasses (frozen=True).

Rate limits

The public API allows 60 requests per minute per IP. The client surfaces HTTP 429 as a RateLimitError with a retry_after_sec attribute.

Citation

If you use the data in a paper, post, or product, please link the benchmark page. The license is CC-BY-4.0. Every payload includes a ready-to-paste quote field that already contains the attribution.

License

MIT. The data fetched from the API stays under CC-BY-4.0; this client license only covers the code.

Metadata

Release files for openchainbench 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 openchainbench 0.1.0
File Size Uploaded Provenance
openchainbench-0.1.0.tar.gz 11.2 kB With provenance Details

Built distribution (wheel)

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

Total release size: 21.0 kB

Release files / openchainbench-0.1.0.tar.gz

Download URL openchainbench-0.1.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d855442988f907f845f7568f2b378909089bf9061819cb94898ae88cb0a38ff1
BLAKE2b-256 checksum
How to use checksums
590fe6360946c1130526a6c0f67300a7eb29b374daef77a77b1d27ca44493f1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 26, 2026.

Transparency log

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

Download URL openchainbench-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abfe03723d9701b842fcd09851a889169d7f8070bfb757a64a48152a47c094ee
BLAKE2b-256 checksum
How to use checksums
cd17c94c18a25279f7cecf1b81f6072f610c09fc2f67206b90e761fa6ced4d28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 26, 2026.

Transparency log

Security for openchainbench 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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openchainbench-0.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 Jun 26, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full 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