eth_sendRawTransaction
https://api.triport.io/ethBroadcasts a signed, RLP-encoded transaction to the Ethereum network and returns its transaction hash.
eth_sendRawTransaction submits an already-signed transaction to the network
for inclusion in a block. You sign the transaction locally with your private key,
RLP-encode it, hex-encode the result, and pass that single hex string as the only
parameter. Triport never sees or holds your key — only the signed payload.
On success the method returns the transaction hash immediately. This hash is
returned as soon as the transaction is accepted into the mempool; it does not
mean the transaction has been mined. Poll
eth_getTransactionReceipt with the returned
hash to confirm inclusion and read the final status.
This is the only state-changing method in the eth read namespace, and it sits
in its own eth_send_tx rate-limit category with markedly lower limits than
read methods (3 RPS on free vs. 10+ RPS for reads). Budget your send rate
accordingly and back off on -32003. The method is available from the free tier
upward — no paid tier is required to broadcast transactions.
Parameters
A single positional parameter:
signedTransactionDatastring (0x-prefixed hex)requiredethers, web3.py, viem). Supports legacy and typed (EIP-1559 / EIP-2930) transactions.Response
Response fields
| Field | Type | Description |
|---|---|---|
result | string (0x-prefixed hex) | The 32-byte transaction hash. Use it with eth_getTransactionReceipt to track confirmation. |
Errors
Errors arrive in the standard JSON-RPC error object, with extra fields under
error.data. See Errors for the full envelope and wire-code
mapping.
| Code | Meaning | When it happens |
|---|---|---|
-32001 | trial_expired | The free 7-day trial has ended (HTTP 401). Upgrade to a paid tier to keep broadcasting. |
-32003 | rate_limited | Sustained sends exceeded your tier's eth_send_tx RPS (HTTP 429). Honour Retry-After / error.data.retry_after_sec. Limits are low here: 3 RPS free, 5 basic, 30 pro, 80 business. |
-32000 | execution error (passthrough) | The network rejected the transaction — e.g. nonce too low, insufficient funds, gas price too low, or already known. The message carries the node's reason. Fix the transaction and re-sign. |
rate_limited (-32003)
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32003,
"message": "Rate limit exceeded: 3 RPS sustained on eth_send_tx (free tier)",
"data": {
"current_tier": "free",
"category": "eth_send_tx",
"limit_rps": 3,
"burst_capacity": 6,
"retry_after_sec": 1
}
}
}burst_capacity is always 2 × limit_rps. The response also carries
Retry-After and X-RateLimit-* headers — see Errors.
Examples
JavaScript (fetch)
const signedTx = "0xf86b808504a817c8..."; // produced by your signer
const res = await fetch("https://api.triport.io/eth", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_sendRawTransaction",
params: [signedTx],
}),
});
const body = await res.json();
if (body.error) {
if (body.error.code === -32003) {
const wait = Number(res.headers.get("Retry-After") ?? body.error.data.retry_after_sec);
await new Promise((r) => setTimeout(r, wait * 1000)); // then retry
} else {
throw new Error(body.error.message); // e.g. nonce too low
}
} else {
console.log("tx hash:", body.result);
}TypeScript SDK (@triport/sdk)
import { Triport, RateLimitedError } from "@triport/sdk";
const client = new Triport({ token: process.env.TRIPORT_API_KEY! });
const signedTx = "0xf86b808504a817c8..."; // produced by your signer
try {
const txHash = await client.eth.sendRawTransaction(signedTx);
console.log("tx hash:", txHash);
} catch (err) {
if (err instanceof RateLimitedError) {
await new Promise((r) => setTimeout(r, err.retryAfterSec * 1000)); // then retry
} else {
throw err;
}
}Python (triport-sdk)
import os, time
from triport import Triport
from triport.errors import RateLimitedError
client = Triport(token=os.environ["TRIPORT_API_KEY"])
signed_tx = "0xf86b808504a817c8..." # produced by your signer
try:
tx_hash = client.eth.send_raw_transaction(signed_tx)
print("tx hash:", tx_hash)
except RateLimitedError as e:
time.sleep(e.retry_after_sec) # then retryNotes
- The hash is not confirmation. A returned hash means accepted into the
mempool, not mined. Poll
eth_getTransactionReceiptuntil a receipt appears, then check itsstatusfield. - Idempotent re-broadcast. Re-submitting the same signed transaction usually
yields the same hash; the network may return an
already knownexecution error (-32000), which is harmless. - Sign locally. Build and sign with a client library
(
ethers,viem,web3.py); only the resulting hex string is sent here. - Low send budget. The
eth_send_txcategory caps sends well below read methods. For high-throughput or MEV use cases, seeeth_sendBundle(pro tier). - See also: Errors · Rate limits · Authentication.