Hydration Liquidity Parachain RPC Guide
Production-ready JSON-RPC guide for Hydration, Polkadot's unified liquidity parachain. Learn verified endpoints, network specs, integration patterns, and troubleshooting tips for HDX builders.
Hydration RPC
With Dwellir, you get access to our global Hydration network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.
Get your API keyWhy Build on Hydration?
Hydration powers Polkadot's unified liquidity layer, offering deep cross-chain markets through a single omnipool runtime. Teams choose Hydration because it provides:
Unified Liquidity Router
- Route any XCM-enabled asset through the omnipool without fragmented pairs
- Single-sided provisioning with dynamic fee curves tuned for stable markets
- Built-in MEV protection via adaptive liquidity routing
Native Cross-Chain Execution
- Parachain-level integrations with fast finality on the Polkadot Relay Chain
- Out-of-the-box XCM channels to leading parachains for trustless settlement
- Seamless asset teleportation between Hydration and Kusama's Basilisk network
Developer-First Tooling
- Full Substrate JSON-RPC coverage with archive snapshots for historical queries
- Rich analytics via Hydration Subscan and on-chain telemetry feeds
- Reusable SDK patterns across JavaScript, Rust, and Python ecosystems
Quick Start with Hydration
Connect to Hydration mainnet or Basilisk testnet in seconds using Dwellir-managed infrastructure.
curl -sS -X POST https://api-hydration.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 { JsonRpcProvider } from 'ethers';const provider = new JsonRpcProvider( 'https://api-hydration.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>');const latest = await provider.getBlockNumber();console.log('block', latest);import requestsurl = 'https://api-hydration.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>'payload = { 'jsonrpc': '2.0', 'id': 1, 'method': 'chain_getBlockHash', 'params': [0]}resp = requests.post(url, json=payload)print(resp.json())package mainimport ( "bytes" "fmt" "io" "net/http")func main() { url := "https://api-hydration.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))}Basilisk Test Environment
Basilisk mirrors Hydration's runtime for staging releases on Kusama. Use the Basilisk endpoints for pre-production load tests and fee estimation before promoting to Hydration mainnet.
Installation & Setup
Network Information
| Parameter | Hydration Mainnet | Basilisk Testnet |
|---|---|---|
| Relay Chain | Polkadot | Kusama |
| Parachain ID | 2034 | 2090 |
| Genesis Hash | 0xafdc188f45c71dacbaa0b62e16a91f726c7b8699a9748cdf715459de6b7f366d | 0xa85cfb9b9fd4d622a5b28289a02347af987d8f73fa3108450e2b4a11c1ce5755 |
| Runtime (2025-10-01) | specVersion 347, transactionVersion 1 | specVersion 127, transactionVersion 1 |
| Unit Symbol | HDX | BSX |
| Decimals | 12 | 12 |
| SS58 Prefix | 63 | 10041 |
| Explorer | hydration.subscan.io | basilisk.subscan.io |
Additional Details
| Parameter | Value | Details |
|---|---|---|
| Average Block Time | 6 seconds | GRANDPA finality |
| Native Liquidity Pools | Omnipool, LRNA staking, and routing pallets |
API Reference
Hydration exposes the full Substrate RPC surface for core operations, staking, governance, liquidity, and runtime-specific state_call helpers for omnipool pricing and router analytics.
Common Integration Patterns
Real-Time Block Streaming
import { ApiPromise, WsProvider } from '@polkadot/api';
const provider = new WsProvider('wss://api-hydration.n.dwellir.com/YOUR_API_KEY');
const api = await ApiPromise.create({ provider });
api.rpc.chain.subscribeNewHeads((header) => {
console.log(`New Hydration block #${header.number.toString()} (${header.hash.toHex()})`);
});Query Treasury Balances via Raw Storage
curl https://api-hydration.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 42,
"method": "state_getStorage",
"params": [
"0x26aa394eea5630e07c48ae0c9558cef7b6a7c9a35a95a160cb4cad330558dfa56d6f646c755b98a7afd0913860592153322b957be394a0619f20b32679ac1014"
]
}'The key above targets System.Account for 5EYCAe5jiUusQ3yAkVAP1YF81oXasuAHt2KG8Xjc433Zbx8A (Hydration treasury). Decode the SCALE response to obtain the 6,952,142,503,371.701702601733 HDX free balance observed on 2025-10-01.
Batch Weight and Fee Simulation
const api = await ApiPromise.create({ provider: new WsProvider('wss://api-hydration.n.dwellir.com/YOUR_API_KEY') });
const tx = api.tx.omnipool.sell(
assetInId,
assetOutId,
amountIn,
minimumReceived
);
const info = await api.rpc.payment.queryInfo(tx.toHex());
console.log(`Estimated fee: ${info.partialFee.toHuman()}`);
console.log(`Weight: ${info.weight.toString()} refTime`);Performance Best Practices
- Prefer WebSocket endpoints for subscriptions (
chain_subscribeNewHeads,grandpa_subscribeJustifications). - Cache runtime metadata and type registries keyed by
specVersion(347as of 2025-10-01) to avoid repeated handshakes. - Use
state_getKeysPagedwithpageSize <= 1000when scanning omnipool storage to prevent heavy RPC loads. - Rate-limit bulk extrinsic submissions and enable exponential backoff on
author_submitExtrinsicerrors. - Pin queries to finalized block hashes whenever you need deterministic historical data.
Troubleshooting
| Symptom | Likely Cause | Resolution |
|---|---|---|
API key does not exist | Missing or mis-typed Dwellir key | Re-issue credentials via the Dwellir dashboard and update endpoint URLs |
1010: Invalid Transaction | Runtime version drift or outdated nonce | Re-fetch metadata, synchronize account nonce, and rebuild the payload |
Null state_getStorage response | Storage key mismatch | Recompute the key with blake2_128_concat of the SS58-decoded AccountId |
| WebSocket disconnects after idle | Inactive ping/pong | Enable keep-alive heartbeats every 20 seconds and auto-retry with jitter |
FAQs
Does Hydration support archive queries? Yes. Dwellir retains full historical state so you can request old block hashes, query omnipool states, and reconstruct trades for compliance.
What SS58 prefix should wallets use?
Hydration uses prefix 63. Basilisk uses 10041. Ensure address derivation matches the target environment.
How do I estimate swap slippage programmatically?
Fetch omnipool reserves via state_call (custom RPC OmnipoolApi_quotePrice) and pair it with payment_queryInfo estimates to account for weight-based fees.
Smoke Tests
Run these checks before deploying to production:
-
Node health
Bash curl https://api-hydration.n.dwellir.com/YOUR_API_KEY \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"system_health","params":[]}'Expect peers ≥ 8 and
isSyncing: false. -
Latest header
Bash curl https://api-hydration.n.dwellir.com/YOUR_API_KEY \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":2,"method":"chain_getHeader","params":[]}'Confirm block numbers advance roughly every 6 seconds.
-
Account snapshot
Bash curl https://api-hydration.n.dwellir.com/YOUR_API_KEY \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":3,"method":"state_getStorage","params":["0x26aa394eea5630e07c48ae0c9558cef7b6a7c9a35a95a160cb4cad330558dfa56d6f646c755b98a7afd0913860592153322b957be394a0619f20b32679ac1014"]}'Decode the SCALE payload and verify balances.
Migration Guide (Polkadot → Hydration)
- Update endpoints: Replace legacy Polkadot URLs with
https://api-hydration.n.dwellir.com/YOUR_API_KEYor the Basilisk staging endpoint. - Adjust address encoding: Switch wallet and service configurations to SS58 prefix
63. Existing Polkadot addresses (prefix0) must be re-derived. - Refresh metadata: Download the latest metadata (
specVersion 347) and update custom type bundles for omnipool-related pallets. - Re-evaluate fees: Run
payment_queryInfoagainst Hydration extrinsics. Weights differ from Polkadot because of liquidity logic. - Review pallet availability: Hydration includes omnipool, router, and incentive pallets not present on Polkadot; ensure you check
rpc_methodsfor the namespaces you rely on.
Resources & Tools
- Hydration node releases: runtime changelogs and spec version history
- Polkadot.js Apps explorer: browser-based console
- Hydration runtime configuration source: chain specification in the node repository
- Dwellir Dashboard: get your API key
Ready to launch? Deploy with Hydration's omnipool liquidity and monitor production traffic through Dwellir's analytics.
eth_coinbase
Check the legacy eth_coinbase compatibility method on Gnosis. Public endpoints may return an address, `unimplemented`, or another unsupported-method response depending on the client.
chain_getBlock
Retrieve block data by hash on Hydration. Essential for accessing block headers and extrinsics on Polkadot's leading DEX with $200M+ TVL, Omnipool AMM, and native HOLLAR stablecoin.

