opreturn.net

API Documentation

opreturn.net provides a simple REST JSON API to programmatically retrieve blockchain data over HTTPS.
Supported blockchains include bitcoin (btc), litecoin (ltc), dogecoin (doge), and garlicoin (grlc).

Documentation to request data is below, along with code examples and the JSON response.
all, apikey, address, block, bestblockhash, blockchaininfo, blockheader, blocktimes, hash, mempool, network, peers, pubkey, transaction

Bestblockhash

GET Bestblockhash

Endpoint
GET /api/[$coin]/bestblockhash/

//Returns the hash of the best (tip) block in the most-work fully-validated chain

[OPTIONS]
$coin (string): btc or ltc or doge or grlc


Code example - get bestblockhash

curl "https://opreturn.net/api/btc/bestblockhash/"

Response

{
    "coin": "btc",
    "cmd": "bestblockhash",
    "success": true,
    "bestblockhash": "0000000000000000000256864e7d17665e891d6a3619f97221ffad764d020157"
}