Public API
A read-mostly REST API served by every node that runs with --explorer. It gives wallets, explorers, payment services and scripts what they need without a node of their own and without exposing JSON-RPC. The public test-network endpoint is http://193.187.93.29:19380/api/.
Overview
- JSON over HTTP; cross-origin requests are allowed (CORS), so web pages can call it directly.
- Addresses (
trq1…) and key hashes are both accepted wherever an owner is expected. - Amounts are integer atoms (1 RQT = 100,000,000 atoms).
- Errors are JSON
{"error": "..."}with HTTP 400 (bad input), 404 (unknown), 422 (transaction rejected) or 429 (rate limit).
Routes
| Route | Result |
|---|---|
GET /api/info | network, height, tip, version, mempool size, current fee rate |
GET /api/fee?blocks=N | {feerate, blocks, min_feerate}: atoms per byte to be included within N blocks (default 3) |
GET /api/block/<height or id> | header fields and txids of a best-chain block |
GET /api/tx/<txid> | a transaction from the chain or the mempool, with the value and owner of every input it spends, its outputs, fee and height |
GET /api/address/<owner>/balance | {confirmed, unconfirmed, immature} |
GET /api/address/<owner>/utxos | unspent outputs: txid, vout, value, height, coinbase, confirmed, spendable |
GET /api/address/<owner>/history?limit=N | txid, height, confirmations, time, received, sent; newest first |
GET /api/utxos?owners=A,B,… | unspent outputs of 1–200 owners in one request; each entry names its owner |
GET /api/history?owners=A,B,…&limit=N | history of 1–200 owners; each entry names its owner |
POST /api/tx | relay a signed transaction: the hex as the body or {"hex": "…"}; answers {"txid": "…"} |
Examples
API=http://193.187.93.29:19380
curl -s $API/api/info
curl -s $API/api/address/trq1q.../balance
curl -s "$API/api/history?owners=trq1q...,trq1q...&limit=20"
curl -s -X POST $API/api/tx -d '{"hex":"0100000001..."}'
From a web page:
const r = await fetch('http://193.187.93.29:19380/api/address/' + address + '/balance');
const { confirmed, unconfirmed, immature } = await r.json();
Rate limits
Each client address has a budget of 120 requests that refills at 20 per second. A multi-owner query costs 1 + owners / 10; a transaction submission costs 10. Requests beyond the budget get HTTP 429. Nodes from 0.15.2 accept the full 200 owners in one request line; earlier nodes accept about 25.
Trust and privacy
- The API reports that node's view of the chain. A wallet using it trusts the node for balances and history; it cannot lose coins to the node, because keys never leave the wallet.
- The node learns which addresses are asked about, from which IP address.
- For both trust and privacy, run your own node with
--explorer 127.0.0.1:PORTand use the same API locally.
Health
GET /health returns the node's status as JSON, with HTTP 503 when it has no peers, has seen no block for 20 minutes or is syncing.
Wallet gateway
The requant.network wallets use a separate HTTPS gateway, https://requant.network/wallet-api/v1/rpc, which accepts JSON-RPC for getinfo, getblock, gettx, utxos, history and sendtx only (public services).