TriportRPC

Horizon SSE

GEThttps://triport.io/rpc/stellar/horizon/ledgers?cursor=now

Receive newly ingested Stellar ledgers or transactions as Horizon HAL JSON.

Stellar mainnetstellar:rpcstellar_read_rpc_heavy — 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured)

The mounted SSE surface exposes two channels: newly closed ledgers and newly ingested transactions. Each data: frame contains the original Horizon HAL resource described by the AsyncAPI contract.

Use SSE for low-latency live processing without polling a collection. It is not historical replay: both channels require cursor=now and begin after the connection starts.

The mounted Horizon path currently has one measured working operator and is best-effort without an SLA. SSE does not extend the operator's 6,307,191-ledger measured REST retention window.

Parameters

channelstringrequired
Path segment: ledgers or transactions.
cursorstringrequired
Must be the constant now on this published stream surface.

Response

Each event is an SSE data field whose value is JSON:

_linksobject
HAL links, including the resource's self link.
idstring
Ledger resource identifier.
paging_tokenstring
Opaque Horizon paging token.
hashstring
Ledger hash when present.
sequenceinteger
Ledger sequence.
closed_atstring
Ledger close timestamp.

Errors

See Stellar errors and the shared error reference.

StatusMeaningWhen it happens
400Bad requestcursor is missing or is not now, or the channel is invalid.
401UnauthorizedThe API key is missing or invalid.
403ForbiddenThe key lacks the required scope or tier.
429Rate limitedThe stellar_read_rpc_heavy budget is exceeded.
connection closedStream interruptedThe client must reconnect; no delivery SLA is provided.

Examples

Subscribe to newly ingested transactions:

curl -N \
  -H "Accept: text/event-stream" \
  -H "X-API-Key: $TRIPORT_API_KEY" \
  "https://triport.io/rpc/stellar/horizon/transactions?cursor=now"

Notes

  • Store any application checkpoint before reconnecting; the published route does not promise replay from an older paging token.
  • A data: field contains one HAL resource, not a JSON-RPC envelope.
  • Only the ledger and transaction channels in the AsyncAPI contract are mounted.
  • This is read-only delivery; no write or transaction-submit channel exists.