network/options - Cardano

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.

FieldTypeRequiredDescription
network_identifierobjectYesThe network to query
metadataobjectNoOptional metadata object

Request

bashcurl --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": {}
}'

example.js

javascriptconst 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());

example.py

pythonimport 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

FieldTypeDescription
versionobjectRosetta, node, and middleware versions
allow.operation_typesarrayOperation types the network uses
allow.operation_statusesarrayPossible operation statuses
allow.errorsarrayErrors the server can return
allow.historical_balance_lookupbooleanWhether 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 CodeMessageDescription
1Invalid requestThe request body is malformed or missing required fields
4Block not foundThe requested block does not exist on this node
5Internal errorThe node failed to answer the request