getVersionInfo - Stellar

This method returns version information about the Stellar RPC server.

Parameters

  • None

Request

curl

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getVersionInfo",
    "id": "getblock.io"
}'

example.js

javascriptimport axios from 'axios';

const data = JSON.stringify({
    "jsonrpc": "2.0",
    "method": "getVersionInfo",
    "id": "getblock.io"
});

const config = {
    method: 'post',
    url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
    headers: {
        'Content-Type': 'application/json'
    },
    data: data
};

axios(config)
    .then(response => console.log(JSON.stringify(response.data)))
    .catch(error => console.log(error));

example.py

pythonimport requests
import json

url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"

payload = json.dumps({
    "jsonrpc": "2.0",
    "method": "getVersionInfo",
    "id": "getblock.io"
})

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, data=payload)
print(response.text)

example.rs

rustuse reqwest::header;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::new();
    
    let response = client
        .post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
        .header(header::CONTENT_TYPE, "application/json")
        .body(r#"{
            "jsonrpc": "2.0",
            "method": "getVersionInfo",
            "id": "getblock.io"
        }"#)
        .send()
        .await?;
    
    println!("{}", response.text().await?);
    Ok(())
}

Response

json{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "version": "25.0.0-5084a53192b63655c8c5ef1cdc793d2098cf785a",
        "commitHash": "5084a53192b63655c8c5ef1cdc793d2098cf785a",
        "buildTimestamp": "2025-12-12T21:41:24",
        "captiveCoreVersion": "stellar-core 25.0.0 (e9748b05a70d613437a52c8388dc0d8e68149394)",
        "protocolVersion": 24
    }
}

Response Parameters

FieldTypeDescription
versionstringVersion of the Stellar RPC server
commitHashstringGit commit hash of the build
buildTimestampstringTimestamp when the version was built
captiveCoreVersionstringVersion of Captive Stellar Core
protocolVersionintegerCurrent protocol version

Use Case

The getVersionInfo method is essential for:

  • Version compatibility checking
  • Debugging node issues
  • Infrastructure monitoring
  • Feature availability detection
  • Client compatibility verification
  • Upgrade planning

Error Handling

Status CodeError MessageCause
403ForbiddenMissing or invalid ACCESS-TOKEN