> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

export const logo_0 = "/nodeapi/assets/chains/stellar.svg"

export const chain_0 = "Stellar"

<span className="chain-logo-stellar" />

<img className="page-cover" src="https://mintcdn.com/validation-cloud/QajBabafGojozKj4/nodeapi/assets/stellar.jpg?fit=max&auto=format&n=QajBabafGojozKj4&q=85&s=692e7f2e3e1d026d949fae4860ede30e" alt="" noZoom width="1990" height="480" data-path="nodeapi/assets/stellar.jpg" />

<div className="not-prose my-8 flex flex-col gap-4 rounded-2xl border border-gray-950/10 p-5 sm:flex-row sm:items-center dark:border-white/10">
  <img src={logo_0} alt="" className="h-10 w-10 shrink-0" noZoom />

  <div className="flex-1">
    <p className="m-0 font-semibold text-gray-900 dark:text-gray-100">Start building on {chain_0} for free</p>
    <p className="m-0 mt-1 text-sm text-gray-600 dark:text-gray-400">Create an endpoint in under a minute. The Free plan includes 50 million compute units a month, and no credit card is required.</p>
  </div>

  <a href="https://app.validationcloud.io/auth/signup?returnTo=%2Fnode%2Fcreate-endpoint" className="shrink-0 rounded-full bg-primary px-5 py-2 text-center text-sm font-semibold text-white no-underline hover:opacity-90">Try free</a>
</div>

## Network Support

| Network | HTTPS | WSS |
| - | - | - |
| Pubnet: Horizon (90 day history) & Stellar RPC (60 day history) | ✅ | ❌ |
| Testnet: Horizon (full history since the latest testnet reset) & Stellar RPC (7 day history) | ✅ | ❌ |
| Pubnet Archive: Horizon only (1 year history) | ✅ | ❌ |
| Pubnet RPC v2 (Beta): Stellar RPC only (full history from ledger 2) | ✅ | ❌ |

> **History retention:** Horizon on Pubnet lets you query the most recent 90 days of history, and the Pubnet Archive endpoint extends this to 1 year (the archive endpoint serves Horizon only; Stellar RPC is not available on it). Stellar RPC (formerly Soroban) serves the most recent 60 days of history on Pubnet and the most recent 7 days on Testnet. Pubnet RPC v2 (Beta) serves Stellar RPC with full Pubnet history, back to ledger 2 in September 2015. Horizon on Testnet serves full history back to the most recent Stellar testnet reset; the Stellar Development Foundation periodically resets testnet, and history restarts from each reset.

## Stellar RPC v2 (Beta)

Stellar RPC v2 is the Stellar Development Foundation's full-history version of Stellar RPC. It serves every Pubnet ledger since ledger 2, so `getTransaction`, `getTransactions`, `getLedgers` and `getEvents` can read any Pubnet ledger.

To use it, create an endpoint and select the **Pubnet RPC v2 (Beta)** network. Your endpoint URL is `https://pubnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>`. A Pubnet RPC v2 key only works on that URL, and a Pubnet key only works on `mainnet.stellar.validationcloud.io`.

Stellar RPC v2 is compatible with existing Stellar RPC clients. No method, parameter or response field was removed. The differences are:

* **Full history.** Requests for old ledgers succeed instead of returning an out-of-range error.
* **`getHealth`** returns `ledgerRetentionWindow: 0` because the node keeps full history. Use `oldestLedger` to find the oldest ledger served.
* **`getLedgers`** returns at most 20 ledgers per page, with a default of 5. Stellar RPC on Pubnet and Testnet allows up to 200, with a default of 50. A `limit` above 20 returns an error.
* **New method:** [queryEvents](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/queryevents) adds newest-first ordering, positional topic filters and stateless cursors.
* **No Horizon.** Pubnet RPC v2 serves Stellar RPC only. For Horizon, use a Pubnet or Pubnet Archive endpoint.

Stellar RPC v2 is in beta. The Stellar Development Foundation's full list of changes is [here](https://github.com/stellar/stellar-rpc/blob/archive-node-beta/docs/API-CHANGES-BETA.md).

### Stellar SSE Streaming

We recently introduced an updated Compute Unit (CU) model for **Server-Sent Events (SSE)** streaming on Stellar Horizon API endpoints. SSE allows developers to receive real-time updates without the need for continuous polling.

**Pricing Model**

SSE-enabled Stellar endpoints use a two-part pricing structure:

* **Base cost per request:** 20 CUs (same as standard Stellar endpoints)
* **Data streaming cost:** 1 CU per KB of data streamed to the client

This differs from standard Stellar endpoints, which only charge the base request cost and do not include any data-based pricing.

**Compute Unit Calculation**

```
Total CUs = (20 × number of requests) + (1 × response size in KB)
```

```
Total CUs = (cu_amount × requests) + ((response_size_bytes / 1024) × cu_per_kb)
```

**Key Difference**

