APIBTC - Current Status
Please Note: Currently, our publicly hosted API endpoint is available exclusively on the Bitcoin regtest network for development and testing purposes.
- API Documentation (Swagger): The
regtestAPI documentation is available via Swagger here. - Mainnet Environment: We do not provide a publicly hosted
mainnetAPI endpoint. You can run your ownmainnetinstance using the provided Docker image. - More Information: For further details about the project, Docker images, and setup instructions, please visit the main project website.
⚠️ Important: The public API operates on regtest. Do not send real Bitcoin (BTC) to any addresses generated or used via this public regtest endpoint.
from apibtc import Wallet
from mnemonic import Mnemonic
from bip32utils import BIP32Key
# Declare API url
BASE_URL = "API_BASE_URL"
# Create two wallets
# Wallet 1 - Invoice Creator
mnemon1 = Mnemonic('english')
words1 = mnemon1.generate(128)
private_key1 = BIP32Key.fromEntropy(mnemon1.to_seed(words1)).PrivateKey().hex()
wallet1 = Wallet(base_url=BASE_URL, privkey=private_key1)
# Wallet 2 - Invoice Payer
mnemon2 = Mnemonic('english')
words2 = mnemon2.generate(128)
private_key2 = BIP32Key.fromEntropy(mnemon2.to_seed(words2)).PrivateKey().hex()
wallet2 = Wallet(base_url=BASE_URL, privkey=private_key2)
# Payment flow
# Create invoice with wallet1
invoice = wallet1.addinvoice(satoshis=1000, memo="Payment from wallet2", expiry=3600)
# Pay invoice with wallet2
wallet2.sendpayment(paymentrequest=invoice['paymentRequest'], timeout=30, feelimit=100)
# Check balances after payment
print("Wallet1 balance:", wallet1.getbalance())
print("Wallet2 balance:", wallet2.getbalance())
Release files for apibtc 1.0.22
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| apibtc-1.0.22.tar.gz | 35.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apibtc-1.0.22-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.0 kB
Release files / apibtc-1.0.22.tar.gz
| Download URL | apibtc-1.0.22.tar.gz |
|---|---|
| Size | 35.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ca97ae280a02a36d943459de7b52205629199b65fb3567b8cfc18f364bffde7
|
|
BLAKE2b-256 checksum How to use checksums |
2ca4fbef892fec8aa2834cb1ec65c5c5d63537f19869517d898391683f762bcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / apibtc-1.0.22-py3-none-any.whl
| Download URL | apibtc-1.0.22-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd78fec62528830b1d99a5d38b88cd86a185bd5c56c3fb814b9d997d53c631b7
|
|
BLAKE2b-256 checksum How to use checksums |
a1a76f590210d47eba80bb3eca33ad71028dee56933a9731c13da6bad1cdeeca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|