API Docs

The API documented below is made available by abtc-explorer. The actions are organized by category. From this documentation you can directly click on an action's link to see the output format in your browser.

blocks

json
Returns the details of the block with the given hash.

json
Returns the details of the block at the given height.

json
Returns the details of the block header with the given hash.

json
Returns the details of the block header at the given height.

integer
Returns the height of the chain tip.

string
Returns the block hash of the chain tip.

transactions

json
Returns the details of the transaction with the given txid.

json
Returns total output of all transactions over the last 24hrs.

blockchain

number
Returns the current supply of Btcopyright. An estimate using a checkpoint can be returned in 2 cases: on 'slow' devices, and before the UTXO Set snapshot is loaded.

json
Returns the latest UTXO Set snapshot. Warning: This call can be very slow, depending on node hardware and index configurations.

addresses

json
Returns a summary of data pertaining to the given address. The output of this call will depend heavily on the configured 'Address API' (see .env-sample file).
Optional parameters
limitNumber of transactions to return
offsetOffset into transactions
sortSorting direction for transactions ('desc'=new first, 'asc'=old first)

xpubs

json
Returns details for the specified extended public key, including related keys and addresses.
Optional parameters
limitThe number of addresses to return
offsetOffset into the list of addresses

json
Returns a list of addresses derived from the given [xyz]pub.
Optional parameters
receiveOrChange0 for 'receive' addresses (default); 1 for 'change' addresses
limitNumber of addresses to return
offsetOffset into addresses

json
Returns a list of transaction IDs associated with the given [xyz]pub.
Optional parameters
gapLimitLimit of empty addresses to end searching for transactions (default: 20)
addressLimitForced limit on the number of addresses to search through (both 'receive' and 'change' addresses up to this number will be searched)

mining

json
Returns the network hash rate, estimated over the last 1, 7, 30, 90, and 365 days.

number
Returns the current estimate for the next difficulty adjustment as a percentage.

json
Returns a summary for the estimated next block to be mined (produced via getblocktemplate).

json
Returns a list of the transaction IDs included in the estimated next block to be mined (produced via getblocktemplate).

boolean
Returns whether the specified transaction ID is included in the estimated next block to be mined (produced via getblocktemplate).

json
Returns whether the specified transaction ID is included in the estimated next block to be mined (produced via getblocktemplate).
Optional parameters
sinceUse the form 'Nd' to specify the number of day to look back (e.g. 'since=7d' will analyze the last 7 days)
startHeight+endHeightUse these 2 parameters to specify a custom start/end height (e.g. 'startHeight=0&endHeight=24' to analyze the first 25 blocks)

mempool

integer
Returns the number of transactions in Btcopyright Core's mempool.

json
Returns a summary of Btcopyright Core's mempool (full output from 'getmempoolinfo')

json
Returns recommended fee rates in sats/vB for next block, ~30 min, 1 hr, and 1 day.

price

json
Returns the price of 1 ABTC, in USD, EUR, GBP, and XAU
Optional parameters
formatSet to 'true' to include thousands-separator formatting in results

number
Returns the price of 1 ABTC, in one of USD, EUR, GBP, XAU
Optional parameters
formatSet to 'true' to include thousands-separator formatting in results

number
Returns the market cap of Btcopyright, in one of USD, EUR, GBP, XAU

number
Returns the price of 1 unit of the specified currency (e.g. 1 "usd") in satoshis