{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_sendTransaction",
  "params": [{
    "from": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    "to": "0xd46e8dd67c5d32be8d24c6b0afe7c5c3f4e9c3b2",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "data": "0xd46e8dd67c5d32be8d24c6b0afe7c5c3f4e9c3b2"
  }]
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
}
Defined in the Ethereum JSON-RPC Specification
Creates new message call transaction or a contract creation, if the data field contains code. This method submits the transaction to the network and returns the transaction hash once it’s been accepted by the network.

Parameters

transaction
object
required
The transaction object to send.

Returns

result
string
The transaction hash (32 bytes) as a hexadecimal string.
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_sendTransaction",
  "params": [{
    "from": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    "to": "0xd46e8dd67c5d32be8d24c6b0afe7c5c3f4e9c3b2",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "data": "0xd46e8dd67c5d32be8d24c6b0afe7c5c3f4e9c3b2"
  }]
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
}

Error Handling

CodeMessageDescription
4001User rejected the requestUser denied the transaction request
4100Requested method not supportedThe method is not supported by the wallet
4200Wallet not connectedNo wallet connection available
-32602Invalid paramsInvalid transaction parameters
-32000Insufficient fundsAccount doesn’t have enough balance
Make sure to validate transaction parameters before sending, especially the to address and value to prevent loss of funds.