KuberCoin Node API
REST API and JSON-RPC endpoints for interacting with the KuberCoin node.
All protected endpoints require Authorization: Bearer <api-key>
REST API Endpoints
/api/health
Health check (public)
/api/info
Chain info: height, difficulty, peers
/api/block/{hash}
Block by hash
/api/block-by-height/{height}
Block by height
/api/tx/{txid}
Transaction details
/api/tx/{txid}/proof
Merkle proof for a transaction
/api/balance/{address}
Address balance (confirmed + unconfirmed)
/api/address/{address}/txs
Transaction history for address
/api/address/{address}/utxos
UTXOs for address
/api/mempool
Mempool state
/api/mempool/address/{addr}
Mempool transactions for address
/api/peers
Connected peers
/api/listing
Coin listing info
/api/tx
Broadcast raw transaction
/metrics
Prometheus metrics
JSON-RPC Methods
Send JSON-RPC 2.0 requests to POST / with Bearer authentication.
getblockcount
[]
Returns the current block height
getbestblockhash
[]
Returns the hash of the best (tip) block
getmininginfo
[]
Returns mining-related information
getnewaddress
[]
Generates a new wallet address
getbalance
[]
Returns the total wallet balance
getpeerinfo
[]
Returns info about connected peers
getconnectioncount
[]
Returns the number of connections
getnetworkinfo
[]
Returns network state information
Example Request
# REST API curl -H "Authorization: Bearer YOUR_API_KEY" \ https://node.kuber-coin.com/api/info # JSON-RPC curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"getblockcount","params":[]}' \ https://node.kuber-coin.com/
WebSocket Events
Connect to wss://rpc.kuber-coin.com/ws for real-time events.
newBlock
Emitted when a new block is added to the chain
{"type":"newBlock","data":{"hash":"...","height":123,...}}
newTransaction
Emitted when a new transaction enters the mempool
{"type":"newTransaction","data":{"txid":"...","size":...}}
mempoolUpdate
Emitted when the mempool state changes
{"type":"mempoolUpdate","data":{"count":42,...}}