⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today β†’
Skip to main content

Hydration Liquidity Parachain RPC Guide

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 key β†’

Why 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.

πŸ”— RPC Endpoints

Hydration ParachainChain ID: 2034 (Polkadot)
Mainnet
HTTPS
https://api-hydration.n.dwellir.com/YOUR_API_KEY
βœ“ Archive Nodeβœ“ Trace APIβœ“ Debug APIβœ“ WebSocket

Quick Connect:

curl -X POST https://api-hydration.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
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​

curl https://api-hydration.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "chain_getHeader",
"params": []
}'

Expected output (2025-10-01):

{
"jsonrpc": "2.0",
"result": {
"number": "0x904ae4",
"hash": "0xd2f7f582eb7170b1a6382641a2ad9625cd46cb292fa0a8a1fc6f2bb6e1ed6b4d",
"parentHash": "0x2f58fc2a2d7024520d2062142c4d7788146101d0736c7c952866adb17bb25483"
},
"id": 1
}

Network Information​

ParameterHydration MainnetBasilisk Testnet
Relay ChainPolkadotKusama
Parachain ID20342090
Genesis Hash0xafdc188f45c71dacbaa0b62e16a91f726c7b8699a9748cdf715459de6b7f366d0xa85cfb9b9fd4d622a5b28289a02347af987d8f73fa3108450e2b4a11c1ce5755
Runtime (2025-10-01)specVersion 347, transactionVersion 1specVersion 127, transactionVersion 1
Unit SymbolHDXBSX
Decimals1212
SS58 Prefix6310041
Explorerhydration.subscan.iobasilisk.subscan.io

Additional properties:

  • Average block time: 6 seconds with GRANDPA finality
  • Native liquidity pools: omnipool, LRNA staking, and routing pallets

Available JSON-RPC Methods​

Hydration exposes the full Substrate RPC surface for core operations, staking, governance, and liquidity tooling. The tables below point to the dedicated reference pages for each namespace.

Core Method Groups​

GroupPurposeKey Methods
system_*Node health, networking, chain metadatasystem_health, system_version, system_properties
chain_*Blocks, headers, finality trackingchain_getHeader, chain_getBlock, chain_subscribeNewHeads
state_*Storage queries, metadata, proofsstate_getStorage, state_getKeys, state_getKeysPaged, state_getRuntimeVersion
author_*Extrinsic submission pipelineauthor_submitExtrinsic, author_pendingExtrinsics
grandpa_*Finality gadget insightsgrandpa_roundState
rpc_methodsDiscover supported RPC namespacesrpc_methods

Hydration runtime helpers​

HelperPurposeKey Methods
state_callInvoke Hydration's runtime APIs for omnipool pricing, router insights, and other advanced analyticsstate_call

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 (347 as of 2025-10-01) to avoid repeated handshakes.
  • Use state_getKeysPaged with pageSize <= 1000 when scanning omnipool storage to prevent heavy RPC loads.
  • Rate-limit bulk extrinsic submissions and enable exponential backoff on author_submitExtrinsic errors.
  • Pin queries to finalized block hashes whenever you need deterministic historical data.

Troubleshooting​

SymptomLikely CauseResolution
API key does not existMissing or mis-typed Dwellir keyRe-issue credentials via the Dwellir dashboard and update endpoint URLs
1010: Invalid TransactionRuntime version drift or outdated nonceRe-fetch metadata, synchronize account nonce, and rebuild the payload
Null state_getStorage responseStorage key mismatchRecompute the key with blake2_128_concat of the SS58-decoded AccountId
WebSocket disconnects after idleInactive ping/pongEnable 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:

  1. Node health

    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.

  2. Latest header

    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.

  3. Account snapshot

    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_KEY or the Basilisk staging endpoint.
  • Adjust address encoding: Switch wallet and service configurations to SS58 prefix 63. Existing Polkadot addresses (prefix 0) 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_queryInfo against Hydration extrinsicsβ€”weights differ from Polkadot due to liquidity logic.
  • Review pallet availability: Hydration includes omnipool, router, and incentive pallets not present on Polkadot; ensure you check rpc_methods for the namespaces you rely on.

Resources & Tools​

Ready to launch? Deploy with Hydration's omnipool liquidity and monitor production traffic through Dwellir's analytics.