REST API Overview
Public REST API for Hoosat blockchain. Provides HTTP endpoints for accessing node information, blockchain data, addresses, mempool, and transaction operations.
Base URL
Production: https://proxy.hoosat.net/api/v1
Local Development: http://localhost:3000/api/v1
Key Features
- RESTful Design - Standard HTTP methods (GET, POST)
- Standardized Responses - Consistent success/error format
- Swagger Documentation - Interactive API docs at
/docs - Type Safety - Built with TypeScript and NestJS
- Production Ready - Error handling, validation, health checks
API Categories
Node Information
Query node status, network hashrate, coin supply, and health.
Endpoints:
GET /node/info- Node informationGET /node/blue-score- Current blockchain heightGET /node/estimate-hashrate- Network hashrate estimationGET /node/coin-supply- Circulating and max supplyGET /node/health- Health check
Blockchain
Access block data and DAG information.
Endpoints:
GET /blockchain/tip-hash- Latest block hashGET /blockchain/block/:hash- Block by hashGET /blockchain/blocks/:lowHash- Multiple blocksGET /blockchain/count- Block countGET /blockchain/dag-info- DAG information
Address
Check balances and UTXOs for addresses.
Endpoints:
GET /address/:address/balance- Single address balancePOST /address/balances- Multiple address balancesPOST /address/utxos- UTXOs for addresses
Network
Get network and peer information.
Endpoints:
GET /network/info- Current networkGET /network/peers- Peer addressesGET /network/connected-peers- Connected peer details
Mempool
Query pending transactions and fee estimates.
Endpoints:
GET /mempool/entry/:txId- Single mempool entryGET /mempool/entries- All mempool entriesPOST /mempool/entries-by-addresses- Entries by addressesGET /mempool/fee-estimate- Fee estimation
Transaction
Submit and track transactions.
Endpoints:
POST /transaction/submit- Submit signed transactionGET /transaction/:txId/status- Transaction status
Response Format
All endpoints return responses in this standardized format:
Success Response
{
"success": true,
"data": {
// Response data
},
"timestamp": "2025-01-10T12:00:00.000Z",
"path": "/api/v1/node/info"
}
Error Response
{
"success": false,
"error": "Error message description",
"timestamp": "2025-01-10T12:00:00.000Z",
"path": "/api/v1/node/info"
}
Authentication
Currently, the API does not require authentication. All endpoints are publicly accessible.
Rate Limiting
No rate limiting is currently enforced, but this may change in production deployments.
CORS
CORS is enabled for all origins in development. Configure appropriately for production.
Error Handling
The API uses standard HTTP status codes:
- 200 - Success
- 400 - Bad Request (invalid parameters)
- 404 - Not Found
- 500 - Internal Server Error
Error responses include descriptive messages to help debug issues.
Interactive Documentation
Full interactive API documentation with request/response examples is available at:
https://proxy.hoosat.net/docs (Swagger UI)
Quick Start
Get Node Information
curl https://proxy.hoosat.net/api/v1/node/info
Response:
{
"success": true,
"data": {
"p2pId": "a2bb90a5d6c686ebc5d933e157a28263",
"mempoolSize": "45",
"serverVersion": "0.1.0",
"isUtxoIndexed": true,
"isSynced": true
},
"timestamp": 1760025889814,
"path": "/api/v1/node/info"
}
Get Address Balance
curl https://proxy.hoosat.net/api/v1/address/hoosat:qz7ulu8mmmul6hdcnssmjnt28h2xfer8dz9nfqamvvh86ngef4q8dvzxcjdqe/balance
Response:
{
"success": true,
"data": {
"balance": "1000000000"
},
"timestamp": 1760026085383,
"path": "/api/v1/address/{{address}}/balance"
}
Submit Transaction
curl -X POST https://proxy.hoosat.net/api/v1/transaction/submit \
-H "Content-Type: application/json" \
-d '{
"version": 0,
"inputs": [...],
"outputs": [...],
"lockTime": "0",
"subnetworkId": "0000000000000000000000000000000000000000",
"gas": "0",
"payload": ""
}'
Response:
{
"success": true,
"data": {
"transactionId": "abc123def456789012345678901234567890123456789012345678901234abcd"
}
}
SDK Integration
The REST API is used by the Browser SDK (hoosat-sdk-web) for all blockchain operations.
For Node.js applications, consider using the Node.js SDK (hoosat-sdk) which provides direct gRPC connection for better performance and event streaming.
Next Steps
- Node Endpoints - Node information endpoints
- Blockchain Endpoints - Block and DAG queries
- Address Endpoints - Balance and UTXO queries
- Mempool Endpoints - Mempool and fee estimation
- Transaction Endpoints - Transaction submission and status
Links
- Live API: https://proxy.hoosat.net/api/v1
- Swagger Docs: https://proxy.hoosat.net/docs
- GitHub: https://github.com/Namp88/hoosat-proxy
- NPM Package: https://www.npmjs.com/package/hoosat-proxy