/api/v1/contracts/call REST API Endpoint
Body Parameters
block
string
Loading...
data
integer
Loading...
estimate
boolean
Loading...
from
string
Loading...
gas
integer
Loading...
gasPrice
integer
Loading...
to
string
REQUIRED
Loading...
value
integer
Loading...
Returns
result
string
Loading...
Request
1curl --location 'https://docs-demo.hedera-testnet.quiknode.pro/api/v1/contracts/call' \2--header 'Content-Type: application/json' \3--data '{4"block": "latest",5"to": "0x9fe15ad3c02dae7a1e4a31ebb805ea9d0b33a4d6",6"data": "0x06fdde03"7}'8
1curl --location 'https://docs-demo.hedera-testnet.quiknode.pro/api/v1/contracts/call' \2--header 'Content-Type: application/json' \3--data '{4"block": "latest",5"to": "0x9fe15ad3c02dae7a1e4a31ebb805ea9d0b33a4d6",6"data": "0x06fdde03"7}'8
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"block": "latest",6"to": "0x9fe15ad3c02dae7a1e4a31ebb805ea9d0b33a4d6",7"data": "0x06fdde03"8});910const requestOptions = {11method: "POST",12headers: myHeaders,13body: raw,14redirect: "follow"15};1617fetch("https://docs-demo.hedera-testnet.quiknode.pro/api/v1/contracts/call", requestOptions)18.then((response) => response.text())19.then((result) => console.log(result))20.catch((error) => console.error(error));21
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"block": "latest",6"to": "0x9fe15ad3c02dae7a1e4a31ebb805ea9d0b33a4d6",7"data": "0x06fdde03"8});910const requestOptions = {11method: "POST",12headers: myHeaders,13body: raw,14redirect: "follow"15};1617fetch("https://docs-demo.hedera-testnet.quiknode.pro/api/v1/contracts/call", requestOptions)18.then((response) => response.text())19.then((result) => console.log(result))20.catch((error) => console.error(error));21
1import requests2import json34url = "https://docs-demo.hedera-testnet.quiknode.pro/api/v1/contracts/call"56payload = json.dumps({7"block": "latest",8"to": "0x9fe15ad3c02dae7a1e4a31ebb805ea9d0b33a4d6",9"data": "0x06fdde03"10})11headers = {12'Content-Type': 'application/json'13}1415response = requests.request("POST", url, headers=headers, data=payload)1617print(response.text)18
1import requests2import json34url = "https://docs-demo.hedera-testnet.quiknode.pro/api/v1/contracts/call"56payload = json.dumps({7"block": "latest",8"to": "0x9fe15ad3c02dae7a1e4a31ebb805ea9d0b33a4d6",9"data": "0x06fdde03"10})11headers = {12'Content-Type': 'application/json'13}1415response = requests.request("POST", url, headers=headers, data=payload)1617print(response.text)18
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.hedera-testnet.quiknode.pro/api/v1/contracts/call")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"block": "latest",14"to": "0x9fe15ad3c02dae7a1e4a31ebb805ea9d0b33a4d6",15"data": "0x06fdde03"16})1718response = https.request(request)19puts response.read_body20
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.hedera-testnet.quiknode.pro/api/v1/contracts/call")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"block": "latest",14"to": "0x9fe15ad3c02dae7a1e4a31ebb805ea9d0b33a4d6",15"data": "0x06fdde03"16})1718response = https.request(request)19puts response.read_body20
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free