Bitcoin library - how to check number of confirmations

0

when I use bx fetch-balance I get this output:

$ bx fetch-balance 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

balance { address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa confirmed 1538241483 received 6538241483 unspent 6538241483 }

it doesn't show the number of confirmations.

how can I check the number of confirmations using bx command?

max

Posted 2016-12-11T11:00:14.907

Reputation: 187

Is this a bitcoin core api ?Shabahat M. Ayubi 2016-12-12T08:15:54.060

bx is libbitcoin-explorer: https://github.com/libbitcoin/libbitcoin-explorerlastcanal 2017-02-12T16:00:45.040

Answers

1

"confirmed" in this case means the transaction is included in at least one block that belongs to the current best chain.

If you want to find out exactly how many confirmations each transaction has you can use fetch-history to get a full list of all transactions sent to and from your address. fetch-history will return the block number that the transaction has been included in. You can then use that along with the current height to figure out how many confirmations your transaction has.

bx fetch-history 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
bx fetch-height

lastcanal

Posted 2016-12-11T11:00:14.907

Reputation: 591

-1

your previous command gives you an idea about the confirmations

{
    address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
    confirmed 1538241483
    received 6538241483
    unspent 6538241483
}
  • Confirmed - the number with any confirmation, excluding those spent.
  • Received - the number confirmed or unconfirmed, including those spent.
  • Unspent - the number received that remain unspent.

Badr Bellaj

Posted 2016-12-11T11:00:14.907

Reputation: 862