Parameters
prefix
string
REQUIRED
The prefix to filter keys. Leave empty to get all keys
hash
string
The block hash. If not provided, uses the latest block
Returns
result
array
An array of storage keys
Request
1curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/asset-hub' \2--header 'Content-Type: application/json' \3--data '{"jsonrpc":"2.0","id":1,"method":"state_getKeys","params":["0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f"]}'
1curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/asset-hub' \2--header 'Content-Type: application/json' \3--data '{"jsonrpc":"2.0","id":1,"method":"state_getKeys","params":["0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f"]}'
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"jsonrpc": "2.0",6"id": 1,7"method": "state_getKeys",8"params": ["0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f"]9});1011const requestOptions = {12method: "POST",13headers: myHeaders,14body: raw,15redirect: "follow"16};1718fetch("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub", requestOptions)19.then((response) => response.text())20.then((result) => console.log(result))21.catch((error) => console.error(error));22
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"jsonrpc": "2.0",6"id": 1,7"method": "state_getKeys",8"params": ["0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f"]9});1011const requestOptions = {12method: "POST",13headers: myHeaders,14body: raw,15redirect: "follow"16};1718fetch("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub", requestOptions)19.then((response) => response.text())20.then((result) => console.log(result))21.catch((error) => console.error(error));22
1import requests2import json34url = "https://docs-demo.dot-mainnet.quiknode.pro/asset-hub"56payload = json.dumps({7"jsonrpc": "2.0",8"id": 1,9"method": "state_getKeys",10"params": ["0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f"]11})1213headers = {14'Content-Type': 'application/json'15}1617response = requests.request("POST", url, headers=headers, data=payload)18print(response.text)19
1import requests2import json34url = "https://docs-demo.dot-mainnet.quiknode.pro/asset-hub"56payload = json.dumps({7"jsonrpc": "2.0",8"id": 1,9"method": "state_getKeys",10"params": ["0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f"]11})1213headers = {14'Content-Type': 'application/json'15}1617response = requests.request("POST", url, headers=headers, data=payload)18print(response.text)19
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"jsonrpc": "2.0",14"id": 1,15"method": "state_getKeys",16"params": ["0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f"]17})1819response = https.request(request)20puts response.read_body21
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"jsonrpc": "2.0",14"id": 1,15"method": "state_getKeys",16"params": ["0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f"]17})1819response = https.request(request)20puts response.read_body21
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free