Horizon SSE — Stellar Streams
Receive newly ingested Stellar ledgers or transactions as Horizon HAL JSON.
GET
https://triport.io/rpc/stellar/horizon/ledgers?cursor=now- Network
- Stellar mainnet
- Scope
- stellar:rpc
- Auth
- x-token: $TRIPORT_API_KEY (or Authorization: Bearer, or ?api-key= query)
- Rate limit
- stellar_read_rpc_heavy — 15 / 20 / 100 / 250 RPS sustained · short burst 30 / 40 / 200 / 500 (free / basic / pro / business) (plan policy); Burst capacity
Endpoint and plans: Stellar RPC endpoint.
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 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
channelstringrequiredPath segment:
ledgers or transactions.cursorstringrequiredMust be the constant
now on this published stream surface.Response
_linksobjectHAL links, including the resource's self link.
idstringLedger resource identifier.
paging_tokenstringOpaque Horizon paging token.
hashstringLedger hash when present.
sequenceintegerLedger sequence.
closed_atstringLedger close timestamp.
Errors
See Stellar errors and the shared error reference.
| Status | Meaning | When it happens |
|---|---|---|
400 | Bad request | cursor is missing or is not now, or the channel is invalid. |
401 | Unauthorized | The API key is missing or invalid. |
403 | Forbidden | The key lacks the required scope or tier. |
429 | Rate limited | The stellar_read_rpc_heavy budget is exceeded. |
| connection closed | Stream interrupted | The client must reconnect; no delivery SLA is provided. |
Examples
Subscribe to newly ingested transactions:
curl -N \
-H "Accept: text/event-stream" \
-H "x-token: $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.