REST API Documentation
The Triangles daemon exposes a REST API on the RPC port (default 19112) when started with -rest=1.
All responses are JSON. Public endpoints require no authentication.
Public Endpoints
No authentication required. Rate limited.
/rest/chaininfoChain state: height, best block hash, supply, difficulty
/rest/block/{hash}Block details by hash. Append .hex for raw hex.
/rest/blockheader/{hash}Block header (lightweight, no tx list)
/rest/blockbyheight/{n}Block details by height
/rest/blockhashbyheight/{n}Get block hash at a given height
/rest/tx/{txid}Transaction details. Append .hex for raw hex.
/rest/mempoolList of unconfirmed transaction IDs
/rest/difficultyCurrent PoW and PoS difficulty
/rest/supplyUTXO set statistics and total supply
/rest/stakingStaking network stats (weight, difficulty, expected time)
/rest/miningMining info (hashrate, block value, stake interest)
/rest/subsidyCurrent block subsidy/reward
/rest/estimatefeeEstimated fee per kilobyte
/rest/checkpointSync checkpoint information
/rest/networkNetwork info (version, connections, proxy)
/rest/peersList of connected peers with details
/rest/validate/{addr}Validate a Triangles address
/rest/address/{addr}/balanceAddress balance (requires -addressindex=1)
/rest/address/{addr}/utxosAddress unspent outputs (requires -addressindex=1)
/rest/address/{addr}/txidsAddress transaction history. Supports ?start=N&end=N (requires -addressindex=1)
/rest/tx/decodeDecode a raw transaction. Body: {"hex":"..."}
/rest/tx/sendBroadcast a raw transaction. Body: {"hex":"..."}
Wallet Endpoints
Require HTTP Basic Auth (RPC credentials) or Bearer token (-restapikey).
/rest/wallet/infoWallet summary (balance, tx count, keypool)
/rest/wallet/balanceWallet balance
/rest/wallet/transactionsRecent wallet transactions. Supports ?count=N&skip=N
/rest/wallet/transaction/{txid}Wallet transaction detail
/rest/wallet/unspentWallet unspent outputs. Supports ?minconf=N&maxconf=N
/rest/wallet/addressesWallet address groupings
/rest/wallet/stakingStaking info for this wallet
/rest/wallet/address/newGenerate a new receiving address
/rest/wallet/sendSend coins. Body: {"address":"...", "amount":N}
/rest/wallet/sendmanySend to multiple addresses. Body: {"recipients":{"addr":amount}}
/rest/wallet/unlockUnlock wallet. Body: {"passphrase":"...", "timeout":N}
/rest/wallet/lockLock the wallet
Configuration
-rest=1 Enable the REST API-addressindex=1 Enable address index (required for /address/* endpoints)-restcorsorigin=* Set CORS allowed origin (default: *)-restapikey=<token> Bearer token for wallet endpoint authentication-restratelimit=30 Rate limit per IP per second (default: 30, 0=disabled)