Send signed raw transaction
https://api.triport.io/v1/polygon/sender/rawBroadcast an already-signed, RLP-encoded Polygon transaction to the network through Triport's multi-route dispatch chain.
POST /v1/polygon/sender/raw submits a signed raw transaction to Polygon PoS.
It wraps the underlying eth_sendRawTransaction call: you sign and serialize the
transaction client-side, then hand Triport the 0x-prefixed RLP-encoded bytes
and Triport relays it to the network.
To maximise inclusion reliability, Triport dispatches the transaction across a
three-route chain — three independent upstream submission routes are tried
in order until one accepts the transaction. By default (preferred_path: auto)
the platform chooses and falls through the chain for you; you can pin a specific
route with the preferred_path field if you need deterministic routing. The
response tells you which route ultimately accepted the transaction via
path_used.
This endpoint only broadcasts a transaction — it does not wait for the
transaction to be mined. A 200 response means the transaction was accepted
into the mempool and returns its tx_hash; poll for the receipt separately to
confirm inclusion. Signing, nonce management, and gas pricing are entirely the
caller's responsibility.
Parameters
Send a JSON request body. There are no path or query parameters.
raw_txstringrequired0x-prefixed RLP-encoded hex. Must match ^0x[0-9a-fA-F]+$.preferred_pathstring (enum)optionalauto, alchemy_own, drpc_anon, qn_no_auth. Defaults to auto, which lets Triport pick and fall through the chain automatically.Response
Response fields
| Field | Type | Description |
|---|---|---|
tx_hash | string | The 0x-prefixed hash of the broadcast transaction. Use it to poll for the receipt. Always present on 200. |
path_used | string | The dispatch route that accepted the transaction — one of auto, alchemy_own, drpc_anon, qn_no_auth. Useful for diagnostics and routing telemetry. |
Errors
Errors use the standard Triport REST envelope (error, message,
request_id). See errors.md for the full envelope, extra
per-code fields, and response headers.
| Code | Meaning | When it happens |
|---|---|---|
400 | invalid_params | raw_tx is missing, not 0x-prefixed hex, or otherwise un-decodable; or preferred_path is not one of the allowed enum values. |
401 | unauthorized / trial_expired / subscription_expired | No or invalid credentials, or the key's trial/subscription has lapsed. |
403 | tier_insufficient / method_unknown | The key's tier is below basic (sets the X-Required-Tier header), or the method is not part of the Polygon product. |
429 | rate_limited | Sustained RPS for your tier on the polygon_sender category was exceeded. Honor Retry-After / X-RateLimit-* and back off. |
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/v1/polygon/sender/raw", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
raw_tx: signedRawTx, // "0x02f8730181..."
}),
});
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(`broadcast ${tx_hash} via ${path_used}`);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const { txHash, pathUsed } = await client.polygon.sender.sendRaw({
rawTx: signedRawTx, // "0x02f8730181..."
preferredPath: "auto", // optional
});
console.log(`broadcast ${txHash} via ${pathUsed}`);Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
result = client.polygon.sender.send_raw(
raw_tx=signed_raw_tx, # "0x02f8730181..."
preferred_path="auto", # optional
)
print(f"broadcast {result.tx_hash} via {result.path_used}")Notes
- Broadcast only, not confirmation. A
200means the transaction entered the mempool. Poll the transaction receipt (or the wallet history endpoint) to confirm inclusion and final status. - Sign client-side. Triport never sees your private key — it only relays
the already-signed
raw_txbytes. Nonce, gas, and fee fields must be set before signing. preferred_pathis a hint. Leave it asautounless you have a specific reason to pin a route;autogives the best inclusion odds by falling through the full dispatch chain. Readpath_usedto see which route actually accepted the transaction.- Idempotency. Re-submitting the same signed
raw_txis safe — the network deduplicates by transaction hash. Resubmitting can be a useful retry strategy if a route was briefly unavailable. - Rate limits are sustained-RPS-per-tier with a burst allowance (no daily
cap). On
429, respectRetry-Afterand retry with exponential backoff.