Send a signed raw transaction
https://api.triport.io/v1/eth/sender/rawBroadcasts an already-signed, RLP-encoded Ethereum transaction to the network over Triport's multi-path sender, and returns the resulting transaction hash.
POST /v1/eth/sender/raw is the REST wrapper around eth_sendRawTransaction.
You sign and RLP-encode the transaction yourself (with your own key, offline or
in your wallet/library), then hand Triport the resulting 0x-prefixed byte
string; Triport relays it to the Ethereum mempool and returns the transaction
hash you can use to track inclusion.
The endpoint is multi-path: rather than depending on a single broadcast
route, Triport can submit the transaction over its own execution-layer mesh or
fall back to managed upstream routes for resilience. By default (auto) the
platform chooses and fails over between these routes for you; the response tells
you which route actually accepted the transaction via path_used.
Submitting a raw transaction does not wait for the transaction to be mined —
a 200 means the transaction was accepted into the mempool, not that it was
included in a block. Poll eth_getTransactionReceipt (or subscribe to
newHeads) to confirm inclusion. To submit a Flashbots-style atomic bundle of
multiple transactions instead, use POST /v1/eth/sender/bundle.
Parameters
Request body (application/json):
raw_txstringrequired0x-prefixed, RLP-encoded signed transaction. Must match ^0x[0-9a-fA-F]+$.preferred_pathstring (enum)optionalauto. See below.preferred_path valuesobjectResponse
Response fields
| Field | Type | Description |
|---|---|---|
tx_hash | string | The 0x-prefixed 32-byte hash of the submitted transaction. Use it to look up the receipt or track inclusion. Always present on 200. |
path_used | string | Identifier of the broadcast route that actually accepted the transaction (e.g. own). Useful for diagnostics; may differ from preferred_path when auto or a fail-over was used. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
400 | invalid_params | raw_tx is missing, not 0x-prefixed hex, malformed/undecodable RLP, an invalid signature, or preferred_path is not a recognised value. |
401 | unauthorized / trial_expired / subscription_expired | Missing or invalid credentials, or the key's trial/subscription has ended. |
403 | tier_insufficient / method_unknown | The API key's tier is below basic, or this method is not part of the key's product. |
429 | rate_limited | Sustained per-tier RPS exceeded. Honour the Retry-After / X-RateLimit-* headers before retrying. |
Every error uses the shared Triport error envelope (error, message,
request_id) — see Errors for the full structure and
Rate limits & tiers for the throttling headers.
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/v1/eth/sender/raw", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
raw_tx: signedRawTx, // "0x02f8..." produced by your signer
preferred_path: "auto",
}),
});
if (!res.ok) {
const err = await res.json();
throw new Error(`${err.error}: ${err.message}`);
}
const { tx_hash, path_used } = await res.json();
console.log(`submitted ${tx_hash} via ${path_used}`);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const { tx_hash, path_used } = await triport.ethereum.sender.raw({
raw_tx: signedRawTx, // "0x02f8..." from your signer
preferred_path: "auto",
});
console.log(`submitted ${tx_hash} via ${path_used}`);Python (triport-sdk)
import os
from triport import Triport
triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])
res = triport.ethereum.sender.raw(
raw_tx=signed_raw_tx, # "0x02f8..." from your signer
preferred_path="auto",
)
print(f"submitted {res['tx_hash']} via {res['path_used']}")Notes
- You must sign before calling. Triport never holds your keys;
raw_txmust already be a fully signed, RLP-encoded transaction (legacy or EIP-1559 / typed envelopes are all accepted as raw bytes). 200≠ mined. Acceptance means the transaction entered the mempool. Track final inclusion via the receipt or anewHeadssubscription.- Idempotency / resubmission. Re-broadcasting the same signed transaction is safe; the network deduplicates by hash. To replace a stuck transaction, sign a new one with the same nonce and a higher fee.
- Prefer
auto. It handles route selection and fail-over for you; pin a specific route only when you have a measured reason to. - Related:
POST /v1/eth/sender/bundlefor atomic multi-transaction bundles.