Docs

Kusama RPC with Dwellir

Production-ready Kusama relay chain RPC endpoints, quick start guides, Substrate JSON-RPC coverage, and best practices for building on Kusama with Dwellir.

Kusama RPC

With Dwellir, you get access to our global Kusama network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.

Get your API key

Why Build on Kusama?

Kusama is Polkadot’s canary network, offering the same Substrate architecture with faster governance and real economic conditions. It is the proving ground for runtime features before they ship to Polkadot, making it ideal for teams that need production-grade infrastructure with rapid iteration cycles.

Fast Iteration with Economic Finality

  • Governance cycles finalize upgrades in 7 days, letting you ship runtime changes weeks before Polkadot equivalents.
  • Real staking economics and on-chain treasury make Kusama suitable for live user pilots and incentivized testing.
  • Shared validator set delivers secure finality (~6s blocks) while preserving flexibility for experimental features.

Early Access to Substrate Innovations

  • New runtime pallets, XCM improvements, and networking upgrades land on Kusama first, giving you a head start on upcoming Polkadot capabilities.
  • Developers can validate performance at scale without waiting for Polkadot release windows.
  • Canary parachains (Statemine, Karura, Hydration, and more) provide a rich ecosystem for cross-chain experimentation.

Production Tooling & Ecosystem Depth

  • Fully compatible with the Polkadot JS stack, Subxt, py-substrate-interface, and Dwellir Sidecar REST APIs.
  • Rich telemetry, explorers (Subscan, Statescan), and infrastructure partners support monitoring and analytics.
  • Seamlessly migrate winning features to Polkadot once product-market fit is proven.

Quick Start with Kusama

Connect to Kusama’s relay chain endpoints and Sidecar REST surface with Dwellir.

Kusama RPC Endpoints
HTTPS
WSS
curl -sS -X POST https://api-kusama.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots> \  -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","method":"chain_getBlockHash","params":[0],"id":1}'
import { ApiPromise, WsProvider } from '@polkadot/api';const provider = new WsProvider('wss://api-kusama.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>');const api = await ApiPromise.create({ provider });const hash = await api.rpc.chain.getBlockHash(0);console.log(hash.toHex());
from substrateinterface import SubstrateInterfacesubstrate = SubstrateInterface(url='wss://api-kusama.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>')block_hash = substrate.get_block_hash(block_id=0)print(block_hash)
package mainimport (  "bytes"  "fmt"  "io"  "net/http")func main() {  url := "https://api-kusama.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>"  payload := []byte(`{"jsonrpc":"2.0","id":1,"method":"chain_getBlockHash","params":[0]}`)  resp, err := http.Post(url, "application/json",    bytes.NewBuffer(payload))  if err != nil { panic(err) }  defer resp.Body.Close()  body, _ := io.ReadAll(resp.Body)  fmt.Println(string(body))}

Installation & Setup

Network Information

ParameterValueDetails
Genesis Hash0xb0a8d493…3dafeRelay chain
Native TokenKSM12 decimals
SS58 Prefix2Address format
Runtime Spec Version1007001As of 3 Oct 2025
Transaction Version26state_getRuntimeVersion
ExplorerSubscankusama.subscan.io

Kusama operates as a relay chain without a parent relay. Parachain IDs are allocated per project; refer to individual parachain docs for cross-chain calls. Runtime and transaction versions above reflect the live values queried via state_getRuntimeVersion on 3 October 2025.

API Reference

Kusama exposes the same Substrate RPC namespaces as Polkadot, covering node telemetry, block production, storage access, and finality tracking.

Common Integration Patterns

Track Finality with GRANDPA and BEEFY

TypeScript
const finalizedHeads = await api.rpc.chain.subscribeFinalizedHeads((header) => {
  console.log(`GRANDPA finalized #${header.number}`);
});

const beefySub = await api.rpc.beefy.subscribeJustifications((event) => {
  console.log('BEEFY justification', event);
});

Combine GRANDPA finalized heads with beefy_subscribeJustifications to monitor parachain finality for bridges and XCMP relayers.

Paginate Large Storage Scans

TypeScript
const page = await api.rpc.state.getKeysPaged(
  '0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9',
  100,
  '0x',
  null
);

console.log('Fetched', page.length, 'System.Account keys');

Use state_getKeysPaged with archive access to traverse large storage maps without overwhelming RPC quotas.

Decode Fees Before Submission

TypeScript
const ext = api.tx.balances.transferAllowDeath(dest, amount);
const info = await api.rpc.payment.queryInfo(ext.toHex());
console.log(`PartialFee: ${info.partialFee.toHuman()}`);

Estimate transaction costs using payment_queryInfo so you can bound fees before broadcasting to Kusama.

Performance Best Practices

  • Prefer WebSocket connections for subscriptions, finality, and multi-round queries.
  • Cache runtime metadata (api.runtimeVersion, type bundles) and reuse the ApiPromise instance across requests.
  • Shard heavy workloads across archive nodes if you need deep historical access; avoid full-chain scans without pagination.
  • Back off exponentially on retries when encountering isSyncing or transient -32010 errors.
  • Use Sidecar REST for read-heavy explorers when SCALE decoding is unnecessary.

Troubleshooting

  • WebSocket handshake fails – Confirm your API key is appended exactly as provided and outbound TCP/443 is open.
  • Invalid SS58 address – Ensure addresses use prefix 2. Convert from Polkadot (prefix 0) with @polkadot/util-crypto helpers.
  • Type errors in clients – Refresh metadata (api.runtimeMetadata) after runtime upgrades; Kusama upgrades more frequently than Polkadot.
  • Extrinsic rejected – Decode the dispatch error via api.registry.findMetaError to surface module/error details.
  • rateLimit/TooManyRequests – Implement per-IP backoff and share a single connection pool across services.

Smoke Tests

Run these baseline checks against production endpoints (values captured 3 Oct 2025):

Bash
# Node health (peers: 68, isSyncing: false)
curl -s https://api-kusama.n.dwellir.com/YOUR_API_KEY \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"system_health","params":[]}'

# Latest block header (#30363294)
curl -s https://api-kusama.n.dwellir.com/YOUR_API_KEY \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"chain_getHeader","params":[]}'

# Block hash for #30363295 (0x028651…2e0c)
curl -s https://api-kusama.n.dwellir.com/YOUR_API_KEY \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"chain_getBlockHash","params":["0x1cf4e9f"]}'

# Runtime version (specVersion 1007001, transactionVersion 26)
curl -s https://api-kusama.n.dwellir.com/YOUR_API_KEY \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"state_getRuntimeVersion","params":[]}'

Verify the response fields match the expected peers, block numbers, hashes, and version metadata before onboarding workloads.

Migration Guide

  • Endpoints – Replace Polkadot RPC URLs with https://api-kusama.n.dwellir.com/YOUR_API_KEY or wss://api-kusama.n.dwellir.com/YOUR_API_KEY across services.
  • Addresses – Re-encode SS58 addresses with prefix 2; Polkadot addresses (prefix 0) are not valid on Kusama.
  • Runtime Types – Update your custom type bundles to match the Kusama spec (specVersion 1007001 as of Oct 2025) and refresh metadata caches after each upgrade.
  • Fee Calibration – Kusama uses different fee multipliers; re-run payment_queryInfo and adjust heuristics for tipping and priority fees.
  • Bridges & XCM – Confirm target parachain IDs and HRMP channels; Kusama pairs differ from Polkadot equivalents.

Resources & Tools