# Send Transactions in Ethereum

You can send a transaction in **Sender** using the [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) RPC method.

For example, the following JavaScript gets the user's accounts and sends a transaction when they select each button, and the following HTML displays the buttons.

{% tabs %}
{% tab title="Javascript" %}

```javascript
const ethereumButton = document.querySelector('.enableEthereumButton');
const sendEthButton = document.querySelector('.sendEthButton');

let accounts = [];

// Send Ethereum to an address
sendEthButton.addEventListener('click', () => {
  sender.ethereum
    .request({
      method: 'eth_sendTransaction',
      params: [
        {
          from: accounts[0], // The user's active address.
          to: '0x2f318C334780961FB129D2a6c30D0763d9a5C970', // Required except during contract publications.
          value: '0x29a2241af62c0000', // Only required to send ether to the recipient from the initiating external account.
          gasPrice: '0x09184e72a000', // Customizable by the user during MetaMask confirmation.
          gas: '0x2710', // Customizable by the user during MetaMask confirmation.
        },
      ],
    })
    .then((txHash) => console.log(txHash))
    .catch((error) => console.error(error));
});

ethereumButton.addEventListener('click', () => {
  getAccount();
});

async function getAccount() {
  accounts = await sender.ethereum.request({ method: 'eth_requestAccounts' });
}
```

{% endtab %}

{% tab title="HTML" %}

```html
<button class="enableEthereumButton btn">Enable Ethereum</button>
<button class="sendEthButton btn">Send ETH</button>
```

{% endtab %}
{% endtabs %}


---

# 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://docs.senderwallet.io/guide/send-transactions/send-transactions-in-ethereum.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.
