# Get the native balance of a Signer

## Checking the native balance of an EVM address using ethers.js

```javascript
const { ethers } = require('ethers');

async function getNativeBalance() {
  // Replace 'your_private_key' with the private key of your Ethereum account
  const privateKey = 'your_private_key';
  
  // Create a wallet using the private key
  const wallet = new ethers.Wallet(privateKey);

  const provider = new ethers.providers.JsonRpcProvider(`https://moonbeam.unitedbloc.com`);
  await wallet.connect(provider);

  // Get the native balance (in Wei) of the signer's Ethereum account
  const balanceWei = await wallet.getBalance();

  // Convert the balance from Wei to Ether
  const balanceEther = ethers.utils.formatEther(balanceWei);

  console.log('Native Balance:', balanceEther, 'ETH');
}

getNativeBalance();

```

The balance here will be fetched using the `provider` defined. In this example, the script will fetch the GLMR balance on the Moonbeam network.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jungle-toolkit.gitbook.io/evm-xcm-jungle-toolkit/build-an-evm+substrate-wallet-compatible-architecture-in-your-dapp/the-evm-address-standard/get-the-native-balance-of-a-signer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
