Skip to main content
Stellar Global Nodes on Chainstack serve Horizon — Stellar’s REST API for accounts, ledgers, transactions, operations, payments, offers, and fee stats — on the same endpoint and auth token as Stellar RPC. Use Horizon for account balances, paginated payment and transaction history, and live streams of new ledgers or payments over server-sent events (SSE). Horizon is available on Mainnet and Testnet.
Horizon is available on Stellar Global Nodes starting from the Growth plan. On the Developer plan, Horizon requests return 403.

Endpoint and authentication

The Horizon endpoint is your Stellar HTTPS endpoint — the same URL you use for Stellar RPC. To find it on Chainstack, open your node and check the Horizon endpoint field on the Access and credentials tab. See View node access and credentials. One URL serves both APIs, and the request decides which API answers: Horizon builds every _links href in its responses from your endpoint URL, so the SDKs follow pagination and related-resource links without extra configuration. For every authentication option, see Authentication methods available on Chainstack. A Horizon request from a node whose plan doesn’t include Horizon returns 403 with the body The Horizon API is not available on your current plan. Visit https://console.chainstack.com/user/settings/billing to upgrade. Stellar RPC calls on the same node keep working.

Query Horizon with cURL

Every Horizon read is an HTTP GET on a resource path. To fetch the latest ledger:
The response is a HAL page: the records sit in _embedded.records, and _links.next.href points to the next page on your endpoint. The root document — GET YOUR_CHAINSTACK_ENDPOINT — reports the Horizon version, the network passphrase, the latest ingested ledger in history_latest_ledger, and the oldest ledger Horizon holds in history_elder_ledger.

JavaScript

Use the official @stellar/stellar-sdk and point Horizon.Server at your endpoint. page.next() follows the _links.next.href that Horizon returns.
To read an account’s sequence number and balances, call server.loadAccount("G...") with the account ID.

Python

Use the official stellar-sdk and its Server class, which speaks the Horizon API. The SorobanServer class in the same package speaks Stellar RPC — see Stellar tooling.

Stream payments and ledgers with server-sent events

Horizon pushes new records to your application over server-sent events (SSE) on any streamable collection, such as /payments, /ledgers, /transactions, and /accounts/{id}/payments. Set the cursor to now to receive only records created after the stream opens. Stellar RPC has no WebSocket endpoint on Chainstack, so SSE is the way to receive live Stellar data from your node.
To stream with cURL, request the collection with the Accept: text/event-stream header:

How far back Horizon history goes

Horizon on Chainstack keeps a rolling window of about 60 days of ledgers. The root document reports the window — history_elder_ledger is the oldest ledger Horizon holds, and history_latest_ledger is the newest. Plan queries from history_elder_ledger, which moves forward as new ledgers close. A request for data older than history_elder_ledger returns 410 with the error type before_history:
The Horizon window is separate from the Stellar RPC retention window that getHealth reports. For full ledger history on Mainnet, use the Stellar RPC getLedgers method — see Historical data availability.

Billing

Each Horizon request is 1 request unit (RU), the same as a Stellar RPC call. On an SSE stream, each event that Horizon sends is 1 RU. Stellar has no archive billing split, so a query near history_elder_ledger costs the same as one at the tip. On a node with the Unlimited Node add-on, Horizon requests and stream events don’t consume RUs. See Request units.

Next steps

  • Stellar tooling — Stellar RPC over JSON-RPC with cURL and the JavaScript and Python SDKs.
  • Horizon API reference — every Horizon resource, parameter, and response field, maintained by the Stellar Development Foundation.
  • Extended nodes — how Stellar Global Nodes keep more ledger history than a default node.
Last modified on December 4, 2026