Skip to main content
Your Chainstack Stellar node serves the Stellar RPC API — the JSON-RPC interface that stellar-rpc exposes for reading ledger data, simulating contract calls, and submitting transactions. Horizon is a separate service with its own REST interface and is not served on this endpoint.

JSON-RPC over HTTPS

Every call is an HTTP POST with a method and, for methods that take arguments, a params object. The endpoint is HTTPS only — Stellar nodes on Chainstack do not expose a WebSocket endpoint.
getHealth is the fastest way to confirm the endpoint works and to see the ledger range the node holds:
Replace YOUR_CHAINSTACK_ENDPOINT with your node’s HTTPS endpoint. For the credential in that endpoint and the other ways to authenticate, see Authentication methods for different scenarios.

Historical data availability

Stellar Global Nodes are Extended: they keep a rolling window of recent ledgers that is longer than the stellar-rpc default of about 7 days. Transaction and event queries are limited to that window on both networks. On Mainnet, getLedgers also serves ledgers older than the window, back to ledger 2. On Testnet, getLedgers is limited to the window. Billing is independent of the window — every Stellar request is billed as full, at 1 RU; see Request units. Your node reports its own window in getHealth:
  • ledgerRetentionWindow — the configured size of the window, in ledgers
  • oldestLedger — the oldest ledger in the retention window right now
  • latestLedger — the current tip
Work from oldestLedger, not from ledgerRetentionWindow. The configured size is the ceiling, and a node that has not been running long enough to fill its window holds less than that. A getTransactions or getEvents request that starts before oldestLedger returns -32600 with a message naming the range the node can serve. The same applies to getLedgers on Testnet. On Mainnet, getLedgers accepts any startLedger from 2 to the tip.

JavaScript

Use the official @stellar/stellar-sdk and point rpc.Server at your endpoint.

Read recent ledgers

getLedgers takes a single request object with startLedger and a pagination block, rather than positional arguments:

Python

Use the official stellar-sdk and its SorobanServer, which speaks the Stellar RPC API.
Last modified on September 27, 2026