API v1
Public JSON API of this explorer, used by the NEB Community Wallet and the OTC site. Base URL https://explorer.neb.example/api/v1.
Conventions
- Amounts are decimal strings of base units (1 NEB = 100,000,000). Parse them with
BigInt, never as floats. - Hashes, ids and locks are lower-case hex without 0x. Ids print in byte order (no reversal). Times are unix seconds.
- Every
:addraccepts aneb1…address or a 64-hex lock.addressisnullfor multisig and unknown locks; the explorer prints those aslock:<hex>. - Errors: HTTP 4xx/5xx with
{ "error": string, "code": string }. Codes:bad_request,bad_address,bad_txid,bad_cursor,not_found,invalid_tx,rejected,rate_limited(429, with Retry-After),upstream(502, node),unavailable(503, index),internal. - CORS
*on every endpoint, includingPOST /tx/broadcast. Confirmed data is cached for a few seconds (Cache-Control); UTXOs and broadcasts are not cached. - Per-visitor limits per minute: 240 for simple reads, 120 for lists and search, 60 for UTXOs, the rich list and peers, 20 for broadcasts.
curl https://explorer.neb.example/api/v1/info
curl https://explorer.neb.example/api/v1/address/neb1…/utxos
curl -X POST -H 'content-type: application/json' -d '{"hex":"01…"}' https://explorer.neb.example/api/v1/tx/broadcastEndpoints
/infoNode and index status, fee policy.
{ "network": "mainnet", "chainId": "da2f5a…39ae", "height": 2900, "tipHash": "…", "tipTime": 1795184460,
"indexedHeight": 2900, "synced": true, "nodeVersion": "1.0.2", "peers": 4,
"feePolicy": { "minFeePerByte": "1", "minFee": "10000", "dust": "1000" }, "coinbaseMaturity": 100 }synced is true when the index holds the node’s tip. The fee policy values are base units (strings, like every amount).
/blocks?limit=20&before=<height>Block summaries, newest first (limit at most 100); before is exclusive.
{ "blocks": [ { "height": 2900, "id": "…", "time": 1795184460, "txCount": 1, "size": 624, "bits": 3154056948,
"difficulty": 33676240.59, "miner": { "address": "neb1…", "lock": "…", "amount": "1900000000" },
"reward": "2000000000", "fees": "0" } ] }reward is the subsidy of the height; miner is the first coinbase output (address null for a multisig lock). difficulty = pow-limit target / target.
/block/:heightOrIdOne block: the summary plus parent, bodyRoot, nonce, shareCount, confirmations and its txids (coinbase first).
{ …BlockSummary, "parent": "…", "bodyRoot": "…", "nonce": 123456, "shareCount": 31, "confirmations": 12, "txids": ["…"] }/tx/:txidA confirmed transaction, or an unconfirmed one broadcast through this explorer.
{ "txid": "…", "status": "confirmed", "height": 2890, "blockId": "…", "time": 1795183860, "confirmations": 11,
"coinbase": false, "size": 270, "fee": "10000",
"inputs": [ { "prevTxid": "…", "prevIndex": 0, "address": "neb1…", "lock": "…", "lockType": 1, "amount": "500000000", "publicKey": "…" } ],
"outputs": [ { "index": 0, "amount": "100000000", "lockType": 1, "lock": "…", "address": "neb1…", "spentBy": null } ] }status "mempool" (height, blockId and time null, confirmations 0) only while the node’s getrawmempool holds the transaction, read live. A relayed transaction that left the mempool without being confirmed (dropped or replaced) is 404 not_found, never a stale "mempool"; one in a block the indexer has not stored yet is reported "confirmed" from the node. A coinbase has one input with prevTxid of zeros, prevIndex 4294967295 and null fields, and fee "0". 404 not_found for an unknown txid, including mempool transactions not broadcast here.
/address/:addrBalance and totals of a lock from the index (neb1… or a 64-hex lock).
{ "address": "neb1…", "lock": "…", "lockType": 1, "balance": "4000000000", "spendable": "2000000000", "immature": "2000000000",
"received": "…", "sent": "…", "txCount": 12, "utxoCount": 3, "firstSeenHeight": 10, "lastSeenHeight": 2899, "rank": 42 }spendable excludes coinbase outputs that are not mature at the next height. An address never seen returns zeros, null heights and rank null.
/address/:addr/txs?limit=25&cursor=History, newest first (limit at most 100); pass nextCursor back as cursor for the next page.
{ "txs": [ { "txid": "…", "height": 2899, "time": 1795184400, "delta": "-100010000", "fee": "10000", "coinbase": false } ], "nextCursor": "2875.1" }delta is signed: received − sent for this lock in that transaction.
/address/:addr/utxosUnspent outputs, passed through from the node’s getutxos (authoritative, confirmed only). Never cached.
{ "tipHeight": 2900, "utxos": [ { "txid": "…", "index": 0, "amount": "1900000000", "height": 2850, "coinbase": true, "lockType": 1, "mature": false } ] }mature is computed for tipHeight + 1. The node refuses a lock with more than 20,000 unspent outputs (502 upstream).
/tx/broadcastBroadcast a signed transaction. Body: { "hex": "<transaction hex>" }.
{ "txid": "…" }Decoded and shape-checked first (400 invalid_tx), then sent to the node; a node refusal is 400 { "error": "<node message>", "code": "rejected" }. The node refuses spends of unconfirmed outputs and of outputs already spent by a pooled transaction. Limited to 20 requests a minute per visitor.
/mempoolThe node’s mempool txids; size and fee only for transactions broadcast through this explorer (null otherwise).
{ "count": 1, "txs": [ { "txid": "…", "size": 270, "fee": "10000", "seenAt": 1795184470 } ] }/richlist?limit=100&offset=0Locks by balance (limit at most 1000). total is the number of locks with a positive balance.
{ "total": 543, "holders": [ { "rank": 1, "address": "neb1…", "lock": "…", "lockType": 1, "balance": "…", "share": 0.0431 } ] }share is a fraction of the circulating supply (0 to 1). The project share lock and the unspendable genesis lock are included.
/statsSupply and network figures.
{ "height": 2900, "issued": "8823189999952", "circulating": "8823189999952", "holders": 543, "txCount24h": 600,
"avgBlockTime1h": 59.8, "difficulty": 33676240.59, "attemptsPerSecond": 590000000000, "projectShareTotal": "290100000000" }issued = scheduled rewards of heights 0..height + the genesis carry-over; circulating = sum of all unspent outputs. txCount24h excludes coinbases. attemptsPerSecond = expected attempts of the last hour’s blocks / their time span.
/search?q=Resolves a height, block id, txid, neb1 address or lock.
{ "type": "block", "id": "…" } // or { "type": "tx", … } or { "type": "address", "id": "neb1… or lock hex" }404 not_found when nothing matches.
/peersThe node’s peers.
[ { "addr": "203.0.113.5:3440", "inbound": false, "subver": "neb-node/1.0.2", "height": 2900, "connected": 1025 } ]