Skip to main content
POST
/
4ab982aa70a7baead515ffdb5915df3f
eth_sendRawTransaction
curl --request POST \
  --url https://fantom-mainnet.core.chainstack.com/4ab982aa70a7baead515ffdb5915df3f \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
  ]
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {}
}
Fantom API method that allows submitting a signed transaction to the network. Once a transaction is signed, you can use the eth_sendRawTransaction method to submit the signed transaction to the Fantom network for processing.
Note that the interactive example in this page will not work, due to the fact that eth_sendRawTransaction is used to modify the state of the blockchain, it is not possible to duplicate the same request.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • data—the signed transaction. The serialized transaction data includes transaction metadata such as the nonce, gas price, gas limit, recipient address, and data payload, as well as the digital signature generated using the private key associated with the address that is sending the transaction. Typically, the transaction is signed with a library such as web3.py, web3.js, or ethers.js using the sender’s private key.

Response

  • result — the unique hash identifying the transaction or the zero hash if the transaction is unavailable. The zero hash is a special value representing an invalid or null hash.

eth_sendRawTransaction code examples

The following examples demonstrate using Web3 libraries to transfer FTM.
const ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);

async function sendEth(value) {

  // Define the sender and receiver addresses, and the private key
	const sender = '0x19e7e376e7c213b7e7e7e46cc70a5dd086daff2a';
  const receiver = '0xe9ba4b4d84d7a3c80245514213b88d50ed937114';
  const privateKey = '1111111111111111111111111111111111111111111111111111111111111111';
  
  // Define the gas limit
  const gasLimit = await provider.estimateGas({
    from: sender,
    to: receiver,
    value: ethers.parseEther(value),
  });

  // Get the transaction count for the sender address
  const nonce = await provider.getTransactionCount(sender);

  // Define the transaction object
  const transactionObject = {
    to: receiver,
    gasPrice: ethers.parseUnits('50', 'gwei'),
    gasLimit: gasLimit.toString(),
    nonce: nonce,
    value: ethers.parseEther(value),
  };

  // Sign the transaction using the private key  
  const wallet = new ethers.Wallet(privateKey, provider);
  console.log(`Sending transaction...`)
  
  const transaction = await wallet.sendTransaction(transactionObject);
  console.log('Transaction hash:', transaction.hash);
}

sendEth("2");
Note that you will need to edit the amountToSend, recipientAddress, and secretKey fields to be able to use this code.

Use case

One potential use case for eth_sendRawTransaction is to automatically swap FTM for a token when its price reaches a certain level. eth_sendRawTransaction will allow custom transaction parameters, such as gas price or gas limit, to be specified to optimize the speed and cost of the transaction. For instance, you could build a program monitoring the price of a specific token and execute a swapExactETHForTokens transaction when the token reaches a certain price level, it could use eth_sendRawTransaction to submit a raw transaction with a custom gas price and limit optimized for the current network conditions.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:eth_sendRawTransaction
params
string[]

The signed transaction.

Response

200 - application/json

The transaction hash.

jsonrpc
string
id
integer
result
object
Last modified on June 25, 2026