Docs
Supported ChainsAsset HubSubstrate APIState Methods

state_call - Asset Hub RPC Method

Call a runtime API on Asset Hub. Essential for runtime computations.

Calls a runtime API method on Asset Hub.

Use Cases

  • Runtime computations - Execute runtime logic without transactions
  • Account queries - Use AccountNonceApi for native stablecoin transfers (USDC, USDT), DOT staking and governance, and cross-chain asset management via XCM
  • Fee estimation - Use TransactionPaymentApi

Request Parameters

Request
methodString

Runtime API method name

dataString

SCALE-encoded call data

blockHashString

Block hash for historical call

Response Body

Response

Code Examples

Bash
curl https://api-asset-hub-polkadot.n.dwellir.com/<YOUR_API_KEY>/YOUR_API_KEY \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "state_call",
    "params": ["AccountNonceApi_account_nonce", "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"],
    "id": 1
  }'
JavaScript
import { ApiPromise, WsProvider } from '@polkadot/api';

const provider = new WsProvider('wss://api-asset-hub-polkadot.n.dwellir.com/YOUR_API_KEY');
const api = await ApiPromise.create({ provider });

// Get account nonce via runtime API
const account = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
const result = await api.call.accountNonceApi.accountNonce(account);
console.log('Account nonce:', result.toNumber());

await api.disconnect();

On this page