starknet_getStorageAt
curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getStorageAt",
"params": [
"0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3",
"0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e",
"latest"
]
}
'import requests
url = "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getStorageAt",
"params": ["0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3", "0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e", "latest"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'starknet_getStorageAt',
params: [
'0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3',
'0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e',
'latest'
]
})
};
fetch('https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'starknet_getStorageAt',
'params' => [
'0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3',
'0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e',
'latest'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getStorageAt\",\n \"params\": [\n \"0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3\",\n \"0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e\",\n \"latest\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getStorageAt\",\n \"params\": [\n \"0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3\",\n \"0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e\",\n \"latest\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getStorageAt\",\n \"params\": [\n \"0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3\",\n \"0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e\",\n \"latest\"\n ]\n}"
response = http.request(request)
puts response.read_bodyStarknet node API
starknet_getStorageAt | Starknet
Starknet API method that returns the storage value at a given position for a given account. starknet_getStorageAt on Starknet via Chainstack.
POST
/
365cf697a3ad6d950b4c4a911e2e4f4d
starknet_getStorageAt
curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getStorageAt",
"params": [
"0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3",
"0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e",
"latest"
]
}
'import requests
url = "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getStorageAt",
"params": ["0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3", "0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e", "latest"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'starknet_getStorageAt',
params: [
'0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3',
'0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e',
'latest'
]
})
};
fetch('https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'starknet_getStorageAt',
'params' => [
'0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3',
'0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e',
'latest'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getStorageAt\",\n \"params\": [\n \"0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3\",\n \"0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e\",\n \"latest\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getStorageAt\",\n \"params\": [\n \"0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3\",\n \"0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e\",\n \"latest\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_getStorageAt\",\n \"params\": [\n \"0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3\",\n \"0x2de7ac669936cc3b4e9784ff23826dc9056c74d54d3f41f1b0d28b36966369e\",\n \"latest\"\n ]\n}"
response = http.request(request)
puts response.read_bodyStarknet OpenRPC specFor the latest version of the publicly maintained OpenRPC spec, see the Starknet specs GitHub repo.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
address— the string of the address of the account.position— the string of the position in the storage.
Response
result— the value stored at the given position in the account’s storage, represented as a hexadecimal string.
Use case
A practical use case forstarknet_getStorageAt is to inspect the state of a smart contract. For example, if a smart contract stores the balance of an account at a specific position in its storage, you can use starknet_getStorageAt to retrieve the balance of the account at a specific block.
Deprecated feeder gateway method
The feeder gateway was deprecated on December 11, 2023. Example of the call you had to make to the feeder gateway before the deprecation:Shell
curl 'https://alpha-mainnet.starknet.io/feeder_gateway/get_storage_at?contractAddress=0x00dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3&key=1297713107789520337982513184691958288380927033924334369025906284470037001886&blockNumber=latest'
Last modified on June 22, 2026
Was this page helpful?