/jsonRPC REST API Endpoint
Body Parameters
method
string
REQUIRED
Loading...
params
string
REQUIRED
Loading...
jsonrpc
string
Loading...
id
string
Loading...
Returns
ok
boolean
Loading...
result
object
Loading...
jsonrpc
string
Loading...
id
string
Loading...
Request
1curl --location 'https://docs-demo.ton-mainnet.quiknode.pro/jsonRPC' \2--header 'accept: application/json' \3--header 'Content-Type: application/json' \4--data '{5"method": "getMasterchainInfo",6"params": {},7"id": "1",8"jsonrpc": "2.0"9}'
1curl --location 'https://docs-demo.ton-mainnet.quiknode.pro/jsonRPC' \2--header 'accept: application/json' \3--header 'Content-Type: application/json' \4--data '{5"method": "getMasterchainInfo",6"params": {},7"id": "1",8"jsonrpc": "2.0"9}'
1const myHeaders = new Headers();2myHeaders.append("accept", "application/json");3myHeaders.append("Content-Type", "application/json");45const raw = JSON.stringify({6"method": "getMasterchainInfo",7"params": {},8"id": "1",9"jsonrpc": "2.0"10});1112const requestOptions = {13method: "POST",14headers: myHeaders,15body: raw,16redirect: "follow"17};1819fetch("https://docs-demo.ton-mainnet.quiknode.pro/jsonRPC", requestOptions)20.then((response) => response.text())21.then((result) => console.log(result))22.catch((error) => console.error(error));
1const myHeaders = new Headers();2myHeaders.append("accept", "application/json");3myHeaders.append("Content-Type", "application/json");45const raw = JSON.stringify({6"method": "getMasterchainInfo",7"params": {},8"id": "1",9"jsonrpc": "2.0"10});1112const requestOptions = {13method: "POST",14headers: myHeaders,15body: raw,16redirect: "follow"17};1819fetch("https://docs-demo.ton-mainnet.quiknode.pro/jsonRPC", requestOptions)20.then((response) => response.text())21.then((result) => console.log(result))22.catch((error) => console.error(error));
1import requests2import json34url = "https://docs-demo.ton-mainnet.quiknode.pro/jsonRPC"56payload = json.dumps({7"method": "getMasterchainInfo",8"params": {},9"id": "1",10"jsonrpc": "2.0"11})12headers = {13'accept': 'application/json',14'Content-Type': 'application/json'15}1617response = requests.request("POST", url, headers=headers, data=payload)1819print(response.text)20
1import requests2import json34url = "https://docs-demo.ton-mainnet.quiknode.pro/jsonRPC"56payload = json.dumps({7"method": "getMasterchainInfo",8"params": {},9"id": "1",10"jsonrpc": "2.0"11})12headers = {13'accept': 'application/json',14'Content-Type': 'application/json'15}1617response = requests.request("POST", url, headers=headers, data=payload)1819print(response.text)20
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.ton-mainnet.quiknode.pro/jsonRPC")67http = Net::HTTP.new(url.host, url.port);8request = Net::HTTP::Post.new(url)9request["accept"] = "application/json"10request["Content-Type"] = "application/json"11request.body = JSON.dump({12"method": "getMasterchainInfo",13"params": {},14"id": "1",15"jsonrpc": "2.0"16})1718response = http.request(request)19puts response.read_body20
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.ton-mainnet.quiknode.pro/jsonRPC")67http = Net::HTTP.new(url.host, url.port);8request = Net::HTTP::Post.new(url)9request["accept"] = "application/json"10request["Content-Type"] = "application/json"11request.body = JSON.dump({12"method": "getMasterchainInfo",13"params": {},14"id": "1",15"jsonrpc": "2.0"16})1718response = http.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