Tetreum Testnet API Reference
Complete API documentation for interacting with Tetreum Testnet blockchain.
Testnet Endpoints
Explorer JSON-RPC API
POST /api/rpcJSON-RPC 2.0 interface with rate limiting (100 requests/minute)
Explorer REST API
GET /api/*RESTful endpoints for blocks, transactions, contracts, and tokens
External Tetreum Testnet RPC
/api/rpcDirect access to Tetreum Testnet node
Public Endpoints
All public API endpoints are limited to 100 requests per minute per IP address. Rate limit headers are included in all responses.
Rate Limit Headers
X-RateLimit-Limit100X-RateLimit-Remaining98X-RateLimit-Reset1640995200Rate Limit Exceeded
When rate limit is exceeded, you'll receive a 429 status code with the following response:
{
"error": {
"code": 429,
"message": "Rate limit exceeded. Try again in 60 seconds."
}
}Blocks
GET /api/blocksGet latest blocks with optional limit parameter.
curl -X GET "/api/blocks?limit=10"
GET /api/blocks/:numberGet specific block by block number.
curl -X GET "/api/blocks/8119"
Transactions
GET /api/transactionsGet latest transactions with optional limit.
curl -X GET "/api/transactions?limit=20"
GET /api/transactions/:hashGet transaction details by hash.
curl -X GET "/api/transactions/0x..."
Contracts & Tokens
GET /api/contractsGet deployed contracts list.
curl -X GET "/api/contracts?limit=50"
GET /api/tokensGet token information and statistics.
curl -X GET "/api/tokens?limit=25"
GET /api/searchSearch across blocks, transactions, and contracts.
curl -X GET "/api/search?q=0x..."
Block Methods
eth_blockNumberReturns the current block number.
curl -X POST /api/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'eth_getBlockByNumberReturns block information by block number.
curl -X POST /api/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", true],
"id": 1
}'Transaction Methods
eth_sendTransactionSends a transaction to the network.
curl -X POST /api/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [{
"from": "0x...",
"to": "0x...",
"value": "0x9184e72a000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000"
}],
"id": 1
}'eth_getTransactionReceiptReturns transaction receipt by hash.
curl -X POST /api/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x..."],
"id": 1
}'Account Methods
eth_getBalanceReturns the balance of an account.
curl -X POST /api/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x...", "latest"],
"id": 1
}'Available Endpoints
GET /api/blocksGet latest blocks with pagination support.
GET /api/transactionsGet latest transactions with filtering options.
GET /api/contractsGet deployed smart contracts and verification status.
GET /api/tokensGet token information and market data.
GET /api/statsGet network statistics and performance metrics.
Example Usage
# Get latest 10 blocks curl https://testnet.tetscan.com/api/blocks?limit=10 # Get transactions for specific block curl https://testnet.tetscan.com/api/transactions?block=793788 # Get contract verification status curl https://testnet.tetscan.com/api/contracts/0x... # Get network statistics curl https://testnet.tetscan.com/api/stats
Public Endpoints
- • 100 requests per minute
- • No authentication required
- • Suitable for testing and development
- • Subject to fair use policy
Premium Access
- • 1000 requests per minute
- • API key authentication
- • Priority support
- • Advanced analytics
Need higher limits? Contact our team for enterprise API access and custom rate limits.
JavaScript/TypeScript
npm install @tetreum/sdkOfficial SDK for Node.js and browser applications.
Python
pip install tetreum-pythonPython library for blockchain interaction.
Go
go get github.com/tetreum/go-sdkGo SDK for high-performance applications.
Web3.js Compatible
npm install web3Use existing Web3.js applications with Tetreum.