SahyadriSahyadriAPI

Rate Limits & Errors

Fair usage limits to ensure stability for all users.

Rate Limits

50
WebSocket Connections
Maximum simultaneous connections per IP
Unlimited
RPC Calls
Direct node calls (P2P - no central server)
No Auth
API Key Required
Public access - decentralized architecture
JSON-RPC
Transport Protocol
HTTP POST + WebSocket transport

HTTP Response Codes

CodeDescriptionSolution
200Success — request completed successfullyNone needed
400Bad Request — invalid parameters or malformed requestCheck parameter format and types
404Not Found — block, transaction, or address does not existVerify the resource exists on chain
429Too Many Requests — rate limit exceededImplement exponential backoff
500Internal Server Error — something went wrongCheck node status and logs
503Service Unavailable — node is syncing or downWait for sync or restart node

Common RPC Errors & Solutions

Connection Refused

{"error": "Connection refused", "message": "Node is not running on port 27113"}
Solution:
1. Start node: cd ~/sahyadri-final/sahyadri && ./sahyadri.sh
2. Wait for node to start
3. Retry request

Invalid Address

{"error": "Invalid address format", "message": "Address must start with csm1s"}
Solution:
Verify address format: csm1s + 38 base32 characters
Example: csm1sxh5at56p0c6s9gwtj0mumwcly258gexk5zxp0xvj6

Node Syncing

{"error": "Node is syncing", "message": "Please wait for sync to complete"}
Solution:
Check sync status via getInfo
Wait until isSynced = true

Invalid Nonce

{"error": "Invalid nonce", "message": "Account nonce mismatch"}
Solution:
Get current nonce via getAccountInfo
Increment nonce by 1 for next transaction

Insufficient Balance

{"error": "Insufficient balance", "message": "Account balance too low"}
Solution:
Check balance via getBalanceByAddress
Ensure sufficient funds for amount + fee

Invalid Signature

{"error": "Invalid signature", "message": "Dilithium signature verification failed"}
Solution:
Re-sign transaction with correct private key
Verify Dilithium-3 signature format

Testing Tools & Commands

wscat - WebSocket Testing

# Install wscat
npm install -g wscat

# Connect
wscat -c ws://127.0.0.1:27110

# Test methods
> {"id":1,"method":"getInfo","params":[{}]}
> {"id":2,"method":"getCoinSupply","params":[{}]}
> {"id":3,"method":"ping","params":[{}]}

grpcurl - gRPC Testing

# List services
grpcurl -plaintext 127.0.0.1:27113 list

# Call GetInfo
grpcurl -plaintext 127.0.0.1:27113 protowire.RPC/MessageStream

Browser Console

// Open browser console (F12) and paste:
const ws = new WebSocket('ws://127.0.0.1:27110');
ws.onopen = () => ws.send(JSON.stringify({"id":1,"method":"ping","params":[{}]}));
ws.onmessage = (e) => console.log(JSON.parse(e.data));

Best Practices

  • Always implement exponential backoff for retries
  • Cache responses when possible (block data is immutable)
  • Use WebSocket for real-time subscriptions instead of polling
  • Batch address queries using getBalancesByAddresses
  • Monitor getInfo isSynced status before processing transactions
  • Verify addresses before broadcasting transactions