* **Standard endpoints:** Fixed cost per request (no data-based charges)
* **SSE endpoints:** Base request cost plus variable cost based on streamed data volume

## Getting Started

Send a request to check that your endpoint works. Replace `<YOUR_API_KEY_HERE>` with the key from your endpoint in the [Validation Cloud app](https://app.validationcloud.io/node).

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc": "2.0", "id": 8675309, "method": "getHealth"}'
  ```

  ```bash title="testnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://testnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc": "2.0", "id": 8675309, "method": "getHealth"}'
  ```
</CodeGroup>

## Compute Units

### SSE Streaming Endpoints

Certain Stellar Horizon endpoints support **Server-Sent Events (SSE)**, allowing clients to receive real-time updates instead of polling.

> **Compute Units:** When used in streaming mode, these endpoints are charged at **20 CUs per request** plus **1 CU per KB of data streamed**.

The following endpoints support SSE streaming:

***

**Top-level endpoints**

* GET /ledgers
* GET /transactions
* GET /operations
* GET /payments
* GET /effects
* GET /trades

***

**Account-specific endpoints**

* GET /accounts/\{account\_id}/transactions
* GET /accounts/\{account\_id}/operations
* GET /accounts/\{account\_id}/payments
* GET /accounts/\{account\_id}/effects
* GET /accounts/\{account\_id}/trades
* GET /accounts/\{account\_id}/offers

***

**Ledger-specific endpoints**

* GET /ledgers/\{ledger\_sequence}/transactions
* GET /ledgers/\{ledger\_sequence}/operations
* GET /ledgers/\{ledger\_sequence}/payments
* GET /ledgers/\{ledger\_sequence}/effects

***

**Liquidity pool endpoints**

* GET /liquidity\_pools/\{liquidity\_pool\_id}/effects
* GET /liquidity\_pools/\{liquidity\_pool\_id}/trades
* GET /liquidity\_pools/\{liquidity\_pool\_id}/transactions
* GET /liquidity\_pools/\{liquidity\_pool\_id}/operations

***

**Transaction & operation endpoints**

* GET /operations/\{operation\_id}/effects
* GET /transactions/\{transaction\_id}/operations
* GET /transactions/\{transaction\_id}/effects

***

**Offer endpoints**

* GET /offers/\{offer\_id}/trades

***

**Claimable balance endpoints**

* GET /claimable\_balances/\{claimable\_balance\_id}/transactions
* GET /claimable\_balances/\{claimable\_balance\_id}/operations

### Stellar RPC (formerly known as Soroban)

| Method | Compute units |
| - | - |
| [getEvents](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/getevents) | 10 |
| [getFeeStats](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/getfeestats) | 10 |
| [getHealth](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/gethealth) | 10 |
| [getLatestLedger](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/getlatestledger) | 10 |
| [getLedgerEntries](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/getledgerentries) | 10 |
| [getLedgers](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/getledgers) | 10 |
| [getNetwork](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/getnetwork) | 10 |
| [getTransaction](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/gettransaction) | 10 |
| [getTransactions](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/gettransactions) | 10 |
| [getVersionInfo](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/getversioninfo) | 10 |
| [queryEvents (Pubnet RPC v2 only)](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/queryevents) | 10 |
| [sendTransaction](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/sendtransaction) | 10 |
| [simulateTransaction](/nodeapi/stellar/stellar-rpc-formerly-soroban-api/simulatetransaction) | 10 |

### Horizon

| Method | Compute units |
| - | - |
| GET / | 10 |
| [GET /accounts](/nodeapi/stellar/horizon-api/accounts/list-all-accounts) | 20 |
| [GET /accounts/:account\_id](/nodeapi/stellar/horizon-api/accounts/retrieve-an-account) | 20 |
| [GET /accounts/:account\_id/transactions](/nodeapi/stellar/horizon-api/accounts/retrieve-an-accounts-transactions) | 20 |
| [GET /accounts/:account\_id/operations](/nodeapi/stellar/horizon-api/accounts/retrieve-an-accounts-operations) | 20 |
| [GET /accounts/:account\_id/payments](/nodeapi/stellar/horizon-api/accounts/retrieve-an-accounts-payments) | 20 |
| [GET /accounts/:account\_id/effects](/nodeapi/stellar/horizon-api/accounts/retrieve-an-accounts-effects) | 20 |
| [GET /accounts/:account\_id/offers](/nodeapi/stellar/horizon-api/accounts/retrieve-an-accounts-offers) | 20 |
| [GET /accounts/:account\_id/trades](/nodeapi/stellar/horizon-api/accounts/retrieve-an-accounts-trades) | 20 |
| [GET /accounts/:account\_id/data/:key](/nodeapi/stellar/horizon-api/accounts/retrieve-an-accounts-data) | 20 |
| [GET /assets](/nodeapi/stellar/horizon-api/assets/list-all-assets) | 20 |
| [GET /claimable\_balances](/nodeapi/stellar/horizon-api/claimable-balances/list-all-claimable-balances) | 20 |
| [GET /claimable\_balances/:claimable\_balance\_id](/nodeapi/stellar/horizon-api/claimable-balances/retrieve-a-claimable-balance) | 20 |
| [GET /claimable\_balances/:claimable\_balance\_id/transactions](/nodeapi/stellar/horizon-api/claimable-balances/retrieve-related-transactions) | 20 |
| [GET /claimable\_balances/:claimable\_balance\_id/operations](/nodeapi/stellar/horizon-api/claimable-balances/retrieve-related-operations) | 20 |
| [GET /effects](/nodeapi/stellar/horizon-api/effects/list-all-effects) | 20 |
| [GET /fee\_stats](/nodeapi/stellar/horizon-api/fee-stats) | 10 |
| [GET /ledgers/:sequence](/nodeapi/stellar/horizon-api/ledgers/retrieve-a-ledger) | 20 |
| [GET /ledgers/:sequence/transactions](/nodeapi/stellar/horizon-api/ledgers/retrieve-a-ledgers-transactions) | 20 |
| [GET /ledgers/:sequence/payments](/nodeapi/stellar/horizon-api/ledgers/retrieve-a-ledgers-payments) | 20 |
| [GET /ledgers/:sequence/operations](/nodeapi/stellar/horizon-api/ledgers/retrieve-a-ledgers-operations) | 20 |
| [GET /ledgers/:sequence/effects](/nodeapi/stellar/horizon-api/ledgers/retrieve-a-ledgerss-effects) | 20 |
| [GET /ledgers](/nodeapi/stellar/horizon-api/ledgers/list-all-ledgers) | 20 |
| [GET /liquidity\_pools](/nodeapi/stellar/horizon-api/liquidity-pools/list-liquidity-pools) | 20 |
| [GET /liquidity\_pools/:liquidity\_pool\_id](/nodeapi/stellar/horizon-api/liquidity-pools/retrieve-a-liquidity-pool) | 20 |
| [GET /liquidity\_pools/:liquidity\_pool\_id/effects](/nodeapi/stellar/horizon-api/liquidity-pools/retrieve-related-effects) | 20 |
| [GET /liquidity\_pools/:liquidity\_pool\_id/trades](/nodeapi/stellar/horizon-api/liquidity-pools/retrieve-related-trades) | 20 |
| [GET /liquidity\_pools/:liquidity\_pool\_id/transactions](/nodeapi/stellar/horizon-api/liquidity-pools/retrieve-related-transactions) | 20 |
| [GET /liquidity\_pools/:liquidity\_pool\_id/operations](/nodeapi/stellar/horizon-api/liquidity-pools/retrieve-related-operations) | 20 |
| [GET /offers](/nodeapi/stellar/horizon-api/offers/list-all-offers) | 20 |
| [GET /offers/:offer\_id](/nodeapi/stellar/horizon-api/offers/retrieve-an-offer) | 20 |
| [GET /offers/:offer\_id/trades](/nodeapi/stellar/horizon-api/offers/retrieve-an-offers-trades) | 20 |
| [GET /operations/:id](/nodeapi/stellar/horizon-api/operations/retrieve-an-operation) | 20 |
| [GET /operations/:id/effects](/nodeapi/stellar/horizon-api/operations/retrieve-an-operations-effects) | 20 |
| [GET /operations](/nodeapi/stellar/horizon-api/operations/list-all-operations) | 20 |
| [GET /order\_book](/nodeapi/stellar/horizon-api/order-books/retrieve-an-order-book) | 10 |
| [GET /paths/strict-receive](/nodeapi/stellar/horizon-api/paths/list-strict-receive-payment-paths) | 10 |
| [GET /paths/strict-send](/nodeapi/stellar/horizon-api/paths/list-strict-send-payment-paths) | 10 |
| [GET /payments](/nodeapi/stellar/horizon-api/payments/list-all-payments) | 20 |
| [GET /transactions/:transaction\_hash/payments](/nodeapi/stellar/horizon-api/payments/retrieve-a-transactions-payments) | 10 |
| [GET /trades](/nodeapi/stellar/horizon-api/trades/list-all-trades) | 20 |
| [GET /trade\_aggregations](/nodeapi/stellar/horizon-api/trade-aggregations/list-trade-aggregations) | 40 |
| [GET /transactions/:transaction\_hash](/nodeapi/stellar/horizon-api/transactions/retrieve-a-transaction) | 20 |
| [GET /transactions/:transaction\_hash/operations](/nodeapi/stellar/horizon-api/transactions/retrieve-a-transactions-operations) | 20 |
| [GET /transactions/:transaction\_hash/effects](/nodeapi/stellar/horizon-api/transactions/retrieve-a-transactions-effects) | 20 |
| [GET /transactions](/nodeapi/stellar/horizon-api/transactions/list-all-transactions) | 20 |
| [POST /transactions](/nodeapi/stellar/horizon-api/transactions/submit-a-transaction) | 20 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.