Moonbase Alpha RPC Guide
Production-ready JSON-RPC guide for Moonbase Alpha, covering endpoints, network specs, integration patterns, and troubleshooting for builders targeting the Moonbeam test network.
Moonbase Alpha RPC
With Dwellir, you get access to our global Moonbase Alpha 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 Moonbase Alpha?
Moonbase Alpha is Moonbeam’s public test network. It mirrors Moonbeam’s Ethereum-compatible Substrate runtime so you can validate end‑to‑end integrations safely before deploying to mainnet:
- EVM + Substrate: Test both Ethereum JSON‑RPC and Substrate RPC flows on one chain
- Fast iteration: Frequent upgrades track Moonbeam, enabling realistic pre‑prod rehearsals
- Tooling parity: Works with polkadot.js, subxt, py‑substrate‑interface, and EVM SDKs
Quick Start
Connect in seconds using Dwellir’s optimized endpoints.
curl -sS -X POST https://api-moonbase-alpha.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-moonbase-alpha.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-moonbase-alpha.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-moonbase-alpha.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))}Get your API key
Sign up at the Dwellir Dashboard to replace YOUR_API_KEY before sending requests.
Installation & Setup
Network Information
| Parameter | Value | Details |
|---|---|---|
| Relay Chain | Alphanet Relay Chain | |
| Unit / Decimals | DEV / 18 | |
| SS58 Prefix | 1287 | |
| Genesis Hash | 0x91bc6e169807aaa54802737e1c504b2577d4fafedd5a02c10293b1cd60e39527 | |
| Runtime (2025-10-09) | specVersion 3900 · transactionVersion 3 | |
| Explorer | moonbase.moonscan.io |
API Reference
Supported core method groups include system_*, chain_*, state_*, author_*, payment_*, and rpc_methods. Frontier EVM (eth_*) and debug namespaces are available on Moonbase Alpha but are out of scope for this Substrate reference.
Common Integration Patterns
- Prefer WebSocket for subscriptions (e.g.,
chain_subscribeNewHeads). - Cache metadata and types between runs to avoid repeated
state_getMetadata/state_getRuntimeVersioncalls. - For large storage scans, paginate keys with
state_getKeysPaged. - Use
payment_queryInfoto estimate fees beforeauthor_submitExtrinsic.
Performance Best Practices
- Reconnect with exponential backoff on WS disconnects.
- Batch independent calls where possible.
- Scope
state_getStoragequeries to explicit keys; avoid full‑state traversals.
Troubleshooting
- Connection errors: verify API key, TLS, and use WS for subscriptions.
- Type errors: ensure metadata is fresh; update polkadot.js/subxt type bundles.
- SS58 issues: confirm prefix
1287and address checksum. - Extrinsics failing: decode dispatch errors using runtime metadata.
Smoke Tests
system_health→ expectisSyncing: falseand non‑zeropeers.chain_getHeader(latest) → block number increases over time.state_getRuntimeVersion→ returnsspecVersion: 3900,transactionVersion: 3(as of 2025‑10‑09).
Migration Guide
From Polkadot/Westend to Moonbase Alpha:
- Update endpoints to
api-moonbase-alpha.n.dwellir.com. - Switch SS58 to
1287; unit symbol becomesDEVwith 18 decimals. - Re‑check fee modeling via
payment_queryInfo. - Confirm method availability with
rpc_methods(GRANDPA/BEEFY are not exposed here).
Resources & Tools
eth_coinbase
Check the legacy eth_coinbase compatibility method on Monad. Public endpoints may return an address, `unimplemented`, or another unsupported-method response depending on the client.
chain_getBlock
Retrieve block data by hash on Moonbase Alpha. Essential for accessing block headers and extrinsics on the Moonbeam testnet for risk-free EVM dApp development and deployment testing.

