SahyadriSahyadriAPI

RPC Endpoints

Direct node access for exchanges, wallets, and applications.

Decentralized P2P Architecture — No Central Server!
Connect directly to any Sahyadri Node. For development use localhost. For production use node.sahyadri.io or any community node. All data comes directly from the blockchain network.

Direct Node RPC Access

JSON-RPC HTTP (Primary)
http://127.0.0.1:27112
Primary RPC via HTTP POST. Use for all standard blockchain queries.
Protocol: HTTP POSTExchanges, Wallets, ExplorersLatency: Low
WebSocket (Real-time)
ws://127.0.0.1:27110
Real-time subscriptions over WebSocket. Use for live updates.
Protocol: WebSocketLive dashboards, Trading botsLatency: Real-time
gRPC (High Performance)
127.0.0.1:27113
High-performance RPC calls using Protobuf. Use for production workloads.
Protocol: gRPC ProtobufMobile wallets, High-load appsLatency: Lowest
P2P Network
127.0.0.1:26111
Peer-to-peer network communication between nodes.
Protocol: TCPNode operatorsLatency: Varies
Production (When Mainnet Live)
https://node.sahyadri.io:27112
Or any community node - fully decentralized

Protocol Comparison

FeatureJSON-RPCWebSocketgRPC
TransportHTTP POSTWebSocketHTTP/2
Data FormatJSONJSONProtobuf
Real-timeNoYesYes
PerformanceGoodGoodBest
Browser SupportYesYesLimited
Best ForSimple queriesLive updatesHigh throughput

Connection Examples

JavaScript (WebSocket)

const ws = new WebSocket('ws://127.0.0.1:27110');

ws.onopen = () => {
  // Get node info
  ws.send(JSON.stringify({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getInfo",
    "params": [{}]
  }));

  // Subscribe to new blocks
  ws.send(JSON.stringify({
    "jsonrpc": "2.0",
    "id": 2,
    "method": "subscribeVirtualChainChanged",
    "params": [{ "includeAcceptedTransactionIds": true }]
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log(data);
};

Python (gRPC)

import grpc
from rpc_pb2 import *
from rpc_pb2_grpc import RPCServiceStub

# Connect to gRPC endpoint
channel = grpc.insecure_channel('127.0.0.1:27113')
stub = RPCServiceStub(channel)

# Get node info
response = stub.GetInfo(GetInfoRequest())
print(response.serverVersion)

# Get balance
balance = stub.GetBalanceByAddress(
    GetBalanceByAddressRequest(address="csm1sexample...")
)
print(balance.balance)

cURL / wscat

# Install wscat
npm install -g wscat

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

# Send RPC calls
> {"jsonrpc":"2.0","id":1,"method":"getInfo","params":[{}]}
> {"jsonrpc":"2.0","id":2,"method":"getCoinSupply","params":[{}]}

# gRPC testing
grpcurl -plaintext 127.0.0.1:27113 list