TriportRPC

Send signed raw transaction

POSThttps://api.triport.io/v1/polygon/sender/raw

Broadcast an already-signed, RLP-encoded Polygon transaction to the network through Triport's multi-route dispatch chain.

Polygonpolygon_senderbasic and above (free not permitted) — sustained RPS per the polygon_sender category, see [Rate limits](../../rate-limits-and-tiers.md)

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_txstringrequired
The signed transaction as 0x-prefixed RLP-encoded hex. Must match ^0x[0-9a-fA-F]+$.
preferred_pathstring (enum)optional
Routing hint for the dispatch chain. One of auto, alchemy_own, drpc_anon, qn_no_auth. Defaults to auto, which lets Triport pick and fall through the chain automatically.

Response

Response fields

FieldTypeDescription
tx_hashstringThe 0x-prefixed hash of the broadcast transaction. Use it to poll for the receipt. Always present on 200.
path_usedstringThe 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.

CodeMeaningWhen it happens
400invalid_paramsraw_tx is missing, not 0x-prefixed hex, or otherwise un-decodable; or preferred_path is not one of the allowed enum values.
401unauthorized / trial_expired / subscription_expiredNo or invalid credentials, or the key's trial/subscription has lapsed.
403tier_insufficient / method_unknownThe key's tier is below basic (sets the X-Required-Tier header), or the method is not part of the Polygon product.
429rate_limitedSustained 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 200 means 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_tx bytes. Nonce, gas, and fee fields must be set before signing.
  • preferred_path is a hint. Leave it as auto unless you have a specific reason to pin a route; auto gives the best inclusion odds by falling through the full dispatch chain. Read path_used to see which route actually accepted the transaction.
  • Idempotency. Re-submitting the same signed raw_tx is 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, respect Retry-After and retry with exponential backoff.