This document is an analysis of the endpoints in rest.bitcoin.com that rely on Insight API. Each endpoint is analyized with respect to replacing the use of Insight API.
My take-away from this analysis is that BlockBook API is very close to a drop-in replacement for Insight API. If there is ever any risk of Insight API ending support or getting forked off the network, BlockBook API would be an adaquate replacement. If the BITBOX team wants to be proactive, we could create additional endpoints and slowly begin to phase out Insight API, giving our users time to migrate.
There are approximately 5 endpoints on rest.bitcoin.com that call Insight API. Here is how they compare with BlockBook API:
- Example rest.bitcoin.com call
- Example BlockBook call
- Blockbook shows balances in BCH, not sats. This feature can be added.
- Other features like extra address formats and sat balances can be added.
- Example rest.bitcoin.com call
- Examples BlockBook call
- Blockbook is missing scriptPubKey, legacyAddress, and cashAddress.
- Can
scriptPubKey
be added some how? Is it important?
- Example rest.bitcoin.com call
- Endpoint is missing in Blockbook. But same output can be achieved by getting transactions list from
address/details
then iteratively callingrawTransaction/getRawTransaction/:txid
on each TXID returned.
- Example rest.bitcoin.com call
- Example BlockBook call
- Blockbook is missing:
locktime
time
size
vout.scriptPubKey.asm
vout.spentTxId
vout.spentIndex
vout.spentHeight
- Bockbook has additional properties:
spent
(boolean)valueIn
- Example rest.bitcoin.com call
- Example BlockBook call
- BlockBook is missing:
reward
chainwork
isMainChain
poolInfo
- Blockbook TXs are expanded, whereas Insight API simply lists the TXIDs for the block.