How To Access Soroban API

Learn how to access Soroban API.

Step 1: To access the available Soroban methods, use the following native access endpoint:

  • Network: Soroban Testnet
  • Request Type: GET / POST

Step 2: You should authorize your request. Learn more: Authentication Guide

Step 3: Specify a Soroban method at the end of the query:

Step 4: For POST requests, specify the data required by the method in the request body.

Example Request

Here is a cURL example for retrieving the current latest known ledger of this node. This is a subset of the ledger info from Horizon.

curl -X POST \ \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
  "jsonrpc": "2.0",
  "method": "getLatestLedger"

Here's what a typical response object will look like: