# getVersionInfo

Returns version information about the RPC and Captive core.

This method will use `10` [Compute Units](/v1/about/billing.md).

***

## Reference: [Here](https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getVersionInfo)

## **Parameters**

`None`

## Returns

* `version` string *required*. The version of the RPC server. Example: `21.1.0`
* `commitHash` string. The commit hash of the RPC server. Example: `fcd2f0523f04279bae4502f3e3fa00ca627e6f6a`
* `buildTimestamp` string. The build timestamp of the RPC server. Example: `2024-05-10T11:18:38`
* `captiveCoreVersion` string. The version of the Captive Core. Example: `stellar-core 21.0.0.rc2 (c6f474133738ae5f6d11b07963ca841909210273)`
* `protocolVersion` integer. The protocol version. Example: `21`

```json
// Result
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "result": {
    "version": "21.1.0",
    "commit_hash": "fcd2f0523f04279bae4502f3e3fa00ca627e6f6a",
    "build_time_stamp": "2024-05-10T11:18:38",
    "captive_core_version": "stellar-core 21.0.0.rc2 (c6f474133738ae5f6d11b07963ca841909210273)",
    "protocol_version": 21
  }
}
```

{% tabs %}
{% tab title="mainnet" %}

<pre class="language-bash"><code class="lang-bash"><strong>curl https://mainnet.stellar.validationcloud.io/v1/&#x3C;YOUR_API_KEY_HERE> \
</strong>    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0","id": 8675309,"method": "getVersionInfo"}'
</code></pre>

{% endtab %}

{% tab title="testnet" %}

```bash
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": "getVersionInfo"}'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.validationcloud.io/v1/stellar/stellar-rpc-formerly-soroban-api/getversioninfo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
