Skip to content

eth_sendRawTransaction

Submits a pre-signed transaction for broadcast to the network. You must sign the transaction offline first.

  1. DATA — The signed transaction data (hex-encoded).

DATA (32 bytes) — The transaction hash, or the zero hash if the transaction is not yet available.

Terminal window
curl -X POST https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0xf86c808504a817c80082520894..."],
"id": 1
}'

⚠️ This method requires a private endpoint (API key). It is not available on public endpoints.

{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
import { JsonRpcProvider, Wallet } from "ethers";
const provider = new JsonRpcProvider("https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY");
const wallet = new Wallet("0xYOUR_PRIVATE_KEY", provider);
const tx = await wallet.sendTransaction({
to: "0xRecipientAddress",
value: "1000000000000000000", // 1 ETH in wei
});
console.log("Tx hash:", tx.hash);
await tx.wait();
console.log("Confirmed!");
from web3 import Web3
w3 = Web3(Web3.HTTPProvider("https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY"))
signed = w3.eth.account.sign_transaction({
"to": "0xRecipientAddress",
"value": w3.to_wei(1, "ether"),
"gas": 21000,
"gasPrice": w3.eth.gas_price,
"nonce": w3.eth.get_transaction_count("0xYourAddress"),
"chainId": 1
}, "0xYOUR_PRIVATE_KEY")
tx_hash = w3.eth.send_raw_transaction(signed.raw_transaction)
print(f"Tx hash: {tx_hash.hex()}")
MethodCost
eth_sendRawTransaction20 RU