Asset Hub JSON-RPC API (Primary Network)
JSON-RPC API reference for Polkadot Asset Hub. Explore method list, request examples, and how to connect to GetBlock's Asset Hub RPC endpoints
Asset Hub is a system parachain and the primary network for fungible assets and NFTs on Polkadot. It runs the standard Substrate runtime plus the asset pallets (Assets, Foreign Assets, Pool Assets, and NFTs), and it is positioned to hold balances and tokens on behalf of the wider network.
Because Asset Hub is a Substrate chain, its JSON-RPC interface is the same method set documented in the Polkadot JSON-RPC API (Relaychain) reference: the chain_, state_, system_, payment_, author_, grandpa_, childstate_, and mmr_ namespaces, called the same way. On GetBlock's unified endpoint, JSON-RPC requests reach Asset Hub as the primary network. What differs is the data those methods return — Asset Hub's blocks, state, and metadata include the asset pallets.
Base URL
https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/Method Reference
The full JSON-RPC method reference applies to Asset Hub unchanged. See the Relaychain method index for chain_, state_, system_, payment_, grandpa_, childstate_, and mmr_ methods, each with parameters, responses, and a Polkadot.js example.
Two properties confirm the chain a JSON-RPC endpoint is serving:
system_chainreturns the chain name.system_propertiesreturnsss58Format0,tokenDecimals10, andtokenSymbolDOT — Asset Hub uses DOT as its native token.
Reading Asset Hub Assets
Asset Hub's distinctive data lives in the asset pallets. It can be read using the same JSON-RPC state methods or, more conveniently, via the Substrate API Sidecar REST endpoints.
Asset details and metadata
Read an asset's supply, owner, and metadata (name, symbol, decimals):
curl --location 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/pallets/assets/1984/asset-info'# Storage key = twox128("Assets") ++ twox128("Metadata") ++ blake2_128_concat(assetId)
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0", "method": "state_getStorage", "params": ["0x..."], "id": "getblock.io"}'Account asset balances
Read an account's balances across Asset Hub assets:
Enumerating assets
Use state_getKeysPaged against the Assets.Asset storage prefix to page through every asset ID, then resolve each with state_getStorage or the Sidecar asset-info endpoint.
Support
Support: support@getblock.io
See Also
Last updated
Was this helpful?