Stellar (XLM)

GetBlock provides fast and reliable access to Stellar nodes via JSON-RPC API. Connect to the Stellar network without running your own infrastructure.

Stellar is a decentralized Layer-1 blockchain designed for fast, low-cost cross-border payments and asset tokenization. Built on the Stellar Consensus Protocol (SCP), it achieves consensus through federated Byzantine agreement rather than mining, enabling near-instant transaction finality with minimal energy consumption. Stellar supports the Soroban smart contract platform for building decentralized applications.

Key Features

  • Stellar Consensus Protocol (SCP): Proof of Agreement consensus for fast, energy-efficient finality

  • Native Currency XLM: Lumens power transaction fees and serve as a bridge currency

  • ~5 Second Ledger Close: Near-instant transaction confirmation

  • Minimal Transaction Fees: Fractions of a cent per transaction

  • Soroban Smart Contracts: WebAssembly-based smart contract platform

  • Built-in DEX: Native decentralized exchange for asset trading

  • Asset Tokenization: Issue and manage custom assets on-chain

  • Cross-Border Payments: Designed for global financial infrastructure

TECHNICAL DISCLAIMER: AUTHORITATIVE JSON-RPC API SPECIFICATION.

GetBlock's RPC API reference documentation is provided exclusively for informational purposes and streamlined developer experience optimization. The canonical and normative specification for Stellar RPC methods is solely maintained and published through the official Stellar Development Foundation documentation portal at developers.stellar.org. This resource constitutes the sole authoritative reference implementation of the JSON-RPC 2.0 protocol interface for Stellar nodes.

Network Information

Property
Value

Network Name

Stellar

Native Currency

XLM (Lumens)

Decimals

7 (stroops)

Consensus

Stellar Consensus Protocol (SCP)

Ledger Close Time

~5 seconds

Base Reserve

0.5 XLM

Minimum Balance

1 XLM (2 base reserves)

Smart Contracts

Soroban

Base URL

Supported Networks

Network
JSON RPC
REST
New York, USA
Frankfurt, Germany
Singapore, Singapore

Mainnet

Quickstart

In this section, you will learn how to make your first call with either:

  • Axios

  • Python

Quickstart with Axios

1

Set up project

Create and initialize your project:

2

Install Axios

3

Create index.js

Create a new file named index.js. Ensure your package.json has "type": "module" to use ES modules.

4

Add the code

Add the following to index.js:

Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

5

Run the script

Expected output:

Quickstart with Python and Requests

1

Set up project directory

2

Create and activate a virtual environment

3

Install requests

4

Create main.py

Create a file called main.py with the following content:

Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

5

Run the script

Available API Methods

GetBlock provides access to Stellar RPC methods for interacting with the network:

Node Information

Method
Description

getHealth

Returns node health status

getNetwork

Returns network configuration

getVersionInfo

Returns version information

getFeeStats

Returns fee statistics

Ledger Methods

Method
Description

getLatestLedger

Returns the latest known ledger

getLedgers

Returns a list of ledgers

getLedgerEntries

Returns ledger entries by key

Transaction Methods

Method
Description

getTransaction

Returns transaction details by hash

getTransactions

Returns a list of transactions

sendTransaction

Submits a signed transaction

simulateTransaction

Simulates a transaction without submitting

Events

Method
Description

getEvents

Returns contract events

Support

For technical support and questions:

See Also

Last updated

Was this helpful?