Logo
RPC Assistant

What is the Moonbeam RPC endpoint and how do you connect to it?

Summary

A Moonbeam RPC endpoint is a URL that lets Ethereum-compatible wallets and dApps send JSON-RPC requests to the Moonbeam parachain on Polkadot. It uses standard Ethereum methods plus Moonbeam-specific extensions, with chain ID 1284 and GLMR as the native token.

Developers use these endpoints for reads, transactions, event subscriptions, and indexing. This page covers the network settings you need, how to test an endpoint with curl, and what to evaluate when choosing a provider for production workloads.

Moonbeam is an Ethereum-compatible smart contract parachain in the Polkadot ecosystem. A Moonbeam RPC endpoint is the URL your wallet, dApp, indexer, or automation service uses to send JSON-RPC requests to the Moonbeam network. With the right endpoint, you can read on-chain data, estimate and send transactions, and subscribe to events over WebSocket.

This page covers the Moonbeam network settings you need, shows how to test a Moonbeam RPC endpoint with curl, and walks through the decisions that matter when you move from a public endpoint to production infrastructure.

Moonbeam RPC decision checklist

  • Confirm whether you need HTTPS, WSS, or both. Use HTTPS for standard requests and WSS for real-time event subscriptions.
  • Verify the chain ID. Moonbeam mainnet uses 1284 (0x504); Moonbase Alpha testnet uses 1287.
  • Test with a simple read method such as eth_chainId or eth_blockNumber before wiring up transaction signing.
  • Decide whether you need archive state or trace methods. Indexing and analytics tools often require these, but not every provider exposes them.
  • Check rate limits and request pricing for your expected traffic.
  • Compare shared endpoint and dedicated node options when you need isolation or consistent throughput.

What is a Moonbeam RPC endpoint?

An RPC endpoint is a URL that exposes the Moonbeam network's JSON-RPC API. Because Moonbeam is EVM-compatible, the endpoint accepts the same Ethereum methods that software already uses for other EVM chains, such as eth_call, eth_getBalance, eth_sendRawTransaction, and eth_subscribe.

Developers send requests over HTTPS for standard calls or over WSS for subscriptions. The response format is JSON-RPC 2.0, so existing web3 libraries and frameworks can connect with minimal configuration. Moonbeam also adds native Polkadot features such as finality and cross-chain messaging, and the RPC API includes Moonbeam-specific methods to query those behaviors.

At a practical level, a Moonbeam RPC endpoint behaves like the Ethereum RPC endpoint you might already use: your application sends a JSON object with a method name and parameters, and the endpoint returns a result or an error. The main difference is that the endpoint is specific to the Moonbeam parachain, so it cannot be used to read state on other Polkadot parachains or on Ethereum itself.

Moonbeam network specifications

PropertyValue
Chain ID1284
Hex chain ID0x504
Native tokenGLMR
Block explorerMoonscan
Public HTTPS endpointhttps://rpc.api.moonbeam.network
Public WSS endpointwss://wss.api.moonbeam.network
API styleEthereum JSON-RPC + Moonbeam methods

Public endpoint URLs can be updated by the network team. Verify the current values in the official Moonbeam documentation before you rely on them in an application.

Where to find a Moonbeam RPC endpoint

The easiest way to find an endpoint is to use a network list, an RPC provider, or the official Moonbeam docs. Public endpoints are fine for prototyping, but they often have rate limits, less predictable latency, and limited support for archive or trace methods.

For production workloads, most teams use a managed infrastructure provider or run dedicated nodes. OnFinality offers RPC API access to Moonbeam and dedicated Moonbeam node infrastructure. You can find endpoint details and current network support on the Moonbeam network page. If you need a broader view, the RPC API service page explains how the managed endpoint works.

When you evaluate an endpoint, run a few queries against it before writing code. Check that Ethereum methods work, verify the chain ID, and test WSS availability if you plan to use subscriptions. An endpoint that looks healthy in a browser can still fail under load.

How to connect to the Moonbeam RPC endpoint

Use curl for a quick health check. The example below sends an eth_chainId request to the Moonbeam public HTTPS endpoint.

curl -X POST https://rpc.api.moonbeam.network \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'

A successful response returns the chain ID in hex:

{"jsonrpc":"2.0","result":"0x504","id":1}

0x504 is 1284 in decimal. If you get an error, check the URL, your connection, and whether the endpoint is temporarily rate limited.

Here is the same call using ethers.js:

import { ethers } from 'ethers';

