Skip to main content
Horizon and RPC both provide API endpoints to retrieve data from the Stellar network. The following example queries retrieve the same data by using Hubble with the added benefit of being able to return historical data.

Accounts

horizon/accounts Users interact with the Stellar network through accounts. Everything else in the ledger—assets, offers, trustlines, etc.—are owned by accounts, and accounts must authorize all changes to the ledger through signed transactions. Learn more about accounts.

General account information and XLM balance

Non-XLM asset balance information

Account signer information

List all accounts

Retrieve an Account’s Transactions

Retrieve an Account’s Operations

Retrieve an Account’s Payments

Retrieve an Account’s Effects

Retrieve an Account’s Offers

Retrieve an Account’s Trades

Assets

horizon/assets Assets are representations of value issued on the Stellar network. An asset consists of a type, code, and issuer. Learn more about assets.

List all Assets

Getting Stellar Asset Contract Information for an Asset

Claimable Balances

horizon/claimable_balances A Claimable Balance represents the transfer of ownership of some amount of an asset. Claimable balances provide a mechanism for setting up a payment which can be claimed in the future. This allows you to make payments to accounts which are currently not able to accept them.

List All Claimable Balances

Retrieve a Claimable Balance

Effects

horizon/effects Effects represent specific changes that occur in the ledger as a result of successful operations, but are not necessarily directly reflected in the ledger or history, as transactions and operations are.

List All Effects

Ledgers

horizon/ledgers Each ledger stores the state of the network at a point in time and contains all the changes - transactions, operations, effects, etc. - to that state. Learn more about ledgers.

List All Ledgers

Retrieve a Ledger’s Transactions and Operations

Retrieve a Ledger’s Payments

Liquidity Pools

horizon/liquidity_pools Liquidity Pools provide a simple, non-interactive way to trade large amounts of capital and enable high volumes of trading.

List Liquidity Pools

Retrieve a Liquidity Pool

Retrieve a Liquidity Pool’s Transactions and Operations

Offers

horizon/offers Offers are statements about how much of an asset an account wants to buy or sell. Learn more about offers.

List All Offers

Retrieve an Offer

Retrieve an Offer’s Trades

Operations

horizon/operations Operations are objects that represent a desired change to the ledger: payments, offers to exchange currency, changes made to account options, etc. Operations are submitted to the Stellar network grouped in a Transaction. Each of Stellar’s operations have a unique operation object.

List All Operations

List All Payments

Retrieve an Operation

Retrieve an Operation’s Effects

Trades

horizon/trades When an offer is fully or partially fulfilled, a trade happens. Trades can also be caused by successful path payments, because path payments involve fulfilling offers. A trade occurs between two parties—base and counter. Which is which is either arbitrary or determined by the calling query. Learn more about trades.

List All Trades

Transactions

horizon/transactions Transactions are commands that modify the ledger state and consist of one or more operations. Learn more about transactions.

List All Transactions

Retrieve a Transaction

Retrieve a Transaction’s Operations

Trade Aggregations

horizon/trade_aggregations A trade aggregation represents aggregated statistics on an asset pair (base and counter) for a specific time period. Trade aggregations are useful to developers of trading clients and provide historical trade data.

List Trade Aggregations

Fee Stats

horizon/fee-stats Fee stats are used to predict what fee to set for a transaction before submitting it to the network. Two models are available: ledger_fee_stats_agg (ledger-grain) and daily_fee_stats_agg (daily-grain). Both provide separate Classic and Soroban fee breakdowns, inclusion fee metrics, and surge pricing statistics.

Retrieve Daily Fee Stats

Retrieve Ledger-Level Fee Stats

getEvents

rpc/getEvents Contract events and diagnostic events are used for supplemental information related to a contract invocation

getLedgerEntries

rpc/getLedgerEntries Enables the retrieval of various ledger states, such as accounts, trustlines, offers, data, claimable balances, and liquidity pools. It also provides direct access to inspect a contract’s current state, its code, or any other ledger entry

Contract Data Entries

Contract Code Entries

getTransaction

rpc/getTransaction Transactions are commands that modify the ledger state and consist of one or more operations. Learn more about transactions.