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

Blockchaininfo

GET Blockchaininfo

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

//Returns an object containing various state info regarding blockchain processing

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


Code example - get blockchaininfo

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

Response

{
    "coin": "btc",
    "cmd": "blockchaininfo",
    "success": true,
    "blockchaininfo": {
        "chain": "main",
        "blocks": 868780,
        "headers": 868780,
        "bestblockhash": "0000000000000000000256864e7d17665e891d6a3619f97221ffad764d020157",
        "difficulty": 95672703408224,
        "time": 1730691862,
        "mediantime": 1730689853,
        "verificationprogress": 0.99999917034785,
        "initialblockdownload": false,
        "chainwork": "00000000000000000000000000000000000000009807828d5acec9b657515eea",
        "size_on_disk": 695652263555,
        "pruned": false,
        "warnings": ""
    }
}