/walletsolidity/getblock REST API Endpoint
身體參數
id_or_num
整數
必填
載入中...
detail
布林值
載入中...
退貨
blockID
載入中...
block_header
載入中...
raw_data
載入中...
數字
載入中...
txTrieRoot
載入中...
witness_address
載入中...
parentHash
載入中...
accountStateRoot
載入中...
witness_id
載入中...
版本
載入中...
時間戳記
載入中...
witness_signature
載入中...
請求
1curl https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblock \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"id_or_num": "1000000",7"detail": false8}9'
1curl https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblock \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"id_or_num": "1000000",7"detail": false8}9'
1fetch('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblock', {2方法: 'POST',3headers: {4「接受」: 'application/json',5「Content-Type」: 'application/json'6},7body: JSON.stringify({8id_or_num: '1000000',9detail: false10})11})12.接著(回應 => response.json())13.then(data => {14// Handle the response data15console.log(data);16})17.catchcatch(錯誤 => {18// Handle any errors19控制台.錯誤(錯誤);20});21
1fetch('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblock', {2方法: 'POST',3headers: {4「接受」: 'application/json',5「Content-Type」: 'application/json'6},7body: JSON.stringify({8id_or_num: '1000000',9detail: false10})11})12.接著(回應 => response.json())13.then(data => {14// Handle the response data15console.log(data);16})17.catchcatch(錯誤 => {18// Handle any errors19控制台.錯誤(錯誤);20});21
1匯入 請求2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblock'5標題 = {6「接受」: 'application/json',7「Content-Type」: 'application/json'8}9資料 = {10'id_or_num': '1000000',11'detail': False12}1314回應 = 請求.POST(url, 標頭=headers, data=json.dumps(data))15if response.status_code == 200:16result = response.json()17# Handle the response data18print(result)19else:20# Handle any errors21print('Request failed with status code', response.status_code)22print(response.text)23
1匯入 請求2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblock'5標題 = {6「接受」: 'application/json',7「Content-Type」: 'application/json'8}9資料 = {10'id_or_num': '1000000',11'detail': False12}1314回應 = 請求.POST(url, 標頭=headers, data=json.dumps(data))15if response.status_code == 200:16result = response.json()17# Handle the response data18print(result)19else:20# Handle any errors21print('Request failed with status code', response.status_code)22print(response.text)23
1需要 'net/http'2require 'json'3需要 'uri'45url = URI.parse('https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblock')6http = Net::HTTP.new(url.host, url.port)78request = Net::HTTP::Post.new(url.path, { 'Content-Type' => 'application/json', 'Accept' => 'application/json' })9request.body = { id_or_num: '1000000', detail: false }.to_json1011回應 = http.請求(請求)1213if response.code.to_i == 20014result = JSON.parse(response.body)15# Handle the response data16puts result17else18# Handle any errors19puts 'Request failed with status code ' + response.code20puts response.body21結束22
1需要 'net/http'2require 'json'3需要 'uri'45url = URI.parse('https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblock')6http = Net::HTTP.new(url.host, url.port)78request = Net::HTTP::Post.new(url.path, { 'Content-Type' => 'application/json', 'Accept' => 'application/json' })9request.body = { id_or_num: '1000000', detail: false }.to_json1011回應 = http.請求(請求)1213if response.code.to_i == 20014result = JSON.parse(response.body)15# Handle the response data16puts result17else18# Handle any errors19puts 'Request failed with status code ' + response.code20puts response.body21結束22