Skip to main content

An api wrapper for btc.com block explorer api

Project description

bp-btc-com

A python 3 api wrapper for btc.com block explorer. Forked from psqnt/btc-com

docs: https://github.com/qlbnb/btc-com/blob/master/docs.md

api docs: https://btc.com/api-doc

block explorer: https://btc.com/block

Install

pip install bp-btc-com

must be python3 so if not in a python3 virtualenv use

pip3 install bp-btc-com

Usage

import datetime

from bp_btc_com.explorer import Explorer
from time import sleep

sleep_time = .5  # don't overstep rate limits
# get latest block
print(Explorer("btc").get_block())
sleep(sleep_time)

print(Explorer("bch").get_block())
sleep(sleep_time)

print(Explorer("bsv").get_block())

Examples

https://github.com/qlbnb/btc-com/blob/master/examples.py

Common Issues

API changes may break the sdk. Please refer to the official btc.com api documentation and update accordingly.

'https://chain.api.btc.com/v3/'
'https://bch-chain.api.btc.com/v3/'
'https://bsv-chain.api.btc.com/v3/'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bp-btc-com-0.0.5.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bp_btc_com-0.0.5-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file bp-btc-com-0.0.5.tar.gz.

File metadata

  • Download URL: bp-btc-com-0.0.5.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for bp-btc-com-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2e8448dceadc346b6a287f615126caffd10a1f4f2b06794af89bc74fbae67f6d
MD5 b5e085eb957207c338a876a85dd06dec
BLAKE2b-256 e34bdfb640fd490f18073e9508d603f4a33e89c951c4be0328d26ff2b234e1bd

See more details on using hashes here.

File details

Details for the file bp_btc_com-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: bp_btc_com-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for bp_btc_com-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b38b3a105f974a698de9547ba8cc3ebb4c57fd22d8b68129c066ca4e0fce3484
MD5 82cac6745de631dfc60a1cbc6213e51f
BLAKE2b-256 758e3e4f9de945aab004b981978082b3fe3722172d457d958efef6a559f992eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page