Zero-dependency Python client for the Bitview Bitcoin analytics API.
Requires Python 3.9+.
PyPI | API Reference | Source
AI clients can use the same API through the official stateless, read-only MCP endpoint at mcp.bitview.space. No authentication is required.
pip install bitview-client
# or
uv add bitview-clientYou can also copy bitview_client/__init__.py
into a project. The client has no runtime dependencies; Pandas and Polars are
only needed for their optional conversion helpers.
from bitview_client import BitviewClient
# Use the public API or point the client at a self-hosted Bitview server.
client = BitviewClient("https://bitview.space")
# Mempool.space-compatible blockchain endpoints.
block_hash = client.get_block_hash_by_height(800000)
tx = client.get_tx(
"a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
)
# Typed, chainable series access.
prices = (
client.series.price.close.by.day1()
.tail(30)
.fetch()
)
# Programmatic access when the series name is only known at runtime.
same_prices = client.series_endpoint("price_close", "day1").tail(30).fetch()Series endpoints support integer and date slices, head(n), tail(n),
skip(n).take(m), fetch_csv(), len(), and version().
A value is None where it is missing (mostly a date period without blocks) or
undefined (a NaN, or a ratio over zero). The type hints say exactly where:
Optional at the indexes where a value can be missing, and everywhere for value
types that can be undefined (floats, Cents, ratios, parts per million).