# /runtime/spec - Polkadot

> Example code for the /runtime/spec REST method. Complete guide on how to use /runtime/spec REST in GetBlock Web3 documentation.

This endpoint returns the runtime specification: the spec name and version, transaction version, and chain properties such as token symbol and decimals.

> **Info:** On GetBlock's unified endpoint, Asset Hub is the default network. To call this endpoint against the Relaychain, add an `/rc` prefix to the path (for example, `/rc/runtime/spec`).

## Endpoint

```http
GET /runtime/spec
```

## Query Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| at | string | No | Block height or hash to query at |

## Request

#### cURL

```bash
curl --location 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/runtime/spec'
```

#### JavaScript

#### example.js

```javascript
const response = await fetch('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/runtime/spec');
const data = await response.json();
console.log(data);
```

#### Python

#### example.py

```python
import requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/runtime/spec')
print(response.json())
```

## Response

```json
{
  "at": {
    "hash": "0x255bc00927df8d33d561792635cbc6bde480a0a505eef5ff28630ece3fc15b32",
    "height": "6754362"
  },
  "authoringVersion": "0",
  "transactionVersion": "26",
  "implVersion": "0",
  "specName": "polkadot",
  "specVersion": "1002000",
  "chainType": {
    "live": null
  },
  "properties": {
    "ss58Format": "0",
    "tokenDecimals": [
      "10"
    ],
    "tokenSymbol": [
      "DOT"
    ]
  }
}
```

## Response Fields

| Field | Type | Description |
| --- | --- | --- |
| specName | string | Runtime spec name (polkadot) |
| specVersion | string | Runtime spec version |
| transactionVersion | string | Transaction format version |
| properties | object | Chain properties (SS58 format, decimals, symbol) |

## Use Cases

* **Upgrade Detection**: Detect runtime upgrades by specVersion
* **Transaction Signing**: Read the transaction version
* **Chain Config**: Read token decimals and SS58 format
* **Tooling**: Configure SDKs against the runtime
