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.
| Field | Type | Required | Description |
|---|---|---|---|
| network_identifier | object | Yes | The network to query |
| metadata | object | No | Optional 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
| 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 |