# network/options - Cardano

> Example code for the network/options JSON-RPC method. Complete guide on how to use network/options JSON-RPC in GetBlock Web3 documentation.

This endpoint returns the version information and the allowed network-specific types, such as operation types, statuses, and errors, for a network.

## Parameters

The request body is a JSON object with the following fields.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| network_identifier | object | Yes | The network to query |
| metadata | object | No | Optional metadata object |

## Request

#### cURL

```bash
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/network/options' \
--header 'Content-Type: application/json' \
--data-raw '{
    "network_identifier": {
        "blockchain": "cardano",
        "network": "mainnet"
    },
    "metadata": {}
}'
```

#### JavaScript

#### example.js

```javascript
const response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/network/options',
    {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({"network_identifier": {"blockchain": "cardano", "network": "mainnet"}, "metadata": {}})
    }
);
console.log(await response.json());
```

#### Python

#### example.py

```python
import requests

response = requests.post(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/network/options',
    headers={'Content-Type': 'application/json'},
    json={"network_identifier": {"blockchain": "cardano", "network": "mainnet"}, "metadata": {}}
)

print(response.json())
```

## Response

```json
{
    "version": {
        "rosetta_version": "1.4.10",
        "node_version": "8.9.0",
        "middleware_version": "1.2.0"
    },
    "allow": {
        "operation_statuses": [
            {
                "status": "success",
                "successful": true
            }
        ],
        "operation_types": [
            "input",
            "output",
            "stakeKeyRegistration",
            "stakeDelegation",
            "withdrawal"
        ],
        "errors": [
            {
                "code": 1,
                "message": "Invalid request",
                "retriable": false
            }
        ],
        "historical_balance_lookup": true
    }
}
```

## Response Parameters

| Field | Type | Description |
| --- | --- | --- |
| version | object | Rosetta, node, and middleware versions |
| allow.operation_types | array | Operation types the network uses |
| allow.operation_statuses | array | Possible operation statuses |
| allow.errors | array | Errors the server can return |
| allow.historical_balance_lookup | boolean | Whether historical balances are supported |

## Use Cases

* **Capability Discovery**: Learn which operation types the network supports
* **Version Checks**: Confirm the node and Rosetta versions
* **Error Handling**: Read the full error catalog for the network
* **Historical Support**: Detect whether historical balance lookups are allowed

## Error Handling

| Error Code | Message | Description |
| --- | --- | --- |
| 1 | Invalid request | The request body is malformed or missing required fields |
| 4 | Block not found | The requested block does not exist on this node |
| 5 | Internal error | The node failed to answer the request |
