All routes answer JSON. REST API explains the conventions, Errors the failures.
Node
| Method | Route | Returns |
|---|
GET | /health | ok while the service is up |
GET | /v1/node/info | Version, network, chain ID, identity, storage mode, finalized cut |
GET | /v1/node/status | Network, chain ID, finalized cut, the rules of the next cut and the next scheduled upgrade |
GET | /v1/node/sync | synced, finalized_height, best_peer_height, behind_by, peers |
GET | /v1/node/peers | Connected peers. Off on the Tenrai API |
GET | /v1/node/identity | Public key for checking signed answers |
GET | /v1/storage | Storage mode and the oldest cut whose body is kept |
Chain
| Method | Route | Returns |
|---|
GET | /v1/chain/head | Finalized head: height, cut ID, state root, validator set |
GET | /v1/chain/genesis | The genesis of this chain |
GET | /v1/chain/issuance | Issued supply |
GET | /v1/chain/epoch | Current epoch, its cuts, active validators and bonded stake |
GET | /v1/chain/daa | Difficulty target and the controller's state |
GET | /v1/chain/rates | Blocks, transactions and cuts per second over 1, 10, 30 and 60 seconds, and the network hashrate |
GET | /v1/network/mining | Current mining target, anchor and registration window |
GET | /v1/work/pool | Work blocks the node holds and has queued |
Economics and fees
| Method | Route | Returns |
|---|
GET | /v1/economics/supply | Maximum, total and circulating supply, bonded, burned, reserves |
GET | /v1/economics/emission | Subsidy per cut and per interval, and the next reduction |
GET | /v1/economics/estimate/mining?hashes_per_second= | Expected mining reward per day |
GET | /v1/economics/estimate/staking?amount= | Expected staking reward per day for an amount in atoms |
GET | /v1/fees/quote | Minimum fee per mass and the largest transaction mass |
GET | /v1/fees/estimate | Fee suggestions for minimum, normal and priority |
Cuts and blocks
| Method | Route | Returns |
|---|
GET | /v1/cuts?before=&limit= | Finalized cuts, newest first |
GET | /v1/cuts/{height} | One cut |
GET | /v1/cuts/{height}/blocks | The work blocks it executed |
GET | /v1/cuts/{height}/transactions?cursor=&limit= | The transactions it finalized |
GET | /v1/cuts/{height}/changes?cursor=&limit= | Outputs it created and spent |
GET | /v1/cuts/{height}/addresses | Addresses it changed |
GET | /v1/blocks/recent?limit= | Newest work blocks |
GET | /v1/blocks/{id} | One work block with its transactions and reward |
Transactions
| Method | Route | Returns |
|---|
GET | /v1/transactions/manifest | Rules for building a transaction: chain, limits, mass rules, minimum fee |
POST | /v1/transactions | Submits {"api_version":1,"wire_hex":"…"} |
GET | /v1/transactions/{id} | The transaction with inputs, outputs, payload and confirmations |
GET | /v1/transactions/{id}/status | Lifecycle, work block, cuts, failure |
POST | /v1/transactions/status | Status of up to 1,024 IDs: {"api_version":1,"transaction_ids":[…]} |
GET | /v1/transactions/recent?limit= | Newest transactions the node has seen |
GET | /v1/mempool | Mempool size and limits |
GET | /v1/mempool/transactions?limit= | The transactions next in line |
POST | /v1/mempool/pending | Unconfirmed payments to up to 64 addresses |
/v1/transactions/{id}, /v1/blocks/{id} and /v1/cuts/{height} carry confirmations, the finalized cuts since the record became final, counting that cut; work_confirmations, the work blocks registered in those cuts, up to 100,000; and finalized_at_millis.
Addresses
| Method | Route | Returns |
|---|
GET | /v1/address/{address}/balance | Finalized balance and number of unspent outputs |
GET | /v1/address/{address}/utxos?cursor=&limit= | Unspent outputs with the cut they are anchored to |
GET | /v1/address/{address}/history?cursor=&limit= | Received and spent outputs, newest first |
GET | /v1/address/{address}/unbonding | Stake the address asked back and when it can be withdrawn |
GET | /v1/address/{address}/words | The six verification words |
POST | /v1/address/balances | Balances of up to 64 addresses |
POST | /v1/address/utxos | Unspent outputs of up to 64 addresses |
POST | /v1/address/changes | Changes of up to 64 addresses after a height |
POST | /v1/keys/registered | Registered key references of up to 64 addresses |
POST | /v1/proofs/utxos | Membership proofs for up to 8 outpoints at a finalized cut |
The address batches take {"api_version":1,"addresses":[…]}; /v1/address/changes also takes "after_height".
Staking
| Method | Route | Returns |
|---|
GET | /v1/staking/validators?cursor=&limit= | Validators, total bonded, minimum delegation |
GET | /v1/staking/validators/{id} | One validator |
GET | /v1/staking/validators/{id}/positions?cursor=&limit= | Its positions, bonded total, self-bond, delegations and stakers |
GET | /v1/staking/uptime | How many of the recent cuts each validator signed |
GET | /v1/staking/positions/{id} | One stake position |
POST | /v1/staking/positions?cursor=&limit= | Positions owned by, or paying rewards to, up to 64 addresses |
Sockets
| Route | Carries |
|---|
/v1/ws | Requests and subscriptions. Subprotocol tenrai.node-api.v1 |
/v1/events | Every finalized cut, resumable. Subprotocol tenrai.node-events.v1 |
/v1/transactions/{id}/status/stream | One transaction until it is final. Subprotocol tenrai.transaction-status.v1 |
See WebSocket events.
Tenrai API only
| Method | Route | Returns |
|---|
GET | /v1/gateway/health | State of the service and its node |
GET | /v1/gateway/history?window= | Network figures for charts; hour, day or week |
GET | /v1/gateway/price | TRAI price, its currency and when it was read; 0 without a source |
GET | /v1/gateway/price/history | The price per minute for 10 minutes and per hour for 30 days |
GET | /v1/archive/status | Archived range, gaps and counts |
GET | /v1/archive/cuts?before=&limit= | Archived cuts, newest first |
GET | /v1/archive/cuts/{height} | One archived cut with its rewards |
The archive routes exist while the service keeps an archive.
/v1/gateway/history returns the series height, blocks_per_second, transactions_per_second, hashes_per_second, cut_interval_millis, mempool_transactions, peers, difficulty, fee_per_mass, circulating_supply, bonded, cut_subsidy and active_validators.
| Window | Points | Step |
|---|
hour | 360 | 10 s |
day | 288 | 5 min |
week | 336 | 30 min |
Node only
Mining control runs on the node's loopback listener, port 28702. Tenrai API passes these two routes on only when it runs with --public-mining true: templates without transactions, one every 2 seconds and one found block per second for each client address.
| Method | Route | Use |
|---|
POST | /v1/mining/templates | Work for a payout address |
POST | /v1/mining/candidates | Submits a found block |
Miners and pools reach these through tenrai-miner, the stratum bridge or the reference pool.