> For the complete documentation index, see [llms.txt](https://docs.getblock.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getblock.io/api-reference/moonbeam-glmr.md).

# Moonbeam (GLMR)

GetBlock provides fast and reliable access to Moonbeam nodes via JSON-RPC API. Connect to the Moonbeam network without running your own infrastructure.

Moonbeam is an EVM-compatible smart contract parachain on Polkadot, built with Substrate and the Frontier EVM layer. It mirrors Ethereum's JSON-RPC API, so Solidity contracts, the `eth_*` surface, and tooling such as Foundry, Hardhat, Ethers.js, and Viem work unchanged, while the chain inherits shared security and deterministic finality from Polkadot's relay chain. Moonbeam uses unified Ethereum-style (H160) accounts — a single `0x` address per account, with no separate Substrate address to manage — and exposes Substrate functionality (staking, XCM, batching, native-asset ERC-20s) to Solidity through on-chain precompiles. The native gas token is GLMR, and Moonbeam supports EIP-1559 fee-market pricing.

### Key Features

* **EVM Compatibility**: Ethereum contracts, JSON-RPC, and tooling run unchanged on the Frontier EVM layer
* **Polkadot Parachain**: Shared relay-chain security and deterministic finality from Polkadot
* **Unified H160 Accounts**: One Ethereum-style address per account — no separate Substrate/EVM address split
* **Substrate Precompiles**: Staking, XCM, batch, and native-asset ERC-20 features are callable from Solidity via precompiles
* **EIP-1559 Fees**: Base-fee pricing with `eth_feeHistory` and priority fees; native token GLMR (18 decimals)
* **Ethereum Tooling**: Compatible with MetaMask, Foundry, Hardhat, Remix, Ethers.js, and Viem

{% hint style="info" %}
*TECHNICAL DISCLAIMER: AUTHORITATIVE JSON-RPC API SPECIFICATION.*

*GetBlock's RPC API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. Moonbeam implements the standard Ethereum JSON-RPC interface via Frontier; the canonical specification for these methods is the Ethereum JSON-RPC specification at* [*ethereum.org*](https://ethereum.org/en/developers/docs/apis/json-rpc/)*, and Moonbeam-specific behaviour is documented at* [*docs.moonbeam.network*](https://docs.moonbeam.network/)*.*
{% endhint %}

## Network Information

| Property        | Value                                |
| --------------- | ------------------------------------ |
| Network Name    | Moonbeam                             |
| Chain ID        | 1284                                 |
| Native Currency | GLMR                                 |
| EVM Compatible  | Yes (Frontier)                       |
| Platform        | Polkadot parachain (Substrate)       |
| Account Model   | Unified Ethereum-style (H160)        |
| Block Time      | \~6 seconds                          |
| Finality        | Deterministic (Polkadot relay chain) |
| Fee Model       | EIP-1559                             |

## Base URL

{% tabs %}
{% tab title="Frankfurt, Germany" %}

```
https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/
```

{% endtab %}

{% tab title="New York, USA" %}

```
https://shared.us-east-1.getblock.io/<ACCESS-TOKEN>/
```

{% endtab %}

{% tab title="Singapore, Singapore" %}

```
https://shared.ap-southeast-1.getblock.io/<ACCESS-TOKEN>/
```

{% endtab %}
{% endtabs %}

## Supported Networks

| Network        | Chain ID | JSON-RPC | WSS | GraphQL | MEV protected (WebSocket) | MEV protected (JSON-RPC) | Frankfurt, Germany | New York, USA | Singapore, Singapore |
| -------------- | -------- | -------- | --- | ------- | ------------------------- | ------------------------ | ------------------ | ------------- | -------------------- |
| Mainnet        | 1284     | ✅        | ✅   | ❌       | ❌                         | ❌                        | ✅                  | ❌             | ❌                    |
| Moonbase Alpha | 1287     | ✅        | ✅   | ❌       | ❌                         | ❌                        | ✅                  | ❌             | ❌                    |

## Quickstart

{% tabs %}
{% tab title="Javascript(Axios)" %}
{% stepper %}
{% step %}

### Setup project

```bash
mkdir moonbeam-api-quickstart && cd moonbeam-api-quickstart && npm init --yes
```

{% endstep %}

{% step %}

### Install dependency

```bash
npm install axios
```

{% endstep %}

{% step %}

### Add code

{% code title="index.js" %}

```javascript
const axios = require('axios');

const url = 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/';

const payload = {
  jsonrpc: '2.0',
  method: 'eth_blockNumber',
  params: [],
  id: 'getblock.io'
};

axios.post(url, payload, {
  headers: { 'Content-Type': 'application/json' }
})
.then(response => {
  console.log('Latest block:', parseInt(response.data.result, 16));
})
.catch(error => console.error(error));
```

{% endcode %}
{% endstep %}

{% step %}

### Run the script

```bash
node index.js
```

{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="Python(Request)" %}
{% stepper %}
{% step %}

### Setup project

```bash
mkdir moonbeam-api-quickstart && cd moonbeam-api-quickstart
python -m venv venv && source venv/bin/activate
```

{% endstep %}

{% step %}

### Install dependency

```bash
pip install requests
```

{% endstep %}

{% step %}

### Add code

{% code title="main.py" %}

```python
import requests
import json

url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"

payload = json.dumps({
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": "getblock.io"
})

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, data=payload)
print(response.text)
```

{% endcode %}
{% endstep %}

{% step %}

### Run the script

```bash
python main.py
```

{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}

## Available API Methods

### Chain & Client Info

| Method              | Description                                       |
| ------------------- | ------------------------------------------------- |
| web3\_clientVersion | Client software version identifier                |
| web3\_sha3          | Keccak-256 hash of hex-encoded data               |
| net\_version        | Network ID as a decimal string                    |
| net\_listening      | Whether the node is listening for P2P connections |
| net\_peerCount      | Number of connected peers                         |
| eth\_chainId        | Chain ID per EIP-155                              |
| eth\_blockNumber    | Current chain tip block number                    |
| eth\_syncing        | Sync status, or false if fully synced             |

### Gas & Fees

| Method                    | Description                                       |
| ------------------------- | ------------------------------------------------- |
| eth\_gasPrice             | Legacy gas price estimate in wei                  |
| eth\_maxPriorityFeePerGas | Suggested EIP-1559 priority fee in wei            |
| eth\_feeHistory           | Historical base fees and priority-fee percentiles |

### Account & State

| Method                   | Description                                 |
| ------------------------ | ------------------------------------------- |
| eth\_getBalance          | GLMR balance of an address at a given block |
| eth\_accounts            | Accounts owned by the client                |
| eth\_getStorageAt        | Value at a specific contract storage slot   |
| eth\_getTransactionCount | Address nonce (transaction count)           |
| eth\_getCode             | Deployed bytecode at an address             |

### Blocks

| Method                                | Description                             |
| ------------------------------------- | --------------------------------------- |
| eth\_getBlockByHash                   | Block data by block hash                |
| eth\_getBlockByNumber                 | Block data by block number or tag       |
| eth\_getBlockTransactionCountByHash   | Transaction count in a block, by hash   |
| eth\_getBlockTransactionCountByNumber | Transaction count in a block, by number |

### Transactions

| Method                                   | Description                                    |
| ---------------------------------------- | ---------------------------------------------- |
| eth\_getTransactionByHash                | Transaction data by transaction hash           |
| eth\_getTransactionByBlockHashAndIndex   | Transaction by block hash and index            |
| eth\_getTransactionByBlockNumberAndIndex | Transaction by block number and index          |
| eth\_getTransactionReceipt               | Transaction receipt with status, gas, and logs |

### Execution & Simulation

| Method           | Description                                    |
| ---------------- | ---------------------------------------------- |
| eth\_call        | Execute a message call without a transaction   |
| eth\_estimateGas | Estimate gas required to execute a transaction |

### Filters & Logs

| Method                           | Description                                         |
| -------------------------------- | --------------------------------------------------- |
| eth\_newFilter                   | Create a log filter with address and topic criteria |
| eth\_newBlockFilter              | Create a filter for new block hashes                |
| eth\_newPendingTransactionFilter | Create a filter for pending transaction hashes      |
| eth\_uninstallFilter             | Remove a previously created filter                  |
| eth\_getFilterChanges            | Poll new entries for a filter since the last poll   |
| eth\_getFilterLogs               | Get all logs matching a log filter                  |
| eth\_getLogs                     | Query logs matching criteria in one call            |

### Transaction Submission

| Method                  | Description                                |
| ----------------------- | ------------------------------------------ |
| eth\_sendRawTransaction | Submit a signed transaction to the network |

### WebSocket Subscriptions

| Method           | Description                                                     |
| ---------------- | --------------------------------------------------------------- |
| eth\_subscribe   | Subscribe to newHeads, logs, newPendingTransactions, or syncing |
| eth\_unsubscribe | Cancel an active subscription                                   |

### Debug & Trace

| Method                    | Description                                 |
| ------------------------- | ------------------------------------------- |
| debug\_traceBlockByHash   | Trace all transactions in a block by hash   |
| debug\_traceBlockByNumber | Trace all transactions in a block by number |
| debug\_traceCall          | Trace a simulated message call              |
| debug\_traceTransaction   | Trace execution of a mined transaction      |

## Support

For technical support and questions:

* Support: <support@getblock.io>

## See Also

* [Moonbeam Documentation](https://docs.moonbeam.network/)
* [Ethereum JSON-RPC Specification](https://ethereum.org/en/developers/docs/apis/json-rpc/)
* [Moonbeam Moonscan Explorer](https://moonbeam.moonscan.io/)
* [Moonbeam Website](https://moonbeam.network/)
* [Polkadot](https://polkadot.network/)
