REST API
Legacy REST API V1
The legacy API is a compatible subset of API provided by **Bitcore Insight**. It supports only Bitcoin-type coins. The details of the REST/socket.io requests can be found in the Insight's documentation.
GET /api/v1/block-index/[block heght] | http:/127.0.0.1:10130/api/v1/block–index/1000 |
GET /api/v1/tx/[txid] | http:/127.0.0.1:10130/api/v1/tx/a1b210e13ea60bf488e73186cf8b1306a05af92bf0b759fbd150768fdee22c54 |
GET /api/v1/address/[address] | http:/127.0.0.1:10130/api/v1/address/BLFxzq52bxYTzdaVNQJ6A8HKvB4buXd9cq |
GET /api/v1/utxo/[address] | http:/127.0.0.1:10130/api/v1/utxo/B9WGNvSXYKifQcNJ3ZeiFwYWE1zXCqgv48 |
GET /api/v1/block/[block height | block hash] | http:/127.0.0.1:10130/api/v1/block/1000 |
GET /api/v1/block/[block height | block hash] | http:/127.0.0.1:10130/api/v1/block/49102dc4e56db336cb099dff2be8058e8151709e1b5db0e7c6c50643c48603aa |
GET /api/v1/estimatefee/[number of blocks] | http:/127.0.0.1:10130/api/v1/estimatefee/12 |
GET /api/v1/sendtx/[hex tx data] | http:/127.0.0.1:10130/api/v1/sendtx/010000000182e6a1502ec657847eef705c687a7856c5...e685e29d0f89da2a1d40a6e45fa2ac00000000 |
POST /api/v1/sendtx (hex tx data in request body) | look http:/127.0.0.1:10130/docs/api.md |
REST API V2
API V2 is the current version of API. It can be used with all coin types that Blockbook supports. API V2 can be accessed using REST and websocket interface.
Common principles used in API V2:
- all amounts are transferred as strings, in the lowest denomination (satoshis, wei, ...), without decimal point
- empty fields are omitted. Empty field is a string of value *null* or *""*, a number of value *0*, an object of value *null* or an array without elements. The reason for this is that the interface serves many different coins which use only subset of the fields. Sometimes this principle can lead to slightly confusing results, for example when transaction version is 0, the field *version* is omitted.