Ethereum

Ethereum

eth_sendRawTransaction

eth_sendRawTransaction is how a signed transaction enters Ethereum. You sign and RLP-encode the transaction client-side with a library like ethers, viem, or web3.js, then pass the resulting hex blob to this method; the node validates it, drops it into its mempool, and gossips it to peers so a validator can include it in an upcoming 12-second slot. The call returns the 32-byte transaction hash right away, which is your handle for tracking the transaction, not proof that it has been mined. Broadcast against https://ethereum.therpc.io/YOUR_API_KEY on chain ID 1. Most transactions today are EIP-1559 type-2, carrying maxFeePerGas and maxPriorityFeePerGas so the protocol can burn the base fee in ETH and route the tip to the proposer. Your private key never leaves your machine; only the signed payload is sent.

Use cases

  • Move ETH between accounts by signing a simple value transfer offline, then broadcasting the serialized result here.
  • Deploy a contract by leaving to empty and putting the compiled bytecode in data; the receipt's contractAddress then tells you where it landed.
  • Call a state-changing contract method, such as an ERC-20 transfer or an approve for a DEX, by encoding the call into data and signing it.

Parameters

#NameTypeRequiredDescription
1signedTransactionstringYesThe serialized signed transaction. Build and sign it client-side with a library (e.g. ethers, viem, web3.js); never send a private key to the node.

Response

TypeDescription
string32-byte transaction hash (0x-prefixed). The transaction is now in the mempool but not yet confirmed.

Example request

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0x..."],
"id": 1
}'

Try it live in the Ethereum playground.

Errors & troubleshooting

CodeMessageCause
-32000nonce too lowThe nonce in the signed transaction is lower than the sender's current on-chain nonce.
-32000insufficient funds for gas * price + valueThe sender does not have enough native-token balance to cover gas cost and the transferred value.
-32000replacement transaction underpricedTried to replace a pending transaction (same nonce) but the new fee is not high enough (typically requires ≥10% bump).

Common pitfalls

  • The returned hash only means the node accepted the transaction into its mempool. Inclusion is a separate step: poll eth_getTransactionReceipt until it returns non-null to know the transaction was actually mined.
  • A clean broadcast is not a successful execution. The transaction can still revert on-chain, in which case the receipt comes back with status: "0x0" and the sender still paid for the gas burned up to the revert.
  • Read a fresh nonce with eth_getTransactionCount right before signing. A stale nonce triggers a nonce-too-low rejection, and to replace a stuck pending transaction you must reuse its nonce with a fee bump of roughly 10% or more, or you will hit replacement-transaction-underpriced.

Supported networks

  • Mainnet — Chain ID: 1
  • Sepolia — Chain ID: 11155111

See also

Parameters

0x-prefixed hex string of the RLP-encoded signed transaction

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_sendRawTransaction","params":[""]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.