bitcoinlib.services.bitcoind module

class bitcoinlib.services.bitcoind.BitcoindClient(network='bitcoin', base_url='', denominator=100000000, *args)[source]

Bases: bitcoinlib.services.baseclient.BaseClient

Class to interact with bitcoind, the Bitcoin deamon

Open connection to bitcoin node

Parameters:
  • network – Bitcoin mainnet or testnet. Default is bitcoin mainnet
  • base_url – Connection URL in format http(s)://user:password@host:port.
  • denominator – Denominator for this currency. Should be always 100000000 (satoshis) for bitcoin
Type:

str

Type:

str

Type:

str

block_count()[source]
estimatefee(blocks)[source]
static from_config(network='bitcoin')[source]

Read settings from bitcoind config file

Parameters:
  • configfile – Path to config file. Leave empty to look in default places
  • network – Bitcoin mainnet or testnet. Default is bitcoin mainnet
Type:

str

Type:

str

Return BitcoindClient:
 
getrawtransaction(txid)[source]
gettransaction(txid)[source]
getutxos(addresslist)[source]
sendrawtransaction(rawtx)[source]
exception bitcoinlib.services.bitcoind.ConfigError(msg='')[source]

Bases: Exception