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

Network

GET Network

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

//Returns an object containing various state info regarding P2P networking

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


Code example - get network

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

Response

{
    "coin": "btc",
    "cmd": "network",
    "success": true,
    "network": {
        "version": 240001,
        "subversion": "\/Satoshi:24.0.1(opreturn.net)\/",
        "protocolversion": 70016,
        "localservices": "0000000000000409",
        "localservicesnames": [
            "NETWORK",
            "WITNESS",
            "NETWORK_LIMITED"
        ],
        "localrelay": true,
        "timeoffset": 0,
        "networkactive": true,
        "connections": 19,
        "connections_in": 9,
        "connections_out": 10,
        "networks": [
            {
                "name": "ipv4",
                "limited": false,
                "reachable": true,
                "proxy": "",
                "proxy_randomize_credentials": false
            },
            {
                "name": "ipv6",
                "limited": false,
                "reachable": true,
                "proxy": "",
                "proxy_randomize_credentials": false
            }
        ],
        "relayfee": 1.0e-6,
        "incrementalfee": 1.0e-5,
        "localaddresses": [
            {
                "address": "2601:640:cb7f:5530:40c1:9d7f:2602:e26d",
                "port": 8333,
                "score": 1
            }
        ],
        "warnings": ""
    }
}