# getVersion

The `getVersion` RPC method in **CoinVera** returns the **software version** of the Solana node responding to the request. This includes the `solana-core` version string and a `feature-set` identifier, making it a valuable tool for diagnostics, compatibility checks, and monitoring.

***

#### ✅ Common Use Cases

* **Node Version Verification**\
  Confirm the version of the CoinVera RPC node you’re communicating with—for feature support or SDK compatibility.
* **Network Monitoring**\
  Periodically query node versions across the network (use `getClusterNodes` for broader insight).
* **Troubleshooting and Debugging**\
  Determine if issues may be version-specific by identifying the exact software build of the node.

***

#### 🧾 Request Parameters

This method **does not take any parameters**.

```ts
[]
```

***

#### 📦 Response Structure

```json
{
  "solana-core": "1.17.9",
  "feature-set": 123456789
}
```

* **solana-core**: The version string of the Solana software running on the node.
* **feature-set**: An internal identifier corresponding to the set of features enabled in this version.

***

#### 🧪 Example

**Get Current Node Version**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getVersion"
}
```

**Response**:

```json
{
  "jsonrpc": "2.0",
  "result": {
    "solana-core": "1.17.9",
    "feature-set": 123456789
  },
  "id": 1
}
```

***

**Code Examples**

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

```javascript
const fetch = require('node-fetch');

async function getVersion(rpcUrl) {
  try {
    const response = await fetch(rpcUrl, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getVersion'
      }),
    });

    const data = await response.json();
    
    // Print the exact full response
    console.log('Full RPC Response:');
    console.log(JSON.stringify(data, null, 2));
    
    return data;
  } catch (error) {
    console.error('Error getting health:', error.message);
    return null;
  }
}

// Example usage
const RPC_URL = 'https://rpc.coinvera.io/?x-api-key=your-coinvera-x-api-key';

getVersion(RPC_URL);
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

def get_version(rpc_url):
    try:
        response = requests.post(
            rpc_url,
            headers={
                'Content-Type': 'application/json',
            },
            json={
                'jsonrpc': '2.0',
                'id': 1,
                'method': 'getVersion'
            }
        )
        
        data = response.json()
        
        # Print the exact full response
        print('Full RPC Response:')
        print(json.dumps(data, indent=2))
        
        return data
        
    except Exception as error:
        print(f'Error getting health: {error}')
        return None

# Example usage
RPC_URL = 'https://rpc.coinvera.io/?x-api-key=your-coinvera-x-api-key'
get_version(RPC_URL)
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "jsonrpc": "2.0",
  "result": {
    "feature-set": 3073396398,
    "solana-core": "2.2.16"
  },
  "id": 1
}
```

***

#### 💡 Developer Tips

* **Simple and Fast**\
  This is one of the quickest RPC calls—ideal for lightweight health checks or CLI tools.
* **Version Is Node-Specific**\
  The version returned reflects the specific CoinVera RPC node you're querying. During network upgrades, other nodes may be running different versions.
* **Use Feature Set for Compatibility**\
  While version strings are useful, the `feature-set` number can be important for programmatic checks or runtime gating of features.

***

The `getVersion` method is a simple yet effective way to verify Solana software versions and ensure you're interacting with a compatible and up-to-date CoinVera node.


---

# 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.coinvera.io/integration/solana/rpc/getversion.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.
