/runtime/spec - Polkadot

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

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

httpGET /runtime/spec

Query Parameters

ParameterTypeRequiredDescription
atstringNoBlock height or hash to query at

Request

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

example.js

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

example.py

pythonimport 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

FieldTypeDescription
specNamestringRuntime spec name (polkadot)
specVersionstringRuntime spec version
transactionVersionstringTransaction format version
propertiesobjectChain 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