Kusama – Polkadot's Canary Network for Rapid Innovation
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.
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.
🔗 RPC Endpoints
Quick Connect:
curl -X POST https://api-kusama.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Installation & Setup#
- curl (HTTP JSON-RPC)
- JavaScript (polkadot.js)
- Rust (subxt)
- Python (py-substrate-interface)
curl -s https://api-kusama.n.dwellir.com/YOUR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "chain_getHeader",
"params": [],
"id": 1
}'
import { ApiPromise, WsProvider } from '@polkadot/api';
async function main() {
const provider = new WsProvider('wss://api-kusama.n.dwellir.com/YOUR_API_KEY');
const api = await ApiPromise.create({ provider });
const [chain, version] = await Promise.all([
api.rpc.system.chain(),
api.rpc.system.version(),
]);
console.log(`Connected to ${chain.toString()} v${version.toString()}`);
// Subscribe to finalized blocks
const unsub = await api.rpc.chain.subscribeFinalizedHeads((header) => {
console.log(`Finalized block #${header.number} at ${header.hash}`);
});
// Stop subscription after 3 blocks
setTimeout(async () => {
await unsub();
await api.disconnect();
}, 18000);
}
main().catch(console.error);
use subxt::{OnlineClient, PolkadotConfig};
#[subxt::subxt(runtime_metadata_path = "./metadata/kusama.scale" )]
pub mod kusama {}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api = OnlineClient::<PolkadotConfig>::from_url(
"wss://api-kusama.n.dwellir.com/YOUR_API_KEY"
).await?;
let header = api.rpc().block_header(None).await?.expect("latest header");
println!("Latest block: #{:?} (hash {:?})", header.number, header.hash());
let account = api.storage().system().account(
&"E8MByjWbS49hmzFM1U5rvFJES1Xgz1TSBAZLiYqZQiFTNUY".parse()?
).await?;
println!("Free balance: {} KSM", account.data.free);
Ok(())
}
from substrateinterface import SubstrateInterface
substrate = SubstrateInterface(
url="wss://api-kusama.n.dwellir.com/YOUR_API_KEY",
type_registry_preset="kusama"
)
chain = substrate.rpc_request("system_chain", [])
print(f"Connected to {chain['result']}")
head = substrate.rpc_request("chain_getFinalizedHead", [])
print(f"Finalized head: {head['result']}")
account_info = substrate.query(
module='System',
storage_function='Account',
params=['E8MByjWbS49hmzFM1U5rvFJES1Xgz1TSBAZLiYqZQiFTNUY']
)
print(f"Free: {account_info['data']['free']}")
Network Information#
Genesis Hash
0xb0a8d493…3dafe
Relay chainNative Token
KSM
12 decimalsSS58 Prefix
2
Address formatRuntime Spec Version
1007001
As of 3 Oct 2025Transaction Version
26
state_getRuntimeVersionExplorer
Subscan
kusama.subscan.ioKusama 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.
Substrate JSON-RPC API Reference#
Kusama exposes the same Substrate RPC namespaces as Polkadot, covering node telemetry, block production, storage access, and finality tracking. Use the tables below to open the method guides for each namespace.
Core Substrate namespaces#
| Namespace | Purpose | Key Methods |
|---|---|---|
system_* | Inspect node state, peers, and runtime metadata. | system_chain, system_health, system_properties, system_version |
chain_* | Retrieve blocks, headers, and follow finality streams. | chain_getHeader, chain_getBlockHash, chain_getFinalizedHead, chain_subscribeNewHeads, chain_subscribeFinalizedHeads |
state_* | Read storage, fetch metadata, and call runtime APIs. | state_getStorage, state_getKeys, state_getKeysPaged, state_getMetadata, state_getRuntimeVersion, state_call |
author_* | Submit extrinsics and manage transaction queues. | author_submitExtrinsic, author_submitAndWatchExtrinsic, author_pendingExtrinsics, author_rotateKeys |
rpc_methods | Discover every RPC namespace exposed by the node. | rpc_methods |
Finality and relay tracking#
| Namespace | Purpose | Key Methods |
|---|---|---|
grandpa_* | Inspect GRANDPA voting rounds and validator thresholds. | grandpa_roundState |
beefy_* | Track parachain proofs relayed through BEEFY. | beefy_getFinalizedHead |
Common Integration Patterns#
Track Finality with GRANDPA and BEEFY#
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#
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#
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
isSyncingor transient-32010errors. - 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-cryptohelpers. - 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.findMetaErrorto 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):
# 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_KEYorwss://api-kusama.n.dwellir.com/YOUR_API_KEYacross 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 1007001as of Oct 2025) and refresh metadata caches after each upgrade. - Fee Calibration – Kusama uses different fee multipliers; re-run
payment_queryInfoand adjust heuristics for tipping and priority fees. - Bridges & XCM – Confirm target parachain IDs and HRMP channels; Kusama pairs differ from Polkadot equivalents.