const provider = new ethers.JsonRpcProvider('https://rpc.api.moonbeam.network');
const network = await provider.getNetwork();
console.log(network.chainId.toString()); // 1284

For real-time data, connect to a WSS endpoint with a client that supports subscriptions. The same JSON-RPC interface applies to HTTPS and WSS, so the main difference is how you maintain the connection.

How to add Moonbeam to a wallet

To add Moonbeam to a wallet like MetaMask, use the mainnet settings:

  • Network name: Moonbeam
  • RPC URL: an HTTPS endpoint for Moonbeam mainnet
  • Chain ID: 1284
  • Symbol: GLMR
  • Explorer: https://moonscan.io

Some wallets support WSS endpoints; some do not. For a production dApp, keep the HTTPS endpoint as the primary RPC URL and use a separate WSS client for live subscriptions.

If you are testing, Moonbase Alpha uses chain ID 1287 and a different token. The testnet faucet is available through the official Moonbeam docs. Keep mainnet and testnet settings separate to avoid sending test transactions to the wrong chain.

Choosing a Moonbeam RPC provider for production

The right provider depends on your workload. A simple dApp that only reads balances needs different infrastructure than an indexer that replays historical events. Compare the following before you commit.

CriterionWhat to checkWhy it matters
HTTPS and WSS supportBoth endpoint types included in your planStreaming apps need WSS for subscriptions; most APIs use HTTPS
Throughput and rate limitsRequests per second and daily caps for your tierSpikes in user activity should not return 429 errors
Archive and trace dataAvailability of archive RPC and debug_traceTransactionIndexers, analytics, and block explorers need historical state
Geographic coverageRegional endpoints and global load balancingReduces latency for users in different regions
Dedicated node optionAbility to isolate resources for your projectAvoids noisy-neighbor effects and supports custom tuning
Pricing modelPer-request, per-RU, flat, or overage chargesKeeps costs predictable as traffic scales
Failover behaviourRedundant URLs, retry logic, and status pagesPrevents a single endpoint outage from taking your dApp down

For many teams, managed RPC is the fastest way to ship. OnFinality provides shared and dedicated Moonbeam infrastructure, so you can start with an API key and move to a dedicated node when your workload demands it. Review RPC pricing and the list of supported RPC networks for current options. If you need a private environment, the dedicated node page covers the operational tradeoffs.

Troubleshooting common Moonbeam RPC issues

  • 429 Too Many Requests: reduce your request rate, increase batching, or move to a plan with higher throughput.
  • 403 Forbidden: check that your API key is valid and that the endpoint permits the method you called.
  • Timeout: use a regional endpoint or split large requests into smaller batches.
  • Wrong chain ID: call eth_chainId and confirm it returns 0x504.
  • WebSocket disconnects: add automatic reconnect logic and monitor address changes if you are running infrastructure.
  • Method not supported: confirm that archive or trace methods are included in your plan before building a feature around them.
  • Finality checks: use Moonbeam finality methods such as moon_isBlockFinalized and moon_isTxFinalized when you need to confirm that a transaction is finalized, not just included.

Most RPC errors are not chain-specific. If you see a -32000 server error, the endpoint may not support the method you are calling. If you see an empty response, check whether the endpoint requires an API key or a custom header.

Key Takeaways

  • Moonbeam RPC follows Ethereum JSON-RPC, so most EVM tooling works with minimal changes.
  • Mainnet chain ID is 1284 and the native token is GLMR.
  • Public endpoints are useful for tests, but production apps should use a provider with rate-limit headroom and support.
  • WSS endpoints matter for real-time subscriptions and event listeners.
  • Compare throughput, archive data, pricing, and failover behaviour before choosing a provider.

Frequently Asked Questions

What is the Moonbeam RPC endpoint?

A Moonbeam RPC endpoint is a URL that accepts Ethereum-compatible JSON-RPC requests. The mainnet HTTPS endpoint is commonly https://rpc.api.moonbeam.network, but you should verify the current URL in the official Moonbeam docs.

What is the Moonbeam chain ID?

Moonbeam mainnet uses chain ID 1284, which is 0x504 in hex. Moonbase Alpha testnet uses chain ID 1287.

Does Moonbeam RPC support Ethereum methods?

Yes. Standard methods such as eth_call, eth_sendRawTransaction, eth_getLogs, and eth_subscribe work on Moonbeam because it is EVM-compatible.

How can I find a reliable Moonbeam RPC for production?

Use a managed provider that supports HTTPS and WSS, offers archive or trace methods when needed, and has transparent rate limits. OnFinality lists Moonbeam on its network page with current RPC options.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started