JSON-RPC over HTTPS
Every call is an HTTP POST with amethod 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:
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 nodes on Chainstack run in full mode and keep a rolling window of recent ledgers rather than history from genesis. 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 ingetHealth:
ledgerRetentionWindow— the configured size of the window, in ledgersoldestLedger— the oldest ledger the node can serve right nowlatestLedger— the current tip
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 request for a ledger outside the window returns -32600 with a message naming the range the node can serve.
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 officialstellar-sdk and its SorobanServer, which speaks the Stellar RPC API.