TriportRPC

MEV-share hint SSE stream

GEThttps://api.triport.io/sse/eth-mev-share

A long-lived Server-Sent Events stream that pushes mev-share hints (partial, privacy-preserving transaction/bundle details) from the Ethereum MEV pool as they are observed.

EthereumScale plan only; **1 concurrent stream per user**

GET /sse/eth-mev-share opens a Server-Sent Events stream that relays mev-share hints from the Triport Ethereum MEV pool. A hint is a partial, privacy-preserving description of a pending transaction or bundle that an originator has chosen to share with searchers — it exposes just enough information (for example a transaction hash, emitted logs, or touched contracts) for a searcher to build a backrun, while withholding the full calldata. Use this stream to react to MEV opportunities in real time without polling.

This is a streaming endpoint, not a request/response call. Open the connection once and keep it open; the server emits one SSE data: event per hint as hints arrive. The connection is held open for at most the server-configured session TTL (EthMeshMEVTTLSec); when that window elapses the server closes the stream and the client should reconnect. Standard SSE auto-reconnect (built into EventSource and most SSE clients) handles this transparently.

Access is restricted to the Scale plan. Requests authenticated with a lower-tier key are rejected by the MEV gate (403) before the stream is established. Each user may hold one concurrent stream at a time — opening a second while the first is still live is rejected with 429. Close the existing stream before reconnecting.

Note: This endpoint is part of the Ethereum mesh transport layer and is not listed in the Ethereum OpenAPI document. The contract documented here is the live mesh route.

Parameters

This endpoint takes no path, query, or body parameters. Identity and tier are derived entirely from the API key supplied in the Authorization header.

Authorization (header)stringrequired
Bearer $TRIPORT_API_KEY. Determines the caller's tier; must be on the Scale plan.
Accept (header)stringoptional
Recommended text/event-stream. The endpoint always responds with an SSE stream.

Response

The response is a text/event-stream. Each hint is delivered as one SSE event whose data: line is a JSON object following the mev-share hint scheme:

Each event is an independent, self-contained hint. Most fields are optional: an originator decides how much to reveal, so any combination of logs, txs, gasUsed, or mevGasPrice may be absent (null) on a given hint. The only field you can rely on for correlation is hash.

hashstring (32-byte hex)
Identifier of the shared transaction or bundle. Use this to submit a matching backrun.
logsarray | null
Event logs the originator chose to reveal. Each entry has address, topics[], and data.
txsarray | null
Partial transaction details. Each entry may include to, functionSelector, and callData.
gasUsedstring (hex) | null
Gas consumed, when revealed.
mevGasPricestring (hex) | null
Effective gas price of the shared activity, when revealed.

Errors

Errors are returned at connection time, before the SSE stream is established, as a small JSON body with Content-Type: application/json:

{ "error": "tier_locked", "code": 403 }
CodeerrorWhen it happens
401unauthorizedMissing, malformed, or invalid Authorization bearer token.
403tier_lockedKey is valid but the plan is not Scale; the MEV gate rejects the request.
405method_not_allowedA method other than GET was used.
429stream_cap_exceededThe user already has the maximum (1) concurrent stream open. Close it before reconnecting.
502mev_share_unavailableThe upstream MEV-share stream could not be reached or returned a non-200 status.
503no_mev_share_upstreamNo healthy MEV-share host is currently available.

For the shared error envelope used by the rest of the API, see errors.

Examples

JavaScript (fetch)

EventSource cannot set an Authorization header, so stream over fetch and read the response body as a stream:

const res = await fetch("https://api.triport.io/sse/eth-mev-share", {
  headers: {
    Authorization: `Bearer ${process.env.TRIPORT_API_KEY}`,
    Accept: "text/event-stream",
  },
});


if (!res.ok) throw new Error(`stream failed: ${res.status}`);


const reader = res.body.getReader();
const decoder = new TextDecoder();
let buffer = "";


while (true) {
  const { value, done } = await reader.read();
  if (done) break; // server closed the stream (session TTL) — reconnect
  buffer += decoder.decode(value, { stream: true });


  let idx;
  while ((idx = buffer.indexOf("\n\n")) !== -1) {
    const frame = buffer.slice(0, idx);
    buffer = buffer.slice(idx + 2);
    const line = frame.split("\n").find((l) => l.startsWith("data:"));
    if (!line) continue;
    const hint = JSON.parse(line.slice(5).trim());
    console.log("hint", hint.hash);
  }
}

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


// Async iterator; auto-reconnects when the session TTL closes the stream.
for await (const hint of triport.eth.mevShareHints()) {
  console.log("hint", hint.hash, hint.mevGasPrice);
}

Python (triport-sdk)

import os
from triport import Triport


client = Triport(api_key=os.environ["TRIPORT_API_KEY"])


# Generator yielding one hint dict per SSE event; reconnects on TTL close.
for hint in client.eth.mev_share_hints():
    print("hint", hint["hash"], hint.get("mevGasPrice"))

Notes

  • Streaming, not polling. Open one connection and consume events as they arrive. Do not reconnect per hint.
  • Session TTL. The server closes the stream after a fixed session window (default 1 hour). Treat a clean close as normal and reconnect; SDK helpers and EventSource-style clients do this automatically.
  • One stream per user. Only a single concurrent stream is allowed per account. A second concurrent connection is rejected with 429 until the first closes — do not open a fresh stream per worker.
  • Partial by design. Hints intentionally omit full calldata. Match on hash and build your strategy from whatever fields are present.
  • Tier gating. Only the Scale plan can open the stream. A 403 means the plan is not entitled rather than the key being invalid.
  • Related: the other Ethereum MEV endpoints (relay Data API, private RPC forwarder, block-builder direct RPC) cover submission and relay data once you have acted on a hint.