Skip to main content

blockstream

A python 3 wrapper class for blockstream.info's Bitcoin block explorer API

Written in Python 3

Docs: https://github.com/psqnt/blockstream/blob/master/docs.md

Block explorer: https://blockstream.info

API Reference: https://github.com/Blockstream/esplora/blob/master/API.md

Install

pip install blockstream

if not in a python3 virtualenv make sure to use python3

pip3 install blockstream

Usage

from blockstream import blockexplorer

# get transaction by id
tx_id = '56a5b477182cddb6edb460b39135a3dc785eaf7ea88a572052a761d6983e26a2'
tx = blockexplorer.get_transaction(tx_id)

# get address data
address = '3ADPkym6mQ2HyP7uASh5g3VYauhCWZpczF'
addr_info = blockexplorer.get_address(address)

Examples

Reference examples.py to see each method in use

Issues

the scripthash endpoint seems to be broken, however you can get data about a scripthash address by calling the address endpoint. I have decided to remove the functions to hit the scripthash endpoint for now.

Metadata

Release files for blockstream 0.3.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 blockstream 0.3.0
File Size Uploaded
blockstream-0.3.0.tar.gz 5.9 kB Details

Built distribution (wheel)

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

Total release size: 13.0 kB

Release files / blockstream-0.3.0.tar.gz

Download URL blockstream-0.3.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
690eabe6872b8327a639c91aff54cf39727ef96a8c4dd369982b86d71518546e
BLAKE2b-256 checksum
How to use checksums
9419a0bf44e4bf566b6ff6f776e2d4d62a042975c0c02ce83f01e0aa84b0fa19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

Release files / blockstream-0.3.0-py3-none-any.whl

Download URL blockstream-0.3.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64a189611d7f5695f984611b1ffba17fa9e7e0bda8570a21692cb54ebecdf01b
BLAKE2b-256 checksum
How to use checksums
362895bed01db69c3f46c74c8661de8e04f1ea15420f2c71c3716105f7453121
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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