starknet_call
curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_call",
"params": [
{
"calldata": [
"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a"
],
"contract_address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"entry_point_selector": "0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e"
},
"latest"
]
}
'import requests
url = "https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_call",
"params": [
{
"calldata": ["0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a"],
"contract_address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"entry_point_selector": "0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e"
},
"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_call',
params: [
{
calldata: ['0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a'],
contract_address: '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7',
entry_point_selector: '0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e'
},
'latest'
]
})
};
fetch('https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e', 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/mt_c524ad9781ae5dccd9ac6f5b0370e",
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_call',
'params' => [
[
'calldata' => [
'0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a'
],
'contract_address' => '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7',
'entry_point_selector' => '0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e'
],
'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/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_call\",\n \"params\": [\n {\n \"calldata\": [\n \"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a\"\n ],\n \"contract_address\": \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n \"entry_point_selector\": \"0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e\"\n },\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/mt_c524ad9781ae5dccd9ac6f5b0370e")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_call\",\n \"params\": [\n {\n \"calldata\": [\n \"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a\"\n ],\n \"contract_address\": \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n \"entry_point_selector\": \"0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e\"\n },\n \"latest\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
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_call\",\n \"params\": [\n {\n \"calldata\": [\n \"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a\"\n ],\n \"contract_address\": \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n \"entry_point_selector\": \"0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e\"\n },\n \"latest\"\n ]\n}"
response = http.request(request)
puts response.read_bodyStarknet node API
starknet_call | Starknet
Starknet API method that executes a function call to a contract without creating a Starknet transaction. Chainstack Starknet reference.
POST
/
mt_c524ad9781ae5dccd9ac6f5b0370e
starknet_call
curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_call",
"params": [
{
"calldata": [
"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a"
],
"contract_address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"entry_point_selector": "0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e"
},
"latest"
]
}
'import requests
url = "https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_call",
"params": [
{
"calldata": ["0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a"],
"contract_address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"entry_point_selector": "0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e"
},
"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_call',
params: [
{
calldata: ['0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a'],
contract_address: '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7',
entry_point_selector: '0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e'
},
'latest'
]
})
};
fetch('https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e', 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/mt_c524ad9781ae5dccd9ac6f5b0370e",
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_call',
'params' => [
[
'calldata' => [
'0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a'
],
'contract_address' => '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7',
'entry_point_selector' => '0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e'
],
'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/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_call\",\n \"params\": [\n {\n \"calldata\": [\n \"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a\"\n ],\n \"contract_address\": \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n \"entry_point_selector\": \"0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e\"\n },\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/mt_c524ad9781ae5dccd9ac6f5b0370e")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"starknet_call\",\n \"params\": [\n {\n \"calldata\": [\n \"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a\"\n ],\n \"contract_address\": \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n \"entry_point_selector\": \"0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e\"\n },\n \"latest\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://starknet-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
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_call\",\n \"params\": [\n {\n \"calldata\": [\n \"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a\"\n ],\n \"contract_address\": \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n \"entry_point_selector\": \"0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e\"\n },\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
request— the details of the function call:contract_address— the address of the contract to be called.entry_point_selector— the selector of the function to be called.calldata— the parameters passed to the function.
block_id— the hash of the requested block, or number (height) of the requested block, or a block tag, for the block referencing the state or call the transaction on.
Response
result— the function’s return value, as defined in the Cairo output.
Use case
A practical use case forstarknet_call is to interact with a contract’s function without creating a transaction or changing the state. This can be useful for querying contract state or testing function calls.Last modified on November 9, 2026
Was this page helpful?