⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

eth_sendTransaction

Sends a transaction using an unlocked account on the node. Important: Most RPC providers don't support this method for security reasons, as it requires private keys to be stored on the server.

Security Considerations

  • This method requires an unlocked account on the node
  • Private keys must be available to the RPC server
  • Most production RPC providers disable this method
  • Use eth_sendRawTransaction with client-side signing instead

Parameters

  1. Object - The transaction object:
    • from: DATA, 20 Bytes - The address the transaction is sent from
    • to: DATA, 20 Bytes - (optional) The address the transaction is directed to
    • gas: QUANTITY - (optional) Integer of the gas provided for the transaction execution
    • gasPrice: QUANTITY - (optional) Integer of the gasPrice used for each paid gas
    • value: QUANTITY - (optional) Integer of the value sent with this transaction
    • data: DATA - (optional) The compiled code of a contract OR the hash of the invoked method signature and encoded parameters

Returns

DATA - The transaction hash of the submitted transaction.

Implementation Example

Examples

curl -X POST https://api-chiliz-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [{
"from": "0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a"
}],
"id": 1
}'

Response Example

{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}

Note: This method is typically not available on hosted RPC providers for security reasons. Use eth_sendRawTransaction with client-side signing libraries instead.

Alternative Approach

For secure transaction sending, use client-side signing with libraries like ethers.js or web3.js, then submit the signed transaction using eth_sendRawTransaction.


Need help? Contact our support team or check the Chiliz documentation.